From 763b502a9b8255241f66fcf6d6c2b796d70f2beb Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Wed, 5 Feb 2025 14:02:46 -0500 Subject: [PATCH] Document DualView::view_[host|device] --- docs/source/API/containers/DualView.rst | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/source/API/containers/DualView.rst b/docs/source/API/containers/DualView.rst index 22fcdf20c..a0effbfdc 100644 --- a/docs/source/API/containers/DualView.rst +++ b/docs/source/API/containers/DualView.rst @@ -41,11 +41,11 @@ Usage Device> view_type a("A", n, m); - Kokkos::deep_copy(a.d_view, 1); + Kokkos::deep_copy(a.view_device(), 1); a.template modify(); a.template sync(); - Kokkos::deep_copy(a.h_view, 2); + Kokkos::deep_copy(a.view_host(), 2); a.template modify(); a.template sync(); @@ -124,11 +124,11 @@ Description .. cppkokkos:member:: t_dev d_view - The view instance on the *device* + The view instance on the *device*, public access deprecated from Kokkos 4.6 on. .. cppkokkos:member:: t_host h_view - The view instance on the *host* + The view instance on the *host*, public access deprecated from Kokkos 4.6 on. .. cppkokkos:member:: t_modified_flags modified_flags @@ -195,6 +195,14 @@ Description - and if you want to get the host mirror of that View, do this: - ``typedef typename Kokkos::HostSpace::execution_space host_device_type; typename dual_view_type::t_host hostView = DV.view ();`` + .. cppkokkos:function:: const t_host& view_host() const; + + * Return the host-accessible View, before Kokkos 4.6, return the View by value. + + .. cppkokkos:function:: const t_dev& view_device() const; + + * Return the View on the device, before Kokkos 4.6, return the View by value. + .. cppkokkos:function:: template void sync(const typename Impl::enable_if<(std::is_same::value) || (std::is_same::value), int>::type& = 0); .. cppkokkos:function:: template void sync(const typename Impl::enable_if<(!std::is_same::value) || (std::is_same::value), int>::type& = 0);