27 auto data = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), view);
28 std::ofstream fout(filename);
29 for (
idx_t i = 0; i <
idx_c(data.extent(0)); ++i)
31 fout << data(i) << std::endl;
38 auto data = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), view);
39 std::ofstream fout(filename);
40 for (
idx_t i = 0; i <
idx_c(data.extent(0)); ++i)
42 for (
idx_t j = 0; j <
idx_c(data.extent(1)); ++j)
44 fout << data(i, j) <<
" ";
void dumpView(const std::string &filename, const ScalarView &view)
Definition dumpView.hpp:25
Definition BerendsenBarostat.cpp:18
Kokkos::View< real_t * > ScalarView
Definition datatypes.hpp:159
KOKKOS_INLINE_FUNCTION constexpr idx_t idx_c(const T &val)
Definition datatypes.hpp:93
Kokkos::View< real_t ** > MultiView
Definition datatypes.hpp:161
int64_t idx_t
Definition datatypes.hpp:91