62 const Kokkos::View<double*, execution_space> my_view(Kokkos::view_alloc(Kokkos::WithoutInitializing, this->exec,
"my nice 1D view"), 5);
63 Kokkos::parallel_for(Kokkos::RangePolicy<execution_space>(this->exec, 0, 1),
DeepAssign1D{my_view});
66 std::ostringstream oss;
68 EXPECT_EQ(oss.str(),
"[1.5, 96, 8.6, 456, 456.15]");
90 const Kokkos::View<double*, execution_space> my_view(Kokkos::view_alloc(Kokkos::WithoutInitializing, this->exec,
"my nice 1D view"), 5);
91 Kokkos::parallel_for(Kokkos::RangePolicy<execution_space>(this->exec, 0, 1),
DeepAssign1DFormatting{my_view});
94 std::ostringstream oss;
95 oss << std::scientific;
98 EXPECT_EQ(oss.str(),
"[1.500000000000e+00, 9.600000000000e+01, 8.600000000000e+00, 4.560000000000e+02, 4.561500000000e+17]");
119 const Kokkos::View<double**, execution_space> my_view(Kokkos::view_alloc(Kokkos::WithoutInitializing, this->exec,
"my nice 2D view"), 2, 2);
120 Kokkos::parallel_for(Kokkos::RangePolicy<execution_space>(this->exec, 0, 1),
DeepAssign2D{my_view});
123 std::ostringstream oss;
125 EXPECT_EQ(oss.str(),
"[[1, 2], [3, 4]]");