Search code examples
c++cavx512

_mm512_exp_pd with GNU compiler


The following code works fine with the Intel compiler (version: 18.0.2), but not for the GNU compiler (version: 6.1.0):

#include <immintrin.h>

double ALIGN array1[8] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};

__m512d a1AVX = _mm512_load_pd(array1);
__m512d exp = _mm512_exp_pd(a1AVX);

The error message state the following: error: ‘_mm512_exp_pd’ was not declared in this scope. It is from the SVML library.

I am using the following compiler flags: -std=c++11 -march=knl -mtune=knl -fpic -O3 -DNDDEBUG.

Do I miss a compiler flag here?


Solution

  • gcc does support Intel intrinsics. However, _mm512_exp_pd is not an intrinsic, but a function from SVML library, exclusive to Intel compiler. You can check full list of Intel intrinsics and SVML functions here.