Vector Class Discussion

FMA with the vectorclass
Author: Agner Date: 2013-04-12 00:28
The programs are much more readable and easier to maintain if you rely on the compiler fusing * and + into FMA instructions than if you use FMA functions.

My experience is that the compiler automatically fuses multiply and add instructions whenever it is possible and optimal. This requires that the FMA3 or FMA4 instruction set is enabled and a relaxed floating point model.

I haven't tested all compilers and all situations. These instructions are pretty new and the compilers may not have been fine tuned yet. If it turns out that there are situations that the compilers can't handle then we may discuss whether it is relevant to add explicit FMA functions to the vector class library.

 
thread FMA with the vectorclass new - chad - 2013-04-10
last reply FMA with the vectorclass - Agner - 2013-04-12