31 #ifndef ELEMENTWISE_PRODUCT_IMPL_H_
32 #define ELEMENTWISE_PRODUCT_IMPL_H_
43 #include <viennacl/linalg/matrix_operations.hpp>
44 #endif // HAVE_VIENNACL
52 namespace implementation
58 template <enum Backend,
class Matrix>
62 typedef typename Matrix::Scalar
T;
65 static void compute(Matrix A, Matrix B, Matrix C);
71 template <>
template <
class Matrix>
74 typedef typename Matrix::Scalar
T;
85 C_eig = A_eig.array() * B_eig.array();
93 template <>
template <
class Matrix>
96 typedef typename Matrix::Scalar
T;
99 static void compute(CGPUMatrix<T> A, CGPUMatrix<T> B, CGPUMatrix<T> C)
101 C.vcl_matrix() = viennacl::linalg::element_prod(A.vcl_matrix(), B.vcl_matrix());
105 #endif // HAVE_VIENNACL
112 #endif // ELEMENTWISE_PRODUCT_IMPL_H_
static void compute(Matrix A, Matrix B, Matrix C)
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > MatrixXt
Eigen::Matrix< T, Eigen::Dynamic, 1 > VectorXt
void elementwise_product(Matrix A, Matrix B, Matrix C)
all of classes and functions are contained in the shogun namespace
static void compute(SGMatrix< T > A, SGMatrix< T > B, SGMatrix< T > C)