43 #include <viennacl/linalg/matrix_operations.hpp>
44 #include <viennacl/linalg/vector_operations.hpp>
45 #endif // HAVE_VIENNACL
53 namespace implementation
57 template <enum Backend,
class Matrix>
61 typedef typename Matrix::Scalar
T;
64 static void compute(Matrix A, Matrix B, Matrix C, T alpha, T beta);
68 template <
class Matrix>
69 struct scale<Backend::EIGEN3, Matrix>
72 typedef typename Matrix::Scalar
T;
86 B_eig = alpha * A_eig;
95 B_eig = alpha * A_eig;
102 template <
class Matrix>
103 struct scale<Backend::VIENNACL, Matrix>
106 typedef typename Matrix::Scalar
T;
109 static void compute(CGPUMatrix<T> A, CGPUMatrix<T> B, T alpha)
111 B.vcl_matrix() = alpha*A.vcl_matrix();
115 static void compute(CGPUVector<T> A, CGPUVector<T> B, T alpha)
117 B.vcl_vector() = alpha*A.vcl_vector();
121 #endif // HAVE_VIENNACL
128 #endif // SCALE_IMPL_H_
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > MatrixXt
static void compute(SGMatrix< T > A, SGMatrix< T > B, T alpha)
static void compute(SGVector< T > A, SGVector< T > B, T alpha)
all of classes and functions are contained in the shogun namespace
void scale(Matrix A, Matrix B, typename Matrix::Scalar alpha)
static void compute(Matrix A, Matrix B, Matrix C, T alpha, T beta)
Eigen::Matrix< T, Eigen::Dynamic, 1 > VectorXt