Can C# make use of fused multiply-add?

假如想象 提交于 2019-12-22 06:55:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!