Kokkos Core Kernels Package Version of the Day
Loading...
Searching...
No Matches
Kokkos_DynRankView.hpp File Reference

Declaration and definition of Kokkos::DynRankView. More...

#include <Kokkos_Core.hpp>
#include <impl/Kokkos_Error.hpp>
#include <type_traits>

Go to the source code of this file.

Classes

struct  Kokkos::Impl::ViewToDynRankViewTag
 Assign compatible default mappings. More...

Namespaces

namespace  Kokkos::Impl
 ScopeGuard Some user scope issues have been identified with some Kokkos::finalize calls; ScopeGuard aims to correct these issues.

Functions

template<unsigned, typename iType0, class MapType>
KOKKOS_INLINE_FUNCTION bool Kokkos::Impl::dyn_rank_view_verify_operator_bounds (const iType0 &, const MapType &)
 Debug bounds-checking routines.
template<class ExecSpace, class DT, class... DP>
void Kokkos::deep_copy (const ExecSpace &e, const DynRankView< DT, DP... > &dst, typename ViewTraits< DT, DP... >::const_value_type &value, std::enable_if_t< std::is_same_v< typename ViewTraits< DT, DP... >::specialize, void > > *=nullptr)
 Deep copy a value from Host memory into a view.
template<class ExecSpace, class ST, class... SP>
void Kokkos::deep_copy (const ExecSpace &e, typename ViewTraits< ST, SP... >::non_const_value_type &dst, const DynRankView< ST, SP... > &src, std::enable_if_t< std::is_same_v< typename ViewTraits< ST, SP... >::specialize, void > > *=0)
 Deep copy into a value in Host memory from a view.
template<class ExecSpace, class DstType, class SrcType>
void Kokkos::deep_copy (const ExecSpace &exec_space, const DstType &dst, const SrcType &src, std::enable_if_t<(std::is_void_v< typename DstType::traits::specialize > &&std::is_void_v< typename SrcType::traits::specialize > &&(Kokkos::is_dyn_rank_view< DstType >::value||Kokkos::is_dyn_rank_view< SrcType >::value))> *=nullptr)
 A deep copy between views of the default specialization, compatible type, same rank, same contiguous layout.
template<class... ViewCtorArgs, class T, class... P>
void Kokkos::impl_resize (const Impl::ViewCtorProp< ViewCtorArgs... > &arg_prop, DynRankView< T, P... > &v, const size_t n0, const size_t n1, const size_t n2, const size_t n3, const size_t n4, const size_t n5, const size_t n6, const size_t n7)
 Resize a view with copying old data to new data at the corresponding indices.
template<class... ViewCtorArgs, class T, class... P>
void Kokkos::impl_realloc (DynRankView< T, P... > &v, const size_t n0, const size_t n1, const size_t n2, const size_t n3, const size_t n4, const size_t n5, const size_t n6, const size_t n7, const Impl::ViewCtorProp< ViewCtorArgs... > &arg_prop)
 Resize a view with copying old data to new data at the corresponding indices.

Detailed Description

Declaration and definition of Kokkos::DynRankView.

This header file declares and defines Kokkos::DynRankView and its related nonmember functions.

Definition in file Kokkos_DynRankView.hpp.

Function Documentation

◆ deep_copy() [1/3]

template<class ExecSpace, class DT, class... DP>
void Kokkos::deep_copy ( const ExecSpace & e,
const DynRankView< DT, DP... > & dst,
typename ViewTraits< DT, DP... >::const_value_type & value,
std::enable_if_t< std::is_same_v< typename ViewTraits< DT, DP... >::specialize, void > > * = nullptr )
inline

Deep copy a value from Host memory into a view.

Definition at line 1311 of file Kokkos_DynRankView.hpp.

◆ deep_copy() [2/3]

template<class ExecSpace, class ST, class... SP>
void Kokkos::deep_copy ( const ExecSpace & e,
typename ViewTraits< ST, SP... >::non_const_value_type & dst,
const DynRankView< ST, SP... > & src,
std::enable_if_t< std::is_same_v< typename ViewTraits< ST, SP... >::specialize, void > > * = 0 )
inline

Deep copy into a value in Host memory from a view.

Definition at line 1337 of file Kokkos_DynRankView.hpp.

◆ deep_copy() [3/3]

template<class ExecSpace, class DstType, class SrcType>
void Kokkos::deep_copy ( const ExecSpace & exec_space,
const DstType & dst,
const SrcType & src,
std::enable_if_t<(std::is_void_v< typename DstType::traits::specialize > &&std::is_void_v< typename SrcType::traits::specialize > &&(Kokkos::is_dyn_rank_view< DstType >::value||Kokkos::is_dyn_rank_view< SrcType >::value))> * = nullptr )
inline

A deep copy between views of the default specialization, compatible type, same rank, same contiguous layout.

A rank mismatch will error out in the attempt to convert to a View

Definition at line 1362 of file Kokkos_DynRankView.hpp.

◆ impl_resize()

template<class... ViewCtorArgs, class T, class... P>
void Kokkos::impl_resize ( const Impl::ViewCtorProp< ViewCtorArgs... > & arg_prop,
DynRankView< T, P... > & v,
const size_t n0,
const size_t n1,
const size_t n2,
const size_t n3,
const size_t n4,
const size_t n5,
const size_t n6,
const size_t n7 )
inline

Resize a view with copying old data to new data at the corresponding indices.

Definition at line 1728 of file Kokkos_DynRankView.hpp.

◆ impl_realloc()

template<class... ViewCtorArgs, class T, class... P>
void Kokkos::impl_realloc ( DynRankView< T, P... > & v,
const size_t n0,
const size_t n1,
const size_t n2,
const size_t n3,
const size_t n4,
const size_t n5,
const size_t n6,
const size_t n7,
const Impl::ViewCtorProp< ViewCtorArgs... > & arg_prop )
inline

Resize a view with copying old data to new data at the corresponding indices.

Definition at line 1807 of file Kokkos_DynRankView.hpp.