9 for (
unsigned int i=0;i<4;i++)
mA[i]=0.;
28 for (
unsigned int i=0;i<4;i++){
34 for (
unsigned int i=0;i<4;i++){
45 for (
unsigned int i=0;i<4;i++){
58 return (isfinite(
mA[0]) && isfinite(
mA[1]) && isfinite(
mA[2]) && isfinite(
mA[3]));
62 cout <<
"DMatrix4x1:" <<endl;
63 cout <<
" | 0 |" <<endl;
64 cout <<
"----------------------" <<endl;
65 for (
unsigned int i=0;i<4;i++){
66 cout <<
" "<<i<<
" |" << setw(11)<<setprecision(4) <<
mA[i] << endl;
76 return DMatrix4x1(c*M(0),c*M(1),c*M(2),c*M(3));
88 for (
unsigned int j=0;j<2;j++){
89 mA->v[j]=_mm_setzero_pd();
98 DMatrix4x1(
double a1,
double a2,
double a3,
double a4)
108 __m128d GetV(
int pair)
const{
135 return DMatrix4x1(_mm_add_pd(GetV(0),m2.GetV(0)),
136 _mm_add_pd(GetV(1),m2.GetV(1)));
139 mA->v[0]=_mm_add_pd(GetV(0),m2.GetV(0));
140 mA->v[1]=_mm_add_pd(GetV(1),m2.GetV(1));
146 return DMatrix4x1(_mm_sub_pd(GetV(0),m2.GetV(0)),
147 _mm_sub_pd(GetV(1),m2.GetV(1)));
151 cout <<
"DMatrix4x1:" <<endl;
152 cout <<
" | 0 |" <<endl;
153 cout <<
"----------------------" <<endl;
154 for (
unsigned int i=0;i<4;i++){
155 cout <<
" "<<i<<
" |" << setw(11)<<setprecision(4) <<
mA->d[i] << endl;
172 scale=_mm_set1_pd(c);
174 _mm_mul_pd(scale,M.GetV(1)));
DMatrix2x1 operator*(const double c, const DMatrix2x1 &M)
#define ALIGNED_16_BLOCK_PTR(TYPE, NUM, PTR)
DMatrix4x1 & operator=(const DMatrix4x1 &m2)
#define ALIGNED_16_BLOCK_WITH_PTR(TYPE, NUM, PTR)
double & operator()(int row)
DMatrix4x1 operator+(const DMatrix4x1 &m2) const
DMatrix4x1(const DMatrix4x1 &m2)
DMatrix4x1(double a1, double a2, double a3, double a4)
DMatrix4x1 operator-(const DMatrix4x1 &m2) const
DMatrix4x1 & operator+=(const DMatrix4x1 &m2)
#define ALIGNED_16_BLOCK(TYPE, NUM, PTR)