monolish  0.14.0
MONOlithic LIner equation Solvers for Highly-parallel architecture
dense_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 
8 template <typename T> void mscal_core(const T alpha, matrix::Dense<T> &A) {
9  Logger &logger = Logger::get_instance();
10  logger.func_in(monolish_func);
11 
12  internal::vmul(A.get_nnz(), A.val.data(), alpha, A.val.data(),
13  A.get_device_mem_stat());
14 
15  logger.func_out();
16 }
17 } // namespace
18 
19 namespace blas {
20 void mscal(const double alpha, matrix::Dense<double> &A) {
21  mscal_core(alpha, A);
22 }
23 
24 void mscal(const float alpha, matrix::Dense<float> &A) { mscal_core(alpha, A); }
25 } // namespace blas
26 
27 } // namespace monolish
monolish_func
#define monolish_func
Definition: monolish_logger.hpp:9
monolish::matrix::Dense
Dense format Matrix.
Definition: monolish_coo.hpp:28
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