#include #include #include using namespace std; class DMatrix2x1{ public: DMatrix2x1(){ mA.v=_mm_setzero_pd(); }; DMatrix2x1(const double x, const double y){ mA.v=_mm_setr_pd(x,y); } DMatrix2x1(__m128d v){ mA.v=v; } ~DMatrix2x1(){}; __m128d GetV() const{ return mA.v; } // Set the two components of the matrix void Set(const double c1,const double c2){ mA.v=_mm_setr_pd(c1,c2); } // Access by row double &operator() (int row){ return mA.d[row]; } double operator() (int row) const{ return mA.d[row]; } // Matrix subtraction DMatrix2x1 operator-(const DMatrix2x1 &m2) const{ return DMatrix2x1(_mm_sub_pd(GetV(),m2.GetV())); } void Print(){ cout << "DMatrix2x1:" <