Using SVML

Using SVML

Hello,

I am using a single SVML function (___mm256_pow_ps()) among other non-SVML intrinsic functions in my code compiled with icpc. Is the following flag:-fimf-use-svml=true:pow the only one I should be using? I am probably missing something. Is there a different header, in addition to immintrin.h, that should be used? My compilation error is:

error: identifier "__m256_pow_ps" is undefined

Thanks in advance,

Steena

 

 

 

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

There isn't a documented explicit interface for calling svml functions.  icpc should do it automatically with standard source code such as

#include <cmath>

....

float a[].b,c[];

for(int i=0; i<n; ++i)a[i] = pow(c[i],b);  // or <math.h> and powf()

The fimf options may be used to control which svml functions are used, but the default is to use all of them.  If the vec-report option tells you it is vectorized, this assures you that an svml call is made.   You can check by nm etc.

Tim,

Thanks for that explanation. My mistake was mistyping the instruction---m256_pow_ps instead of _mm256_pow_ps. 

Leave a Comment

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