none
errC2719 formal parameter t with declspec(align(16) won't be aligned??

    Question

  • I have no idea how to fix it. Any suggestions appreciated.

    typedef union

    {

    struct {__m128d xxx,yyy;} __declspec(align(32));

    double a[4];

    } vDouble;

    static inline vDouble vShuffle1dx(vDouble t, int a, int b, int c, int d)

    { vDouble result;

    result.a[0] = t.a[3-a];

    result.a[1] = t.a[3-b];

    result.a[2] = t.a[3-c];

    result.a[3] = t.a[3-d];

    return result;

    }

    Thursday, February 22, 2007 3:24 AM

Answers

  • If you replace "vDouble t" with "const vDouble & t", then the error disappears. I hope this is suitable, since the function is inline.

    Thursday, February 22, 2007 8:01 AM

All replies

  • Hi,

    Have u included the header <emmintrin.h>?

     

     

    Thursday, February 22, 2007 7:37 AM
  • If you replace "vDouble t" with "const vDouble & t", then the error disappears. I hope this is suitable, since the function is inline.

    Thursday, February 22, 2007 8:01 AM