1 #include "../../../include/common/monolish_dense.hpp"
2 #include "../../../include/common/monolish_logger.hpp"
3 #include "../../../include/common/monolish_matrix.hpp"
4 #include "../../../include/monolish_vml.hpp"
5 #include "../../internal/monolish_internal.hpp"
21 const T *vald = val.data();
23 if (get_device_mem_stat() ==
true && force_cpu ==
false) {
25 const size_t N = val.size();
27 for (
size_t i = 0; i < N; i++) {
28 printf(
"%f\n", vald[i]);
31 throw std::runtime_error(
32 "error USE_GPU is false, but get_device_mem_stat() == true");
35 for (
size_t i = 0; i < val.size(); i++) {
36 std::cout << vald[i] << std::endl;
48 std::ofstream ofs(filename);
50 throw std::runtime_error(
"error file cant open");
52 for (
const auto v : val) {
53 ofs << v << std::endl;