10 for (
unsigned int i=0;i<5;i++){
11 for (
unsigned int j=0;j<2;j++){
16 DMatrix5x2(
double A1,
double A2,
double B1,
double B2,
double C1,
double C2,
17 double D1,
double D2,
double E1,
double E2){
41 for (
unsigned int i=0;i<5;i++){
53 mA[1][0]*m2(0)+
mA[1][1]*m2(1),
54 mA[2][0]*m2(0)+
mA[2][1]*m2(1),
55 mA[3][0]*m2(0)+
mA[3][1]*m2(1),
56 mA[4][0]*m2(0)+
mA[4][1]*m2(1));
61 mA[0][0]*m2(0,1)+
mA[0][1]*m2(1,1),
63 mA[1][0]*m2(0,0)+
mA[1][1]*m2(1,0),
64 mA[1][0]*m2(0,1)+
mA[1][1]*m2(1,1),
66 mA[2][0]*m2(0,0)+
mA[2][1]*m2(1,0),
67 mA[2][0]*m2(0,1)+
mA[2][1]*m2(1,1),
69 mA[3][0]*m2(0,0)+
mA[3][1]*m2(1,0),
70 mA[3][0]*m2(0,1)+
mA[3][1]*m2(1,1),
72 mA[4][0]*m2(0,0)+
mA[4][1]*m2(1,0),
73 mA[4][0]*m2(0,1)+
mA[4][1]*m2(1,1)
78 cout <<
"DMatrix5x2:" <<endl;
79 cout <<
" | 0 | 1 |" <<endl;
80 cout <<
"----------------------------------" <<endl;
81 for (
unsigned int i=0;i<5;i++){
82 cout <<
" "<<i<<
" |"<< setw(11)<<setprecision(4) <<
mA[i][0]
83 << setw(11)<<setprecision(4) <<
mA[i][1]<< endl;
101 for (
unsigned int j=0;j<3;j++){
102 mA[0].v[j]=_mm_setzero_pd();
103 mA[1].v[j]=_mm_setzero_pd();
107 __m128d ba, __m128d bb,
108 __m128d ca, __m128d cb)
121 mA[0].v[0]=dm.
mA[0].v[0];
122 mA[0].v[1]=dm.
mA[0].v[1];
123 mA[0].v[2]=dm.
mA[0].v[2];
124 mA[1].v[0]=dm.
mA[1].v[0];
125 mA[1].v[1]=dm.
mA[1].v[1];
126 mA[1].v[2]=dm.
mA[1].v[2];
130 __m128d GetV(
int pair,
int col)
const{
131 return mA[col].v[pair];
133 void SetV(
int pair,
int col, __m128d v){
139 mA[0].v[0]=dm.
mA[0].v[0];
140 mA[0].v[1]=dm.
mA[0].v[1];
141 mA[0].v[2]=dm.
mA[0].v[2];
142 mA[1].v[0]=dm.
mA[1].v[0];
143 mA[1].v[1]=dm.
mA[1].v[1];
144 mA[1].v[2]=dm.
mA[1].v[2];
149 return mA[col].d[row];
152 return mA[col].d[row];
159 a=_mm_set1_pd(m2(0));
160 b=_mm_set1_pd(m2(1));
162 _mm_mul_pd(GetV(0,1),b)),
163 _mm_add_pd(_mm_mul_pd(GetV(1,0),a),
164 _mm_mul_pd(GetV(1,1),b)),
165 _mm_add_pd(_mm_mul_pd(GetV(2,0),a),
166 _mm_mul_pd(GetV(2,1),b)));
175 a11=_mm_set1_pd(m2(0,0));
176 a12=_mm_set1_pd(m2(0,1));
177 a21=_mm_set1_pd(m2(1,0));
178 a22=_mm_set1_pd(m2(1,1));
180 _mm_mul_pd(GetV(0,1),a21)),
181 _mm_add_pd(_mm_mul_pd(GetV(0,0),a12),
182 _mm_mul_pd(GetV(0,1),a22)),
183 _mm_add_pd(_mm_mul_pd(GetV(1,0),a11),
184 _mm_mul_pd(GetV(1,1),a21)),
185 _mm_add_pd(_mm_mul_pd(GetV(1,0),a12),
186 _mm_mul_pd(GetV(1,1),a22)),
187 _mm_add_pd(_mm_mul_pd(GetV(2,0),a11),
188 _mm_mul_pd(GetV(2,1),a21)),
189 _mm_add_pd(_mm_mul_pd(GetV(2,0),a12),
190 _mm_mul_pd(GetV(2,1),a22)));
198 cout <<
"DMatrix5x2:" <<endl;
199 cout <<
" | 0 | 1 |" <<endl;
200 cout <<
"----------------------------------" <<endl;
201 for (
unsigned int i=0;i<5;i++){
202 cout <<
" "<<i<<
" |"<< setw(11)<<setprecision(4) <<
mA[0].d[i]
203 << setw(11)<<setprecision(4) <<
mA[1].d[i]<< endl;
double & operator()(int row, int col)
#define ALIGNED_16_BLOCK_PTR(TYPE, NUM, PTR)
#define ALIGNED_16_BLOCK_WITH_PTR(TYPE, NUM, PTR)
DMatrix5x2 & operator=(const DMatrix5x2 &m2)
DMatrix5x2(double A1, double A2, double B1, double B2, double C1, double C2, double D1, double D2, double E1, double E2)
DMatrix5x1 operator*(const DMatrix2x1 &m2)
DMatrix5x2 operator*(const DMatrix2x2 &m2)
#define ALIGNED_16_BLOCK(TYPE, NUM, PTR)