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"
21 if (get_device_mem_stat() ==
true && force_cpu ==
false) {
23 const T *vald = val.data();
24 const int *indexd = col_ind.data();
25 const int *ptrd = row_ptr.data();
28 for (
size_t i = 0; i < get_row(); i++) {
29 for (
size_t j = (
size_t)ptrd[i]; j < (size_t)ptrd[i + 1]; j++) {
30 printf(
"%lu %d %f\n", i + 1, indexd[j] + 1, vald[j]);
34 throw std::runtime_error(
35 "error USE_GPU is false, but get_device_mem_stat() == true");
38 for (
size_t i = 0; i < get_row(); i++) {
39 for (
size_t j = (
size_t)row_ptr[i]; j < (size_t)row_ptr[i + 1]; j++) {
40 std::cout << i + 1 <<
" " << col_ind[j] + 1 <<
" " << val[j]