问题
Does the C# compiler / jitter make use of fused multiply-add operations if they are available on the hardware being used? If it does, are there any particular compiler settings I need to set in order to take advantage of it?
My intent is to use compensated algorithms for extended precision arithmetic, and some of them can be written to use FMA.
回答1:
At last, .NET Core 3.0 provides System.Math.FusedMultiplyAdd. The rationale for not using this operation automatically is explained in a github issue.
来源:https://stackoverflow.com/questions/37443569/can-c-sharp-make-use-of-fused-multiply-add