Vector FMA

Vector FMA

I need to do something like this A = B + C * D where A, B, C, D are vectors and the operation is done elemnt wise.Currently I am using vdMul followed by a vdAdd ... This is not entirely efficient (even if my processor has no FMA instruction set) because of cache coherency and how the instructions are issued... i.e. all my adders are sitting idle when i do my muls, and all my muls are idle when i do my adds.Is there a more efficient way to do this?Side: is dger the only way to do the "outer-product" between two vectors? in MKL?

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hello,

vdMu and vdAdd are the function that could be used now( You may block the data if it is too large to put into cache). I am checking the function owner to find any more efficient to use. Generally, for such simple loops, the compiler is expecting to generate some high performance code.

Thanks,
Chao

Leave a Comment

Please sign in to add a comment. Not a member? Join today