48 std::vector<float> h_f32_buf;
49 std::vector<double> h_f64_buf;
59 io_detail::CheckedT<T>* get_buf_dev(std::size_t buf_size)
61 if constexpr (std::is_same_v<T, float>) {
62 return io_detail::resize_and_get_(this->d_f32_buf, buf_size);
63 }
else if constexpr (std::is_same_v<T, double>) {
64 return io_detail::resize_and_get_(this->d_f64_buf, buf_size);
66 CHOLLA_ERROR(
"unrecognized type");
71 io_detail::CheckedT<T>* get_buf_host(std::size_t buf_size)
73 if constexpr (std::is_same_v<T, float>) {
74 return io_detail::resize_and_get_(this->h_f32_buf, buf_size);
75 }
else if constexpr (std::is_same_v<T, double>) {
76 return io_detail::resize_and_get_(this->h_f64_buf, buf_size);
78 CHOLLA_ERROR(
"unrecognized type");