monolish  0.14.0
MONOlithic LIner equation Solvers for Highly-parallel architecture
crs_scal.cpp
Go to the documentation of this file.
1 #include "../../../../include/monolish_blas.hpp"
2 #include "../../../internal/monolish_internal.hpp"
3 
4 namespace monolish {
5 
6 namespace {
7 template <typename T> void mscal_core(const T alpha, matrix::CRS<T> &A) {
8  Logger &logger = Logger::get_instance();
9  logger.func_in(monolish_func);
10 
11  internal::vmul(A.get_nnz(), A.val.data(), alpha, A.val.data(),
12  A.get_device_mem_stat());
13 
14  logger.func_out();
15 }
16 } // namespace
17 
18 namespace blas {
19 void mscal(const double alpha, matrix::CRS<double> &A) { mscal_core(alpha, A); }
20 
21 void mscal(const float alpha, matrix::CRS<float> &A) { mscal_core(alpha, A); }
22 } // namespace blas
23 } // namespace monolish
monolish_func
#define monolish_func
Definition: monolish_logger.hpp:9
monolish::blas::mscal
void mscal(const double alpha, matrix::Dense< double > &A)
Densematrix scal: A = alpha * A.
Definition: dense_scal.cpp:20
monolish
Definition: monolish_matrix_blas.hpp:9
monolish::Logger::get_instance
static Logger & get_instance()
Definition: monolish_logger.hpp:42
monolish::matrix::CRS
Compressed Row Storage (CRS) format Matrix.
Definition: monolish_coo.hpp:29