Hi all.
I have a question.
Threre is the data what the type is __m128i.
And I want to copy to BYTE array.
For example)
__m128i result;
__m128i.m128i_u8[0] = 1;
__m128i.m128i_u8[1] = 2;
__m128i.m128i_u8[2] = 3;
__m128i.m128i_u8[3] = 4;
__m128i.m128i_u8[4] = 5;
__m128i.m128i_u8[5] = 6;
__m128i.m128i_u8[6] = 7;
__m128i.m128i_u8[7] = 8;
__m128i.m128i_u8[8] = 0;
__m128i.m128i_u8[9] = 0;
__m128i.m128i_u8[10] = 0;
__m128i.m128i_u8[11] = 0;
__m128i.m128i_u8[12] = 0;
__m128i.m128i_u8[13] = 0;
__m128i.m128i_u8[14] = 0;
__m128i.m128i_u8[15] = 0;
BYTE data[8] = {0,};
memcpy(data,__m128i.m128i_u8,8);
Result)
data[0] = 1;
data[1] = 2;
data[2] = 3;
data[3] = 4;
data[4] = 5;
data[5] = 6;
data[6] = 7;
data[7] = 8;
Actually, I test as above code, it works well but slow.
I think because of 'memcpy'.
I want to replace from 'memcpy' to '_mm_store...' operation.
I think it will work faster than 'memcpy'. (maybe..)
So my question is...
How to use '_mm_store...' operation, can I get as above result?
Please advise me. Thank you :)
What I have tried:
I tried to use 'memcpy'.
memcpy(data,__m128i.m128i_u8,8); // slow..