I would like to have a __m128i variable, and do some operation like this:
unsigned char* myArray;
__m128i fourValues;
//Do some strange reference assignment, e.g.:
//int32_t& a = *((int32_t*) &fourValues);
//int32_t& b = *(((int32_t*) &fourValues) + 1);
//int32_t& c = *(((int32_t*) &fourValues) + 2);
//int32_t& d = *(((int32_t*) &fourValues) + 3);
for (int i =0; i < someSize; i+=4) {
a = d + myArray[i];
b = a + myArray[i+1];
c = b + myArray[i+2];
d = c + myArray[i+3];
//Do something with fourValues;
}
where a,b,c,d are (or behave as) int32_t variables, and are the first, second, third and fourth 32bits of fourValues. Is that possible?