3

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?

boraas
  • 929
  • 1
  • 10
  • 24
  • Does this answer your question? [C++ error: ‘\_mm\_sin\_ps’ was not declared in this scope](https://stackoverflow.com/questions/31978592/c-error-mm-sin-ps-was-not-declared-in-this-scope) – phuclv Jun 26 '22 at 13:54

1 Answers1

3

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.

Andrei R.
  • 2,374
  • 1
  • 13
  • 27
  • Thanks, nice answer, but there have been some tries earlier to get SVML to work on GCC. (see https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/281721). Unfortunatly something like `-mveclibabi=svml` or `-lsvml` does not work. – boraas May 22 '18 at 12:38