* Kokkos View owning a host buffer used for MPI communication.
*/
// FIXME Should we move this somewhere else?
+#if KOKKOS_VERSION < 40000
Kokkos::View<T *, Kokkos::HostSpace> values_host_buffer;
+#else
+ Kokkos::View<T *, Kokkos::SharedHostPinnedSpace> values_host_buffer;
+#endif
/**
* Kokkos View owning the data on the @ref GlossDevice "device" (unless @p values_sm_ptr is used).
MemorySpaceData<T, MemorySpace>::MemorySpaceData()
: values_host_buffer(
(dealii::internal::ensure_kokkos_initialized(),
+# if KOKKOS_VERSION < 40000
Kokkos::View<T *, Kokkos::HostSpace>("host buffer", 0)))
+# else
+ Kokkos::View<T *, Kokkos::SharedHostPinnedSpace>("host pinned buffer",
+ 0)))
+# endif
, values(Kokkos::View<T *, typename MemorySpace::kokkos_space>(
"memoryspace data",
0))
Kokkos::pair<size_type, size_type> range(
partitioner->locally_owned_size(),
partitioner->locally_owned_size() + partitioner->n_ghost_indices());
- if (data.values_host_buffer.size() > 0)
- Kokkos::deep_copy(Kokkos::subview(data.values_host_buffer, range), 0);
if (data.values.size() > 0)
Kokkos::deep_copy(Kokkos::subview(data.values, range), 0);
// uses a view of the array and thus we need the data on the host to
// outlive the scope of the function.
data.values_host_buffer =
+# if KOKKOS_VERSION < 40000
Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace{},
data.values);
+# else
+ Kokkos::create_mirror_view_and_copy(Kokkos::SharedHostPinnedSpace{},
+ data.values);
+# endif
partitioner->import_from_ghosted_array_start(
operation,
communication_channel,
// uses a view of the array and thus we need the data on the host to
// outlive the scope of the function.
data.values_host_buffer =
+# if KOKKOS_VERSION < 40000
Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace{},
data.values);
+# else
+ Kokkos::create_mirror_view_and_copy(Kokkos::SharedHostPinnedSpace{},
+ data.values);
+# endif
partitioner->export_to_ghosted_array_start<Number, MemorySpace::Host>(
communication_channel,