20 #ifndef ACTION_MATRIX_MATRIX_PRODUCT 21 #define ACTION_MATRIX_MATRIX_PRODUCT 22 #include "utilities.h" 31 template<
class Interface>
40 MESSAGE(
"Action_matrix_matrix_product Ctor");
44 init_matrix<pseudo_random>(A_stl,_size);
45 init_matrix<pseudo_random>(B_stl,_size);
46 init_matrix<null_function>(X_stl,_size);
47 init_matrix<null_function>(resu_stl,_size);
51 Interface::matrix_from_stl(A_ref,A_stl);
52 Interface::matrix_from_stl(B_ref,B_stl);
53 Interface::matrix_from_stl(X_ref,X_stl);
55 Interface::matrix_from_stl(
A,A_stl);
56 Interface::matrix_from_stl(
B,B_stl);
57 Interface::matrix_from_stl(
X,X_stl);
65 INFOS(
"illegal call to Action_matrix_matrix_product Copy Ctor");
73 MESSAGE(
"Action_matrix_matrix_product Dtor");
77 Interface::free_matrix(
A,_size);
78 Interface::free_matrix(
B,_size);
79 Interface::free_matrix(
X,_size);
81 Interface::free_matrix(A_ref,_size);
82 Interface::free_matrix(B_ref,_size);
83 Interface::free_matrix(X_ref,_size);
89 static inline std::string
name(
void )
95 return 2.0*_size*_size*_size;
107 Interface::matrix_matrix_product(
A,
B,
X,_size);
115 Interface::matrix_to_stl(
X,resu_stl);
117 typename Interface::real_type
error=
120 INFOS(
"WRONG CALCULATION...residual=" << error);
128 typename Interface::stl_matrix
A_stl;
129 typename Interface::stl_matrix
B_stl;
130 typename Interface::stl_matrix
X_stl;
133 typename Interface::gene_matrix
A_ref;
134 typename Interface::gene_matrix
B_ref;
135 typename Interface::gene_matrix
X_ref;
137 typename Interface::gene_matrix
A;
138 typename Interface::gene_matrix
B;
139 typename Interface::gene_matrix
X;
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
Interface::stl_matrix X_stl
Interface::gene_matrix X_ref
Action_matrix_matrix_product(const Action_matrix_matrix_product &)
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Interface::gene_matrix A_ref
Interface::stl_matrix A_stl
static void matrix_matrix_product(const gene_matrix &A, const gene_matrix &B, gene_matrix &X, int N)
Interface::gene_matrix B_ref
Interface::stl_matrix resu_stl
Array< double, 1, 3 > e(1./3., 0.5, 2.)
~Action_matrix_matrix_product(void)
static std::string name(void)
Interface::stl_matrix B_stl
static real norm_diff(const stl_vector &A, const stl_vector &B)
void copy_matrix(MatrixType &m)
Action_matrix_matrix_product(int size)