10 for (
unsigned int i=0;i<2;i++){
11 for (
unsigned int j=0;j<5;j++){
16 DMatrix2x5(
double a1,
double a2,
double a3,
double a4,
double a5,
17 double b1,
double b2,
double b3,
double b4,
double b5){
39 #define MUL5(i,j) mA[(i)][0]*m2(0,(j))+mA[(i)][1]*m2(1,(j))+mA[(i)][2]*m2(2,(j))+mA[(i)][3]*m2(3,(j))+mA[(i)][4]*m2(4,(j))
48 DMatrix2x5(
MUL5(0,0),
MUL5(0,1),
MUL5(0,2),
MUL5(0,3),
MUL5(0,4),
54 cout <<
"DMatrix2x5:" <<endl;
55 cout <<
" | 0 | 1 | 2 | 3 | 4 |" <<endl;
56 cout <<
"-------------------------------------------------------------------" <<endl;
57 for (
unsigned int i=0;i<2;i++){
58 cout <<
" "<< i <<
" |";
59 for (
unsigned int j=0;j<5;j++){
60 cout <<setw(11)<<setprecision(4)<<
mA[i][j] <<
" ";
80 mA[0].v=_mm_setzero_pd();
81 mA[1].v=_mm_setzero_pd();
82 mA[2].v=_mm_setzero_pd();
83 mA[3].v=_mm_setzero_pd();
84 mA[4].v=_mm_setzero_pd();
106 __m128d GetV(
const int col)
const{
121 return mA[col].d[row];
124 return mA[col].d[row];
132 _mm_add_pd(MUL1(1,0),
133 _mm_add_pd(MUL1(2,0),
134 _mm_add_pd(MUL1(3,0),MUL1(4,0))))),
135 _mm_add_pd(MUL1(0,1),
136 _mm_add_pd(MUL1(1,1),
137 _mm_add_pd(MUL1(2,1),
138 _mm_add_pd(MUL1(3,1),MUL1(4,1))))));
145 _mm_add_pd(MUL1(1,0),
146 _mm_add_pd(MUL1(2,0),
147 _mm_add_pd(MUL1(3,0),MUL1(4,0))))),
148 _mm_add_pd(MUL1(0,1),
149 _mm_add_pd(MUL1(1,1),
150 _mm_add_pd(MUL1(2,1),
151 _mm_add_pd(MUL1(3,1),MUL1(4,1))))),
152 _mm_add_pd(MUL1(0,2),
153 _mm_add_pd(MUL1(1,2),
154 _mm_add_pd(MUL1(2,2),
155 _mm_add_pd(MUL1(3,2),MUL1(4,2))))),
156 _mm_add_pd(MUL1(0,3),
157 _mm_add_pd(MUL1(1,3),
158 _mm_add_pd(MUL1(2,3),
159 _mm_add_pd(MUL1(3,3),MUL1(4,3))))),
160 _mm_add_pd(MUL1(0,4),
161 _mm_add_pd(MUL1(1,4),
162 _mm_add_pd(MUL1(2,4),
163 _mm_add_pd(MUL1(3,4),MUL1(4,4))))));
170 cout <<
"DMatrix2x5:" <<endl;
171 cout <<
" | 0 | 1 | 2 | 3 | 4 |" <<endl;
172 cout <<
"------------------------------------------------------------------" <<endl;
174 for (
unsigned int i=0;i<2;i++){
175 cout <<
" "<< i <<
" |";
176 for (
unsigned int j=0;j<5;j++){
177 cout << setw(11)<<setprecision(4) <<
mA[j].d[i] <<
" ";
DMatrix2x5(double a1, double a2, double a3, double a4, double a5, double b1, double b2, double b3, double b4, double b5)
#define ALIGNED_16_BLOCK_PTR(TYPE, NUM, PTR)
double & operator()(int row, int col)
DMatrix2x5 operator*(const DMatrix5x5 &m2) const
#define ALIGNED_16_BLOCK(TYPE, NUM, PTR)
DMatrix2x2 operator*(const DMatrix5x2 &m2) const