10 for (
unsigned int i=0;i<2;i++){
11 for (
unsigned int j=0;j<3;j++){
17 double c21,
double c22,
double c23){
37 mA[0][0]*m2(0,1)+
mA[0][1]*m2(1,1)+
mA[0][2]*m2(2,1),
38 mA[1][0]*m2(0,0)+
mA[1][1]*m2(1,0)+
mA[1][2]*m2(2,0),
39 mA[1][0]*m2(0,1)+
mA[1][1]*m2(1,1)+
mA[1][2]*m2(2,1)
45 mA[0][0]*m2(0,1)+
mA[0][1]*m2(1,1)+
mA[0][2]*m2(2,1),
46 mA[0][0]*m2(0,2)+
mA[0][1]*m2(1,2)+
mA[0][2]*m2(2,2),
47 mA[1][0]*m2(0,0)+
mA[1][1]*m2(1,0)+
mA[1][2]*m2(2,0),
48 mA[1][0]*m2(0,1)+
mA[1][1]*m2(1,1)+
mA[1][2]*m2(2,1),
49 mA[1][0]*m2(0,2)+
mA[1][1]*m2(1,2)+
mA[1][2]*m2(2,2)
55 cout <<
"DMatrix2x3:" <<endl;
56 cout <<
" | 0 | 1 | 2 |" <<endl;
57 cout <<
"-----------------------------------------------" <<endl;
59 for (
unsigned int i=0;i<2;i++){
60 cout <<
" "<< i <<
" |";
61 for (
unsigned int j=0;j<3;j++){
62 cout << setw(11)<<setprecision(4) <<
mA[i][j] <<
" ";
82 mA[0].v=_mm_setzero_pd();
83 mA[1].v=_mm_setzero_pd();
84 mA[2].v=_mm_setzero_pd();
102 __m128d GetV(
int col)
const{
115 return mA[col].d[row];
118 return mA[col].d[row];
122 #define MUL1(i,j) _mm_mul_pd(GetV((i)),_mm_set1_pd(m2((i),(j))))
127 return DMatrix2x2(_mm_add_pd(MUL1(0,0),_mm_add_pd(MUL1(1,0),MUL1(2,0))),
128 _mm_add_pd(MUL1(0,1),_mm_add_pd(MUL1(1,1),MUL1(2,1))));
134 return DMatrix2x3(_mm_add_pd(MUL1(0,0),_mm_add_pd(MUL1(1,0),MUL1(2,0))),
135 _mm_add_pd(MUL1(0,1),_mm_add_pd(MUL1(1,1),MUL1(2,1))),
136 _mm_add_pd(MUL1(0,2),_mm_add_pd(MUL1(1,2),MUL1(2,2))));
143 cout <<
"DMatrix2x3:" <<endl;
144 cout <<
" | 0 | 1 | 2 |" <<endl;
145 cout <<
"-----------------------------------------------" <<endl;
147 for (
unsigned int i=0;i<2;i++){
148 cout <<
" "<< i <<
" |";
149 for (
unsigned int j=0;j<3;j++){
150 cout << setw(11)<<setprecision(4) <<
mA[j].d[i] <<
" ";
DMatrix2x2 operator*(const DMatrix3x2 &m2)
#define ALIGNED_16_BLOCK_PTR(TYPE, NUM, PTR)
double & operator()(int row, int col)
DMatrix2x3(double c11, double c12, double c13, double c21, double c22, double c23)
DMatrix2x3 operator*(const DMatrix3x3 &m2)
#define ALIGNED_16_BLOCK(TYPE, NUM, PTR)