|
| | NgpViewT ()=default |
| | Default constructor.
|
| | NgpViewT (const std::string &label, const size_t n0=KOKKOS_IMPL_CTOR_DEFAULT_ARG, const size_t n1=KOKKOS_IMPL_CTOR_DEFAULT_ARG, const size_t n2=KOKKOS_IMPL_CTOR_DEFAULT_ARG, const size_t n3=KOKKOS_IMPL_CTOR_DEFAULT_ARG, const size_t n4=KOKKOS_IMPL_CTOR_DEFAULT_ARG, const size_t n5=KOKKOS_IMPL_CTOR_DEFAULT_ARG, const size_t n6=KOKKOS_IMPL_CTOR_DEFAULT_ARG, const size_t n7=KOKKOS_IMPL_CTOR_DEFAULT_ARG) |
| | Allocates device and host views with the specified dimensions.
|
| template<class... P> |
| | NgpViewT (const Kokkos::Impl::ViewCtorProp< P... > &arg_prop, std::enable_if_t<!Kokkos::Impl::ViewCtorProp< P... >::has_pointer, size_t > const n0=KOKKOS_IMPL_CTOR_DEFAULT_ARG, const size_t n1=KOKKOS_IMPL_CTOR_DEFAULT_ARG, const size_t n2=KOKKOS_IMPL_CTOR_DEFAULT_ARG, const size_t n3=KOKKOS_IMPL_CTOR_DEFAULT_ARG, const size_t n4=KOKKOS_IMPL_CTOR_DEFAULT_ARG, const size_t n5=KOKKOS_IMPL_CTOR_DEFAULT_ARG, const size_t n6=KOKKOS_IMPL_CTOR_DEFAULT_ARG, const size_t n7=KOKKOS_IMPL_CTOR_DEFAULT_ARG) |
| | Allocates device and host views using a property object.
|
| template<typename DT, typename... DP> |
| | NgpViewT (const NgpViewT< DT, DP... > &src) |
| | Shallow copy constructor.
|
| template<class DT, class... DP, class Arg0, class... Args> |
| | NgpViewT (const NgpViewT< DT, DP... > &src, const Arg0 &arg0, Args... args) |
| | Constructs a subview of an existing NgpViewT.
|
| | NgpViewT (const t_dev &d_view_, const t_host &h_view_) |
| | Constructs an NgpViewT from existing device and host views.
|
| void | modify_on_host () |
| | Mark the host view as modified.
|
| void | modify_on_device () |
| | Mark the device view as modified.
|
| template<typename Space> |
| void | modify_on () |
| | Abstract method for marking the view as modified.
|
| void | sync_to_host () |
| | Synchronize the host view to the device view if needed.
|
| void | sync_to_device () |
| | Synchronize the device view to the host view if needed.
|
| template<typename Space> |
| void | sync_to () |
| | Abstract method for synchronizing the view.
|
| bool | need_sync_to_host () const |
| | Return if we need to sync to the host.
|
| bool | need_sync_to_device () const |
| | Return if we need to sync to the device.
|
| template<typename Space> |
| bool | need_sync_to () const |
| | Abstract method for checking if we need to sync.
|
template<class DataType, class... Properties>
class mundy::NgpViewT< DataType, Properties >
NgpViewT inherits from Kokkos::DualView, exposing all its functionality while adding convenience methods for marking and synchronizing modifications between host and device. This class replicates the constructors of DualView and provides detailed documentation for users who may be new to Kokkos views.
template<class DataType, class... Properties>
template<class... P>
| mundy::NgpViewT< DataType, Properties >::NgpViewT |
( |
const Kokkos::Impl::ViewCtorProp< P... > & | arg_prop, |
|
|
std::enable_if_t<!Kokkos::Impl::ViewCtorProp< P... >::has_pointer, size_t > const | n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, |
|
|
const size_t | n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, |
|
|
const size_t | n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, |
|
|
const size_t | n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, |
|
|
const size_t | n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, |
|
|
const size_t | n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, |
|
|
const size_t | n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, |
|
|
const size_t | n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ) |
|
inline |
This constructor lets you wrap up various construction properties (such as memory space, label, or initialization behavior) in a ViewCtorProp object. The subsequent integer arguments specify the dimensions of the view, similar to the previous constructor.
- Template Parameters
-
| P | A parameter pack representing properties wrapped in the ViewCtorProp. |
- Parameters
-
| arg_prop | A ViewCtorProp object encapsulating construction properties. |
| n0 | The size of the first dimension. |
| n1 | (Optional) The size of the second dimension. |
| n2 | (Optional) The size of the third dimension. |
| n3 | (Optional) The size of the fourth dimension. |
| n4 | (Optional) The size of the fifth dimension. |
| n5 | (Optional) The size of the sixth dimension. |
| n6 | (Optional) The size of the seventh dimension. |
| n7 | (Optional) The size of the eighth dimension. |
template<class DataType, class... Properties>
template<class DT, class... DP, class Arg0, class... Args>
| mundy::NgpViewT< DataType, Properties >::NgpViewT |
( |
const NgpViewT< DT, DP... > & | src, |
|
|
const Arg0 & | arg0, |
|
|
Args... | args ) |
|
inline |
This constructor allows you to create a new NgpViewT that is a subview of an existing one. This is especially useful for extracting lower-dimensional slices from higher-dimensional views. The additional arguments specify the indices or ranges to select.
- Template Parameters
-
| DT | The data type of the source view. |
| DP | The properties of the source view. |
| Arg0 | The type of the first argument for slicing. |
| Args | The types of additional slicing arguments. |
- Parameters
-
| src | The source NgpViewT from which the subview is created. |
| arg0 | The first argument for defining the subview. |
| args | Additional arguments for defining the subview. |