18 #ifndef MTL4_INTERFACE_HH 19 #define MTL4_INTERFACE_HH 21 #include <boost/numeric/mtl/mtl.hpp> 22 #include <boost/numeric/mtl/utility/range_generator.hpp> 38 typedef mtl::dense2D<real, mtl::matrix::parameters<mtl::tag::col_major> >
gene_matrix;
41 static inline std::string
name() {
return "mtl4"; }
52 A.change_dim(A_stl[0].
size(), A_stl.size());
54 for (
int j=0;
j<A_stl.size() ;
j++){
55 for (
int i=0;
i<A_stl[
j].size() ;
i++){
62 B.change_dim(B_stl.size());
63 for (
int i=0;
i<B_stl.size() ;
i++){
69 for (
int i=0;
i<B_stl.size() ;
i++){
76 for (
int j=0;
j<
N;
j++){
78 for (
int i=0;
i<
N;
i++){
99 static inline void aat_product(
const gene_matrix &
A, gene_matrix &
X,
int N){
107 static inline void atv_product(gene_matrix &
A, gene_vector &
B, gene_vector &
X,
int N){
111 static inline void axpy(
const real coef,
const gene_vector &
X, gene_vector &
Y,
int N){
130 static inline void trisolve_lower(
const gene_matrix &
L,
const gene_vector&
B, gene_vector &
X,
int N){
131 X = lower_trisolve(L, B);
134 static inline void copy_matrix(
const gene_matrix & source, gene_matrix & cible,
int N){
138 static inline void copy_vector(
const gene_vector & source, gene_vector & cible,
int N){
static void vector_from_stl(gene_vector &B, stl_vector &B_stl)
mtl::dense_vector< real > gene_vector
static void copy_matrix(const gene_matrix &source, gene_matrix &cible, int N)
static void axpy(const real coef, const gene_vector &X, gene_vector &Y, int N)
static void axpby(real a, const gene_vector &X, real b, gene_vector &Y, int N)
mtl::dense2D< real, mtl::matrix::parameters< mtl::tag::col_major > > gene_matrix
std::vector< real > stl_vector
static void aat_product(const gene_matrix &A, gene_matrix &X, int N)
static void atv_product(gene_matrix &A, gene_vector &B, gene_vector &X, int N)
std::vector< stl_vector > stl_matrix
static void trisolve_lower(const gene_matrix &L, const gene_vector &B, gene_vector &X, int N)
static void transposed_matrix_matrix_product(const gene_matrix &A, const gene_matrix &B, gene_matrix &X, int N)
static void copy_vector(const gene_vector &source, gene_vector &cible, int N)
static void matrix_to_stl(gene_matrix &A, stl_matrix &A_stl)
static void free_matrix(gene_matrix &A, int N)
static void free_vector(gene_vector &B)
static std::string name()
static void matrix_from_stl(gene_matrix &A, stl_matrix &A_stl)
static void vector_to_stl(gene_vector &B, stl_vector &B_stl)
static void matrix_vector_product(gene_matrix &A, gene_vector &B, gene_vector &X, int N)
static void matrix_matrix_product(const gene_matrix &A, const gene_matrix &B, gene_matrix &X, int N)