diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-03-05 08:11:47 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-03-05 08:11:47 +0000 |
commit | a72ff5abc1a259c4d4510437a53acd7d47dd6e19 (patch) | |
tree | ae3ea873466072d39c353b54dc1e1ebd4f83837e /bench/btl/actions | |
parent | 6a265063417db175eb436e6bcc0e3e74780a1b2f (diff) |
BTL: - patch from Victor (add ACML support)
- fix overflow issues
Diffstat (limited to 'bench/btl/actions')
-rw-r--r-- | bench/btl/actions/action_cholesky.hh | 10 | ||||
-rw-r--r-- | bench/btl/actions/action_hessenberg.hh | 4 | ||||
-rw-r--r-- | bench/btl/actions/action_lu_decomp.hh | 8 | ||||
-rw-r--r-- | bench/btl/actions/action_trisolve.hh | 2 | ||||
-rw-r--r-- | bench/btl/actions/action_trisolve_matrix.hh | 6 |
5 files changed, 15 insertions, 15 deletions
diff --git a/bench/btl/actions/action_cholesky.hh b/bench/btl/actions/action_cholesky.hh index 67495b9cb..a1a30977c 100644 --- a/bench/btl/actions/action_cholesky.hh +++ b/bench/btl/actions/action_cholesky.hh @@ -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 diff --git a/bench/btl/actions/action_hessenberg.hh b/bench/btl/actions/action_hessenberg.hh index 3cb5034e4..1de43c22c 100644 --- a/bench/btl/actions/action_hessenberg.hh +++ b/bench/btl/actions/action_hessenberg.hh @@ -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; } } diff --git a/bench/btl/actions/action_lu_decomp.hh b/bench/btl/actions/action_lu_decomp.hh index cf455e87f..147884e76 100644 --- a/bench/btl/actions/action_lu_decomp.hh +++ b/bench/btl/actions/action_lu_decomp.hh @@ -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 diff --git a/bench/btl/actions/action_trisolve.hh b/bench/btl/actions/action_trisolve.hh index f97f7dbc9..0d277eb77 100644 --- a/bench/btl/actions/action_trisolve.hh +++ b/bench/btl/actions/action_trisolve.hh @@ -130,7 +130,7 @@ private : typename Interface::gene_vector B; int _size; - int _cost; + double _cost; }; #endif diff --git a/bench/btl/actions/action_trisolve_matrix.hh b/bench/btl/actions/action_trisolve_matrix.hh index 18813a016..0fc2bb9ef 100644 --- a/bench/btl/actions/action_trisolve_matrix.hh +++ b/bench/btl/actions/action_trisolve_matrix.hh @@ -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); |