4 ms·
In C/C++ it would be much easier to call the intrinsic functions which represent the fma instructions. The compiler would then be able to inline and optimize th
by xioxox 9y ago
In C/C++ it would be much easier to call the intrinsic functions which represent the fma instructions. The compiler would then be able to inline and optimize the whole.
- stephencanon 9y agoIn C or C++ you should be able to use the stdlib `fma( )` function and have the compiler lower the call to the instruction, if it isn't completely out to lunch. No intrinsics should be necessary. Alternatively, set `#pragma STDC FP_CONTRACT ON` and just write `x*y + z`.
- xioxox 9y agoI didn't know they added that. The intrinsic could be useful to parallelize the computation using SSE/AVX.