20 #ifndef ACTION_MATRIX_MATRIX_PRODUCT_BIS
21 #define ACTION_MATRIX_MATRIX_PRODUCT_BIS
22 #include "utilities.h"
32 template<
class Interface>
37 static inline std::string
name(
void )
50 typename Interface::stl_matrix A_stl;
51 typename Interface::stl_matrix B_stl;
52 typename Interface::stl_matrix X_stl;
54 init_matrix<pseudo_random>(A_stl,
size);
55 init_matrix<pseudo_random>(B_stl,
size);
56 init_matrix<null_function>(X_stl,
size);
60 typename Interface::gene_matrix A_ref;
61 typename Interface::gene_matrix B_ref;
62 typename Interface::gene_matrix X_ref;
64 typename Interface::gene_matrix
A;
65 typename Interface::gene_matrix
B;
66 typename Interface::gene_matrix
X;
69 Interface::matrix_from_stl(A_ref,A_stl);
70 Interface::matrix_from_stl(B_ref,B_stl);
71 Interface::matrix_from_stl(X_ref,X_stl);
73 Interface::matrix_from_stl(
A,A_stl);
74 Interface::matrix_from_stl(
B,B_stl);
75 Interface::matrix_from_stl(
X,X_stl);
84 chronos.start_baseline(nb_calc);
95 while(chronos.check());
101 chronos.start(nb_calc);
109 Interface::matrix_matrix_product(
A,
B,
X,
size);
111 while(chronos.check());
113 chronos.report(
true);
115 double time=chronos.calculated_time/2000.0;
119 typename Interface::stl_matrix resu_stl(
size);
121 Interface::matrix_to_stl(
X,resu_stl);
125 typename Interface::real_type
error=
129 INFOS(
"WRONG CALCULATION...residual=" <<
error);
135 Interface::free_matrix(
A,
size);
136 Interface::free_matrix(
B,
size);
137 Interface::free_matrix(
X,
size);
139 Interface::free_matrix(A_ref,
size);
140 Interface::free_matrix(B_ref,
size);
141 Interface::free_matrix(X_ref,
size);