mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
BTL: - patch from Victor (add ACML support)
- fix overflow issues
This commit is contained in:
@@ -43,7 +43,7 @@ public :
|
||||
init_matrix<pseudo_random>(tmp,_size);
|
||||
init_matrix<null_function>(X_stl,_size);
|
||||
STL_interface<typename Interface::real_type>::ata_product(tmp,X_stl,_size);
|
||||
|
||||
|
||||
init_matrix<null_function>(C_stl,_size);
|
||||
init_matrix<null_function>(resu_stl,_size);
|
||||
|
||||
@@ -55,7 +55,7 @@ public :
|
||||
_cost = 0;
|
||||
for (int j=0; j<_size; ++j)
|
||||
{
|
||||
int r = std::max(_size - j -1,0);
|
||||
double r = std::max(_size - j -1,0);
|
||||
_cost += 2*(r*j+r+j);
|
||||
}
|
||||
}
|
||||
@@ -104,10 +104,10 @@ public :
|
||||
Interface::matrix_to_stl(C,resu_stl);
|
||||
|
||||
// STL_interface<typename Interface::real_type>::cholesky(X_stl,C_stl,_size);
|
||||
//
|
||||
//
|
||||
// typename Interface::real_type error=
|
||||
// STL_interface<typename Interface::real_type>::norm_diff(C_stl,resu_stl);
|
||||
//
|
||||
//
|
||||
// if (error>1.e-6){
|
||||
// INFOS("WRONG CALCULATION...residual=" << error);
|
||||
// exit(0);
|
||||
@@ -126,7 +126,7 @@ private :
|
||||
typename Interface::gene_matrix C;
|
||||
|
||||
int _size;
|
||||
int _cost;
|
||||
double _cost;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -52,8 +52,8 @@ public :
|
||||
_cost = 0;
|
||||
for (int j=0; j<_size-2; ++j)
|
||||
{
|
||||
int r = std::max(0,_size-j-1);
|
||||
int b = std::max(0,_size-j-2);
|
||||
double r = std::max(0,_size-j-1);
|
||||
double b = std::max(0,_size-j-2);
|
||||
_cost += 6 + 3*b + r*r*4 + r*_size*4;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public :
|
||||
|
||||
// STL vector initialization
|
||||
init_matrix<pseudo_random>(X_stl,_size);
|
||||
|
||||
|
||||
init_matrix<null_function>(C_stl,_size);
|
||||
init_matrix<null_function>(resu_stl,_size);
|
||||
|
||||
@@ -96,10 +96,10 @@ public :
|
||||
Interface::matrix_to_stl(C,resu_stl);
|
||||
|
||||
// STL_interface<typename Interface::real_type>::lu_decomp(X_stl,C_stl,_size);
|
||||
//
|
||||
//
|
||||
// typename Interface::real_type error=
|
||||
// STL_interface<typename Interface::real_type>::norm_diff(C_stl,resu_stl);
|
||||
//
|
||||
//
|
||||
// if (error>1.e-6){
|
||||
// INFOS("WRONG CALCULATION...residual=" << error);
|
||||
// exit(0);
|
||||
@@ -118,7 +118,7 @@ private :
|
||||
typename Interface::gene_matrix C;
|
||||
|
||||
int _size;
|
||||
int _cost;
|
||||
double _cost;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -130,7 +130,7 @@ private :
|
||||
typename Interface::gene_vector B;
|
||||
|
||||
int _size;
|
||||
int _cost;
|
||||
double _cost;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -125,12 +125,12 @@ public :
|
||||
// calculation check
|
||||
|
||||
// Interface::matrix_to_stl(X,resu_stl);
|
||||
//
|
||||
//
|
||||
// STL_interface<typename Interface::real_type>::matrix_matrix_product(A_stl,B_stl,X_stl,_size);
|
||||
//
|
||||
//
|
||||
// typename Interface::real_type error=
|
||||
// STL_interface<typename Interface::real_type>::norm_diff(X_stl,resu_stl);
|
||||
//
|
||||
//
|
||||
// if (error>1.e-6){
|
||||
// INFOS("WRONG CALCULATION...residual=" << error);
|
||||
// // exit(1);
|
||||
|
||||
Reference in New Issue
Block a user