Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Using SVML

Steena_M_Intel
Employee
1,107 Views

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

 

 

 

0 Kudos
1 Solution
TimP
Honored Contributor III
1,107 Views

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 = pow(c,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.

View solution in original post

0 Kudos
2 Replies
TimP
Honored Contributor III
1,108 Views

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 = pow(c,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.

0 Kudos
Steena_M_Intel
Employee
1,107 Views

Tim,

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

0 Kudos
Reply