class DMatrix3x2{ public: DMatrix3x2(){ mA[0].v[0]=_mm_setzero_pd(); mA[1].v[0]=_mm_setzero_pd(); mA[0].v[1]=_mm_setzero_pd(); mA[1].v[1]=_mm_setzero_pd(); } DMatrix3x2(__m128d aa,__m128d ab,__m128d ba,__m128d bb){ mA[0].v[0]=aa; mA[0].v[1]=ba; mA[1].v[0]=ab; mA[1].v[1]=bb; } ~DMatrix3x2(){}; __m128d GetV(int pair,int col) const{ return mA[col].v[pair]; } double &operator() (int row,int col){ return mA[col].d[row]; } double operator() (int row,int col) const{ return mA[col].d[row]; } // Matrix multiplication: (3x2) x (2x2) DMatrix3x2 operator*(const DMatrix2x2 &m2){ __m128d a11=_mm_set1_pd(m2(0,0)); // row,col __m128d a12=_mm_set1_pd(m2(0,1)); __m128d a21=_mm_set1_pd(m2(1,0)); __m128d a22=_mm_set1_pd(m2(1,1)); return DMatrix3x2(_mm_add_pd(_mm_mul_pd(GetV(0,0),a11), _mm_mul_pd(GetV(0,1),a21)), _mm_add_pd(_mm_mul_pd(GetV(0,0),a12), _mm_mul_pd(GetV(0,1),a22)), _mm_add_pd(_mm_mul_pd(GetV(1,0),a11), _mm_mul_pd(GetV(1,1),a21)), _mm_add_pd(_mm_mul_pd(GetV(1,0),a12), _mm_mul_pd(GetV(1,1),a22))); } void Print(){ cout << "DMatrix3x2:" <