22 #include "utilities.h" 31 template<
class Interface>
41 typename Interface::stl_matrix tmp;
42 init_matrix<pseudo_random>(A_stl,_size);
43 init_vector<pseudo_random>(B_stl,_size);
44 init_vector<pseudo_random>(X_stl,_size);
45 init_vector<null_function>(resu_stl,_size);
48 Interface::matrix_from_stl(A_ref,A_stl);
49 Interface::matrix_from_stl(
A,A_stl);
50 Interface::vector_from_stl(B_ref,B_stl);
51 Interface::vector_from_stl(
B,B_stl);
52 Interface::vector_from_stl(X_ref,X_stl);
53 Interface::vector_from_stl(
X,X_stl);
59 INFOS(
"illegal call to Action_syr2 Copy Ctor");
65 Interface::free_matrix(
A,_size);
66 Interface::free_vector(
B);
67 Interface::free_vector(
X);
68 Interface::free_matrix(A_ref,_size);
69 Interface::free_vector(B_ref);
70 Interface::free_vector(X_ref);
75 static inline std::string
name(
void )
81 return 2.0*_size*_size;
86 Interface::copy_vector(B_ref,
B,_size);
87 Interface::copy_vector(X_ref,
X,_size);
98 Interface::vector_to_stl(
X,resu_stl);
102 typename Interface::real_type
error=
106 INFOS(
"WRONG CALCULATION...residual=" << error);
114 typename Interface::stl_matrix
A_stl;
115 typename Interface::stl_vector
B_stl;
116 typename Interface::stl_vector
X_stl;
119 typename Interface::gene_matrix
A_ref;
120 typename Interface::gene_vector
B_ref;
121 typename Interface::gene_vector
X_ref;
123 typename Interface::gene_matrix
A;
124 typename Interface::gene_vector
B;
125 typename Interface::gene_vector
X;
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
int EIGEN_BLAS_FUNC() syr2(const char *uplo, const int *n, const RealScalar *palpha, const RealScalar *px, const int *incx, const RealScalar *py, const int *incy, RealScalar *pc, const int *ldc)
Interface::gene_matrix A_ref
Interface::stl_vector resu_stl
Interface::stl_vector X_stl
Interface::gene_vector B_ref
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
BTL_DONT_INLINE void calculate(void)
BTL_DONT_INLINE void initialize(void)
BTL_DONT_INLINE Action_syr2(int size)
#define BTL_ASM_COMMENT(X)
static std::string name(void)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
BTL_DONT_INLINE void check_result(void)
static real norm_diff(const stl_vector &A, const stl_vector &B)
void copy_matrix(MatrixType &m)
Interface::stl_vector B_stl
BTL_DONT_INLINE ~Action_syr2(void)
Interface::stl_matrix A_stl
Interface::gene_vector X_ref
static void syr2(gene_matrix &A, gene_vector &B, gene_vector &X, int N)
Action_syr2(const Action_syr2 &)