I'm trying to write a little SSE code but can't continue because of this error:
error C2664: '_mm_loadu_ps' : cannot convert parameter 1 from 'const __m128 *' to 'const float *'
I've to load unaligned data and to convert into __m128 in order to use the SSE intrinsics functions. I'm searching on the web but can't get this work. Here's my code:
const Matrix<T> mul_SSE (const Matrix<T>& m)const{
// ...
__m128 a = _mm_loadu_ps((__m128 const*)&m(0,0)); //<-Here's the error line
// ...
}
the parameter m is a matrix of floats. Any suggestion? Thank you very much!
ps. Also if I write __m128 a = _mm_loadu_ps((__m128*)&m(0,0)); it's giving me the same error:
error C2664: '_mm_loadu_ps' : cannot convert parameter 1 from '__m128 *' to 'const float *'
SOLVED: The right way:
__m128 a = _mm_loadu_ps(&m(0,0));