monolish
0.14.0
MONOlithic LIner equation Solvers for Highly-parallel architecture
src
blas
matrix
copy
crs_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::CRS<F> &A, matrix::CRS<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_structure
(A, C));
15
assert(
util::is_same_device_mem_stat
(A, C));
16
17
internal::vcopy(A.get_nnz(), A.val.data(), C.val.data(),
18
A.get_device_mem_stat());
19
20
logger.util_out();
21
}
22
}
// namespace
23
24
namespace
blas {
25
26
void
copy
(
const
matrix::CRS<double>
&A,
matrix::CRS<double>
&C) {
27
copy_core(A, C);
28
}
29
void
copy
(
const
matrix::CRS<float>
&A,
matrix::CRS<float>
&C) {
30
copy_core(A, C);
31
}
32
33
}
// namespace blas
34
}
// 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:358
monolish_func
#define monolish_func
Definition:
monolish_logger.hpp:9
monolish::util::is_same_structure
bool is_same_structure(const T A, const U B)
compare matrix structure
Definition:
monolish_common.hpp:268
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:431
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: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
Generated by
1.8.17