I have the following piece of C code:
__m128 pSrc1 = _mm_set1_ps(4.0f);
__m128 pDest;
int i;
for (i=0;i<100;i++) {
m1 = _mm_mul_ps(pSrc1, pSrc1);
m2 = _mm_mul_ps(pSrc1, pSrc1);
m3 = _mm_add_ps(m1, m2);
pDest = _mm_add_ps(m3, m3);
}
float *arrq = (float*) pDest;
Everything until the end of the for loop works. What I am trying to do now is to cast the __m128 type back to float. Since it stores 4 floats I thought I easily can cast it back to float*. What am I doing wrong? (This is a test code, so don't wonder). I basically tried all possible conversions I could think of. Thx for your help.