I'm trying to cast unsigned short array to __m128i
:
const unsigned short x[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
const unsigned short y[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
__m128i n = *(__m128i*) &y[0];
__m128i m = *(__m128i*) &x[0];
First casting work fine, but the second one - not. I've got:
Unhandled exception at 0x013839ee in sse2_test.exe: 0xC0000005: Access violation reading location 0xffffffff.
What's wrong? Can somebody help me?