I have an old implementation that used the _mm256_exp_ps()
function, and I could compile them with GCC, ICC, and Clang; Now, I cannot compile the code anymore because the compiler does not find the function _mm256_exp_ps().
Here is the simplified version of my problem:
#include <stdio.h>
#include <x86intrin.h>
int main()
{
__m256 vec1, vec2;
vec2 = _mm256_exp_ps(vec1);
return 0;
}
And the error is:
$ gcc -march=native temp.c -o temp
temp.c: In function ‘main’:
temp.c:9:16: warning: implicit declaration of function ‘_mm256_exp_ps’; did you mean ‘_mm256_rcp_ps’? [-Wimplicit-function-declaration]
9 | vec2 = _mm256_exp_ps(vec1);
| ^~~~~~~~~~~~~
| _mm256_rcp_ps
temp.c:9:16: error: incompatible types when assigning to type ‘__m256’ from type ‘int’
Which means the compiler cannot find the intrinsic.
If I use another function, for example, _mm256_add_ps()
, there are no errors, which means the library is accessible; the problem is with _mm256_exp_ps()
that might have been changed when they have added AVX512 support to the compiler.
#include <stdio.h>
#include <x86intrin.h>
int main()
{
__m256 vec1, vec2;
vec2 = _mm256_add_ps(vec1, vec2);
return 0;
}
Could you please help me solve the problem?