Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

[dmd-cxx] Backport internal.convert, toPrec, SIMD aliases. #3063

Merged
merged 6 commits into from
Apr 24, 2020
Merged

[dmd-cxx] Backport internal.convert, toPrec, SIMD aliases. #3063

merged 6 commits into from
Apr 24, 2020

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Apr 24, 2020

No description provided.

n8sh and others added 6 commits April 23, 2020 23:27
Some floating point algorithms, such as Kahan-Babuska-Neumaier Summation,
require rounding to specific precisions. Rounding to precision after
every operation, however, loses overall precision in the general case
and is a runtime performance problem.

Adding these functions guarantee the rounding at required points in the
code, and document where in the algorithm the requirement exists.
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Auto-close Bugzilla Severity Description
19976 enhancement Simplify std.internal.convert.toUbyte CTFE path for float and double

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "dmd-cxx + druntime#3063"

@dlang-bot dlang-bot added the Enhancement New functionality label Apr 24, 2020
@ibuclaw ibuclaw changed the title [dmd-cxx [dmd-cxx] Backport internal.convert, toPrec, SIMD aliases. Apr 24, 2020
@thewilsonator thewilsonator merged commit e68a5ae into dlang:dmd-cxx Apr 24, 2020
@ibuclaw ibuclaw deleted the dmd-cxx-convert branch April 24, 2020 06:02
jpf91 pushed a commit to D-Programming-GDC/gcc that referenced this pull request Apr 25, 2020
* New core.math.toPrec templates have been added as an intrinsic.

  Some floating point algorithms, such as Kahan-Babuska-Neumaier
  Summation, require rounding to specific precisions. Rounding to
  precision after every operation, however, loses overall precision in
  the general case and is a runtime performance problem.

  Adding these functions guarantee the rounding at required points in
  the code, and document where in the algorithm the requirement exists.

* Support IBM long double types in core.internal.convert.

* Add missing aliases for 64-bit vectors in core.simd.

* RUNNABLE_PHOBOS_TEST directive has been properly integrated into the
  D2 language testsuite.

Reviewed-on: dlang/druntime#3063
	     dlang/dmd#11054

gcc/d/ChangeLog:

	* intrinsics.cc (expand_intrinsic_toprec): New function.
	(maybe_expand_intrinsic): Handle toPrec intrinsics.
	* intrinsics.def (TOPRECF, TOPREC, TOPRECL): Add toPrec intrinsics.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Enhancement New functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants