9 #ifndef TENSOR_INTERFACE_HH 10 #define TENSOR_INTERFACE_HH 12 #include <unsupported/Eigen/CXX11/Tensor> 16 using namespace Eigen;
32 static inline std::string
name(
void )
44 for (
unsigned int j=0;
j<A_stl.size() ;
j++){
45 for (
unsigned int i=0;
i<A_stl[
j].size() ;
i++){
54 for (
unsigned int i=0;
i<B_stl.size() ;
i++){
60 for (
unsigned int i=0;
i<B_stl.size() ;
i++){
68 for (
int j=0;
j<
N;
j++){
70 for (
int i=0;
i<
N;
i++){
79 X = A.contract(B, dims);
85 X = A.contract(B, dims);
88 static inline void axpy(
real coef,
const gene_vector &
X, gene_vector &
Y,
int ){
89 Y += X.constant(coef) *
X;
93 Y = X.constant(a)*X + Y.constant(b)*
Y;
#define EIGEN_MAKESTRING(a)
std::vector< real > stl_vector
static BTL_DONT_INLINE void vector_from_stl(gene_vector &B, stl_vector &B_stl)
static void free_vector(gene_vector &)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(const array< Index, NumIndices > &indices)
static std::string name(void)
Namespace containing all symbols from the Eigen library.
static BTL_DONT_INLINE void matrix_from_stl(gene_matrix &A, stl_matrix &A_stl)
Eigen::Tensor< real, 2 >::Index Index
Eigen::Tensor< real, 1 > gene_vector
#define EIGEN_DONT_INLINE
static void matrix_matrix_product(const gene_matrix &A, const gene_matrix &B, gene_matrix &X, int)
Tensor< float, 1 >::DimensionPair DimPair
static EIGEN_DONT_INLINE void copy_matrix(const gene_matrix &source, gene_matrix &cible, int)
internal::traits< Self >::Index Index
static EIGEN_DONT_INLINE void copy_vector(const gene_vector &source, gene_vector &cible, int)
Eigen::Tensor< real, 2 > gene_matrix
static void axpy(real coef, const gene_vector &X, gene_vector &Y, int)
EIGEN_DEVICE_FUNC void resize(const array< Index, NumIndices > &dimensions)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & coeff(const array< Index, NumIndices > &indices) const
static void axpby(real a, const gene_vector &X, real b, gene_vector &Y, int)
static void matrix_vector_product(const gene_matrix &A, const gene_vector &B, gene_vector &X, int)
static BTL_DONT_INLINE void vector_to_stl(gene_vector &B, stl_vector &B_stl)
static void free_matrix(gene_matrix &, int)
static BTL_DONT_INLINE void matrix_to_stl(gene_matrix &A, stl_matrix &A_stl)
std::vector< stl_vector > stl_matrix