monolish  0.14.2
MONOlithic LIner equation Solvers for Highly-parallel architecture
dense_copy.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 F>
8 void copy_core(const matrix::Dense<F> &A, matrix::Dense<F> &C) {
9  Logger &logger = Logger::get_instance();
10  logger.util_in(monolish_func);
11 
12  // err
13  assert(util::is_same_size(A, C));
14  assert(util::is_same_device_mem_stat(A, C));
15 
16  internal::vcopy(A.get_nnz(), A.val.data(), C.val.data(),
17  A.get_device_mem_stat());
18 
19  logger.util_out();
20 }
21 } // namespace
22 
23 namespace blas {
24 
26  copy_core(A, C);
27 }
29  copy_core(A, C);
30 }
31 
32 } // namespace blas
33 } // namespace monolish
monolish::util::is_same_size
bool is_same_size(const T &x, const U &y)
compare size of vector or 1Dview (same as is_same_structure())
Definition: monolish_common.hpp:377
monolish_func
#define monolish_func
Definition: monolish_logger.hpp:9
monolish::matrix::Dense
Dense format Matrix.
Definition: monolish_coo.hpp:35
monolish::util::is_same_device_mem_stat
bool is_same_device_mem_stat(const T &arg1, const U &arg2)
compare same device memory status
Definition: monolish_common.hpp:454
monolish::blas::copy
void copy(const matrix::Dense< double > &A, matrix::Dense< double > &C)
Dense matrix copy (C=A)
Definition: dense_copy.cpp:25
monolish
Definition: monolish_matrix_blas.hpp:10
monolish::Logger::get_instance
static Logger & get_instance()
Definition: monolish_logger.hpp:42