aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/btl/libs/gmm
diff options
context:
space:
mode:
Diffstat (limited to 'bench/btl/libs/gmm')
-rw-r--r--bench/btl/libs/gmm/gmm_interface.hh10
-rw-r--r--bench/btl/libs/gmm/main.cpp12
2 files changed, 15 insertions, 7 deletions
diff --git a/bench/btl/libs/gmm/gmm_interface.hh b/bench/btl/libs/gmm/gmm_interface.hh
index 6a81fe969..7ef41c0cf 100644
--- a/bench/btl/libs/gmm/gmm_interface.hh
+++ b/bench/btl/libs/gmm/gmm_interface.hh
@@ -106,6 +106,10 @@ public :
gmm::add(gmm::scaled(X,coef), Y);
}
+ static inline void axpby(real a, const gene_vector & X, real b, gene_vector & Y, int N){
+ gmm::add(gmm::scaled(X,a), gmm::scaled(Y,b), Y);
+ }
+
static inline void copy_matrix(const gene_matrix & source, gene_matrix & cible, int N){
gmm::copy(source,cible);
}
@@ -114,6 +118,12 @@ public :
gmm::copy(source,cible);
}
+ static inline void trisolve_lower(const gene_matrix & L, const gene_vector& B, gene_vector & X, int N){
+ gmm::copy(B,X);
+ gmm::lower_tri_solve(L, X, false);
+ }
+
+
};
#endif
diff --git a/bench/btl/libs/gmm/main.cpp b/bench/btl/libs/gmm/main.cpp
index a05fd1b46..26fdf76bd 100644
--- a/bench/btl/libs/gmm/main.cpp
+++ b/bench/btl/libs/gmm/main.cpp
@@ -18,13 +18,7 @@
#include "utilities.h"
#include "gmm_interface.hh"
#include "bench.hh"
-#include "action_matrix_vector_product.hh"
-#include "action_matrix_matrix_product.hh"
-#include "action_axpy.hh"
-#include "action_lu_solve.hh"
-#include "action_ata_product.hh"
-#include "action_aat_product.hh"
-#include "action_atv_product.hh"
+#include "basic_actions.hh"
BTL_MAIN;
@@ -32,12 +26,16 @@ int main()
{
bench<Action_axpy<gmm_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);
+ bench<Action_axpby<gmm_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);
+
bench<Action_matrix_vector_product<gmm_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);
bench<Action_atv_product<gmm_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);
+
bench<Action_matrix_matrix_product<gmm_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);
bench<Action_ata_product<gmm_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);
bench<Action_aat_product<gmm_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);
+ bench<Action_trisolve<gmm_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);
//bench<Action_lu_solve<blitz_LU_solve_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT);
return 0;