While trying to load _mm_loadu_epi8 instruction which is defined in AVX512 family of Intel Intrinsics instruction was getting error in c++ that - Usage of _mm_loadu_epi8 leads to error - ‘_mm_loadu_epi8’ was not declared in this scope.
Tried to use the following flags while compiling the code but ended up with the same error -
1. march=cascadelake
2. march=skylake-avx512
3. march=knl
4. -mavx512f -mavx512wl -mavx512bw
To check if version of g++ used is causing issues, g++-9 and g++-10 while compiling the same. The same issue persisted.
What could be done to use the required _mm_loadu_epi8 instruction. A code snippet has been attached here for the same. Thanks
#include <immintrin.h>
#include <cstdint>
using namespace std;
int main() {
uint8_t arr[64] = { 32, 25, 24, 16, 15, 13, 12, 19, 31, 32, 30, 29, 35, 36, 39, 40, 32, 25, 24, 16, 15, 13, 12, 19, 31, 32, 30, 29, 35, 36, 39, 40, 32, 25, 24, 16, 15, 13, 12, 19, 31, 32, 30, 29, 35, 36, 39, 40, 32, 25, 24, 16, 15, 13, 12, 19, 31, 32, 30, 29, 35, 36, 39, 40 };
__m128i input16_old = _mm_loadu_epi8(arr);
//__m128i input16_new = _mm_loadu_si128((__m128i*)arr);
//int output = _mm_cmpneq_epi8_mask(input16_old, input16_new);
}