1 #include "../../../include/common/monolish_dense.hpp"
2 #include "../../../include/common/monolish_logger.hpp"
3 #include "../../../include/common/monolish_matrix.hpp"
4 #include "../../internal/monolish_internal.hpp"
13 set_row(coo.get_row());
14 set_col(coo.get_col());
15 set_nnz(get_row() * get_col());
16 val.resize(get_row() * get_col());
18 #pragma omp parallel for
19 for (
size_t i = 0; i < get_nnz(); i++) {
23 for (
size_t i = 0; i < coo.get_nnz(); i++) {
24 insert(coo.row_index[i], coo.col_index[i], coo.val[i]);
35 val.resize(mat.get_nnz());
42 if (mat.get_device_mem_stat()) {
43 throw std::runtime_error(
44 "error can not convert CRS->CRS when gpu_status == true");
47 internal::vcopy(get_nnz(), mat.val.data(), val.data(),
false);