10 for (
unsigned int i=0;i<2;i++){
11 for (
unsigned int j=0;j<4;j++){
16 DMatrix2x4(
double c11,
double c12,
double c13,
double c14,
17 double c21,
double c22,
double c23,
double c24){
32 for (
unsigned int i=0;i<4;i++){
49 mA[0][0]*m2(0,1)+
mA[0][1]*m2(1,1)+
mA[0][2]*m2(2,1)+
mA[0][3]*m2(3,1),
50 mA[1][0]*m2(0,0)+
mA[1][1]*m2(1,0)+
mA[1][2]*m2(2,0)+
mA[1][3]*m2(3,0),
51 mA[1][0]*m2(0,1)+
mA[1][1]*m2(1,1)+
mA[1][2]*m2(2,1)+
mA[1][3]*m2(3,1));
57 mA[0][0]*m2(0,1)+
mA[0][1]*m2(1,1)+
mA[0][2]*m2(2,1)+
mA[0][3]*m2(3,1),
58 mA[0][0]*m2(0,2)+
mA[0][1]*m2(1,2)+
mA[0][2]*m2(2,2)+
mA[0][3]*m2(3,2),
59 mA[0][0]*m2(0,3)+
mA[0][1]*m2(1,3)+
mA[0][2]*m2(2,3)+
mA[0][3]*m2(3,3),
60 mA[1][0]*m2(0,0)+
mA[1][1]*m2(1,0)+
mA[1][2]*m2(2,0)+
mA[1][3]*m2(3,0),
61 mA[1][0]*m2(0,1)+
mA[1][1]*m2(1,1)+
mA[1][2]*m2(2,1)+
mA[1][3]*m2(3,1),
62 mA[1][0]*m2(0,2)+
mA[1][1]*m2(1,2)+
mA[1][2]*m2(2,2)+
mA[1][3]*m2(3,2),
63 mA[1][0]*m2(0,3)+
mA[1][1]*m2(1,3)+
mA[1][2]*m2(2,3)+
mA[1][3]*m2(3,3));
67 cout <<
"DMatrix2x4:" <<endl;
68 cout <<
" | 0 | 1 | 2 | 3 |" <<endl;
69 cout <<
"------------------------------------------------------" <<endl;
71 for (
unsigned int i=0;i<2;i++){
72 cout <<
" "<< i <<
" |";
73 for (
unsigned int j=0;j<4;j++){
74 cout << setw(11)<<setprecision(4) <<
mA[i][j] <<
" ";
92 mA[0].v=_mm_setzero_pd();
93 mA[1].v=_mm_setzero_pd();
94 mA[2].v=_mm_setzero_pd();
95 mA[3].v=_mm_setzero_pd();
115 __m128d GetV(
int col)
const{
129 return mA[col].d[row];
132 return mA[col].d[row];
136 #define MUL1(i,j) _mm_mul_pd(GetV((i)),_mm_set1_pd(m2((i),(j))))
140 _mm_add_pd(MUL1(1,0),
141 _mm_add_pd(MUL1(2,0),
143 _mm_add_pd(MUL1(0,1),
144 _mm_add_pd(MUL1(1,1),
145 _mm_add_pd(MUL1(2,1),
152 _mm_add_pd(MUL1(1,0),
153 _mm_add_pd(MUL1(2,0),
155 _mm_add_pd(MUL1(0,1),
156 _mm_add_pd(MUL1(1,1),
157 _mm_add_pd(MUL1(2,1),
159 _mm_add_pd(MUL1(0,2),
160 _mm_add_pd(MUL1(1,2),
161 _mm_add_pd(MUL1(2,2),
163 _mm_add_pd(MUL1(0,3),
164 _mm_add_pd(MUL1(1,3),
165 _mm_add_pd(MUL1(2,3),
173 cout <<
"DMatrix2x4:" <<endl;
174 cout <<
" | 0 | 1 | 2 | 3 |" <<endl;
175 cout <<
"----------------------------------------------------------" <<endl;
177 for (
unsigned int i=0;i<2;i++){
178 for (
unsigned int j=0;j<4;j++){
179 cout <<
mA[j].d[i] <<
" ";
DMatrix2x2 operator*(const DMatrix4x2 &m2)
#define ALIGNED_16_BLOCK_PTR(TYPE, NUM, PTR)
DMatrix2x4 & operator=(const DMatrix2x4 &m2)
DMatrix2x4(double c11, double c12, double c13, double c14, double c21, double c22, double c23, double c24)
double & operator()(int row, int col)
DMatrix2x4 operator*(const DMatrix4x4 &m2)
#define ALIGNED_16_BLOCK(TYPE, NUM, PTR)