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"
18 col_ind = coo.col_index;
21 row_ptr.resize(get_row() + 1, 0.0);
25 for (
size_t i = 0; i < coo.get_nnz(); i++) {
27 if ((
int)c_row == coo.row_index[i]) {
28 row_ptr[c_row + 1] = i + 1;
31 row_ptr[c_row + 1] = i + 1;
44 val.resize(crs.get_nnz());
45 col_ind.resize(crs.get_nnz());
46 row_ptr.resize(crs.get_row() + 1);
51 structure_hash = crs.get_hash();
53 if (crs.get_device_mem_stat() ==
true) {
54 throw std::runtime_error(
55 "error can not convert CRS->CRS when gpu_status == true");
57 internal::vcopy(crs.row_ptr.size(), crs.row_ptr.data(), row_ptr.data(),
59 internal::vcopy(crs.col_ind.size(), crs.col_ind.data(), col_ind.data(),
61 internal::vcopy(crs.val.size(), crs.val.data(), val.data(),
false);