Basically, my program is like:
#include <immintrin.h>
...
int* buf = (int*)_mm_malloc(sizeof(int) * 8, 32);
__m256i vi;
//some operations on vi
...
_mm256_store_epi32(buf, vi);
_mm_free(buf)
Compiler complained "error: ‘_mm256_store_epi32’ was not declared in this scope...note: suggested alternative: ‘_mm256_store_epi64’" when building the program(with flags-mavx -mavx2
). What puzzled me was it compiled successfully once replace with _mm256_store_epi64
. My gcc version is of 7.5.0.
a similar question posted here, but it didn't help. Can anybody provide me any workarounds?