Convert __m128d to double

c++, sse

Solution

The counterpart of `load` would be `store`[ms, intel]. So in your case I'd guess (double precision, aligned pointer, regular store):

_mm_store_pd(A, res); //A = res;

Problem

I just try to use SSE extensions, and I started with a simple vector dot multiplication. So I wrote the following code: ``` void SSE_vectormult(double * A, double * B) { __m128d a; __m128d b; a = _mm_load_pd(A); b = _mm_load_pd(B); const int mask = 0xf1; __m128d res = _mm_dp_pd(a,b,mask); A = res; } ``` with `A` and `B` vectors of the same length. Now, I have to convert the result in `__m128d` back into `double`. Is there a easy way to do this (or a conversion function)? Thank you!

Original source