Long story short, i've been trying to learn a new programming paradigm and get out of my comfort zone of just being someone who writes code to an individual that actually understands what's going on behind the scenes.
I've read several assembly programming book, tutorials and countless google articles. Somehow SIMD interest me more than other topic for now. I'm concentrating on AVX and SSE at the moment, working on my VPS, checking out people code and trying to implement a simple computation just to learn and get the feel of how SIMD is working.
Now to the question, i know AVX support __m256,__m256d and __m256i. I didn't have problem with the first two but for some reason i am having problem with __m256i (8-bit integer);
ie:
-say i have 8 integers and I set them into the register for example: __m256i a = _mm256_setr_epi32(1,2,3,4,5,6,7,8) -and i want to do shift 1 bit using operation _mm256_slli_si256 and then store the result in another variable __m256i b b = _mm256_slli_si256(a,1);
if i compile this, the compiler throws an error of : "error: incompatible types when assigning to type ‘__m256i’ from type ‘int’"
i tried to cast the variable to __m256i but then i get another error: "error: can’t convert between vector values of different size"
i'm using GCC with -mavx flag if anything.