how can I use SVML instructions [duplicate]

2019-01-25 20:38发布

问题:

This question already has an answer here:

  • C++ error: ‘_mm_sin_ps’ was not declared in this scope 3 answers
  • Where is Clang's '_mm256_pow_ps' intrinsic? 1 answer

I am trying to calculate the exponential function using SIMD. and I found this function : https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_exp_ps&expand=2136

I have already included "immintrin.h" in my code, and also my cpu has a SSE flag. But gcc is complaining that error: ‘_mm_exp_pd’ was not declared in this scope

How could I check whether SVML instructions is enabled ?

回答1:

SVML is a proprietary Intel library that works with the Intel compiler (ICC). If you're not using ICC then you'll need to find an equivalent library, e.g. sse_mathfun or avx_mathfun.



标签: c++ x86 sse simd