Function crashes when using _mm_load_pd

前端 未结 3 809
旧时难觅i
旧时难觅i 2020-12-12 04:34

I have the following function:

template 
void SSE_vectormult(T * A, T * B, int size)
{

    __m128d a;
    __m128d b;
    __m128d c;
    do         


        
3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-12 05:14

    If you look at http://msdn.microsoft.com/en-us/library/cww3b12t(v=vs.90).aspx you can see that the function __mm_load_pd is defined as:

    __m128d _mm_load_pd (double *p);
    

    So, in your code A should be of type double, but A is of tipe T that is a template param. You should be sure that you are calling your SSE_vectormult function with the rights template params or just remove the template and use the double type instead,

提交回复
热议问题