9 for (
unsigned int i=0;i<2;i++){
10 for (
unsigned int j=0;j<3;j++){
16 double C1,
double C2){
35 for (
unsigned int i=0;i<3;i++){
45 mA[1][0]*m2(0)+
mA[1][1]*m2(1),
46 mA[2][0]*m2(0)+
mA[2][1]*m2(1)
54 mA[0][0]*m2(0,1)+
mA[0][1]*m2(1,1),
55 mA[1][0]*m2(0,0)+
mA[1][1]*m2(1,0),
56 mA[1][0]*m2(0,1)+
mA[1][1]*m2(1,1),
57 mA[2][0]*m2(0,0)+
mA[2][1]*m2(1,0),
58 mA[2][0]*m2(0,1)+
mA[2][1]*m2(1,1)
62 cout <<
"DMatrix3x2:" <<endl;
63 cout <<
" | 0 | 1 |" <<endl;
64 cout <<
"-----|-----------|-----------|" <<endl;
65 for (
unsigned int i=0;i<3;i++){
66 cout <<
" "<<i<<
" |"<<setw(11)<<setprecision(4) <<
mA[i][0] <<
" "
67 <<setw(11)<<setprecision(4)<<
mA[i][1]<< endl;
84 mA[0].v[0]=_mm_setzero_pd();
85 mA[1].v[0]=_mm_setzero_pd();
86 mA[0].v[1]=_mm_setzero_pd();
87 mA[1].v[1]=_mm_setzero_pd();
89 DMatrix3x2(__m128d aa, __m128d ab, __m128d ba, __m128d bb)
99 double a21,
double a22,
100 double a31,
double a32)
115 mA[0].v[0]=dm.
mA[0].v[0];
116 mA[0].v[1]=dm.
mA[0].v[1];
117 mA[1].v[0]=dm.
mA[1].v[0];
118 mA[1].v[1]=dm.
mA[1].v[1];
122 __m128d GetV(
int pair,
int col)
const{
123 return mA[col].v[pair];
128 mA[0].v[0]=dm.
mA[0].v[0];
129 mA[0].v[1]=dm.
mA[0].v[1];
130 mA[1].v[0]=dm.
mA[1].v[0];
131 mA[1].v[1]=dm.
mA[1].v[1];
136 return mA[col].d[row];
139 return mA[col].d[row];
149 a11=_mm_set1_pd(m2(0,0));
150 a12=_mm_set1_pd(m2(0,1));
151 a21=_mm_set1_pd(m2(1,0));
152 a22=_mm_set1_pd(m2(1,1));
154 _mm_mul_pd(GetV(0,1),a21)),
155 _mm_add_pd(_mm_mul_pd(GetV(0,0),a12),
156 _mm_mul_pd(GetV(0,1),a22)),
157 _mm_add_pd(_mm_mul_pd(GetV(1,0),a11),
158 _mm_mul_pd(GetV(1,1),a21)),
159 _mm_add_pd(_mm_mul_pd(GetV(1,0),a12),
160 _mm_mul_pd(GetV(1,1),a22)));
164 cout <<
"DMatrix3x2:" <<endl;
165 cout <<
" | 0 | 1 |" <<endl;
166 cout <<
"-----|-----------|-----------|" <<endl;
167 for (
unsigned int i=0;i<3;i++){
168 cout <<
" "<<i<<
" |"<<setw(11)<<setprecision(4) <<
mA[0].d[i] <<
" "
169 <<setw(11)<<setprecision(4)<<
mA[1].d[i]<< endl;
double & operator()(int row, int col)
#define ALIGNED_16_BLOCK_PTR(TYPE, NUM, PTR)
DMatrix3x2 operator*(const DMatrix2x2 &m2)
DMatrix3x2(double A1, double A2, double B1, double B2, double C1, double C2)
#define ALIGNED_16_BLOCK_WITH_PTR(TYPE, NUM, PTR)
DMatrix3x1 operator*(const DMatrix2x1 &m2)
#define ALIGNED_16_BLOCK(TYPE, NUM, PTR)
DMatrix3x2 & operator=(const DMatrix3x2 &m2)