I have a array containing some int values (those at [position%2=0] are negative and those at [position%2=1] are positive).
I want to load those values at a 4 step from the array to the register but I want them inverted (positive converted to negative and vice versa)
__m128i v1;
for (int k = 0; k < limit; k += 4) {
v1 = _mm_load_si128((__m128i *) & myArray[position + k]);
}
The above SSE code loads the values into register as is: Is there a command to take v1 and inverse it? Can it be done in one step / command? Is it even possible to load the values directly inverted from the original array?
Any help will be appreciated. Thanks in advance.