Dear Intel developers,
I'm using Intel 15 on Intel(R) Xeon(R) CPU E5-2670 processor. I have a problem using FMA instrinsic instruction. My compiler flags are -O3 -xHost. Compilation ends well but when I run my program I get: Program Exception - illegal instruction
I have to suppose FMA is not available on that processor? If yes, why the compiler does not advice me during compilation phase?
Tim Prince wrote:
The current compiler doesn't expand fma intrinsic so you will need plain c++ source for automatic instruction selection.
Thanks Tim. How can I check at compile time if FMA is supported?
Your xhost option should result in __AVX2__ being set when your build platform supports Fma. so you can use that macro symbol to choose fma at compile time. There is also CPU dispatch facility to choose code path at run time.