Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document DualView::view_[host|device] #628

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions docs/source/API/containers/DualView.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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<typename view_type::execution_space>();
a.template sync<typename view_type::host_mirror_space>();

Kokkos::deep_copy(a.h_view, 2);
Kokkos::deep_copy(a.view_host(), 2);
a.template modify<typename ViewType::host_mirror_space>();
a.template sync<typename ViewType::execution_space>();

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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<host_device_type> ();``

.. 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 <class Device> void sync(const typename Impl::enable_if<(std::is_same<typename traits::data_type, typename traits::non_const_data_type>::value) || (std::is_same<Device, int>::value), int>::type& = 0);

.. cppkokkos:function:: template <class Device> void sync(const typename Impl::enable_if<(!std::is_same<typename traits::data_type, typename traits::non_const_data_type>::value) || (std::is_same<Device, int>::value), int>::type& = 0);
Expand Down