So, AVX has a function from immintrin.h
, which should allow to store the concatenation of two __m128i
values into a single __m256i
value. The function is
__m256i _mm256_set_m128i (__m128i hi, __m128i lo)
However, when I use it, like so:
__m256i as[2]; __m128i s[4]; as[0] = _mm256_setr_m128i(s[0], s[1]);
I get a compilation error:
error: incompatible types when assigning to type ‘__m256i’ from type ‘int’
I don't really understand why this happens. Any help is greatly appreciated!
#include <immintrin.h>
, I get the warning message "implicit declaration of_mm256_set_m128i
". In C, an implicit declaration means that the compiler assumes the function will return anint
, which would explain the compiler error as well. – R_Kapp Sep 17 '15 at 12:46