A slice of an array-of-structs-of-arrays with data access to a single multidimensional member.
More...
|
enum | { rank = std::rank<DataType>::value + 1
} |
|
using | slice_type |
| Slice type.
|
|
using | memory_space = typename MemorySpace::memory_space |
| Memory space.
|
|
using | execution_space = typename memory_space::execution_space |
| Default execution space.
|
|
using | memory_access_type = MemoryAccessType |
| Memory access type.
|
|
using | size_type = typename memory_space::size_type |
| Memory space size type.
|
|
using | index_type = Impl::Index<vector_length> |
| Index type.
|
|
using | view_wrapper |
| Kokkos view wrapper.
|
|
using | kokkos_view |
| Kokkos view type.
|
|
using | reference_type = typename kokkos_view::reference_type |
| View reference type alias.
|
|
using | value_type = typename kokkos_view::value_type |
| View value type alias.
|
|
using | pointer_type = typename kokkos_view::pointer_type |
| View pointer type alias.
|
|
using | view_layout = typename kokkos_view::array_layout |
| View array layout type alias.
|
|
using | default_access_slice |
| Default memory access slice type.
|
|
using | atomic_access_slice |
| Atomic memory access slice type.
|
|
using | random_access_slice |
| Random memory access slice type.
|
|
|
| Slice () |
| Default constructor.
|
|
| Slice (const pointer_type data, const size_type size, const size_type num_soa, const std::string &label="") |
| Constructor.
|
|
template<class MAT> |
| Slice (const Slice< DataType, MemorySpace, MAT, VectorLength, Stride > &rhs) |
| Shallow copy constructor for different memory spaces for assigning new memory access traits to the view.
|
|
template<class MAT> |
Slice & | operator= (const Slice< DataType, MemorySpace, MAT, VectorLength, Stride > &rhs) |
| Assignment operator for different memory spaces for assigning new memory access traits to the view.
|
|
std::string | label () const |
| Returns the data structure label.
|
|
KOKKOS_INLINE_FUNCTION size_type | size () const |
| Returns the total number tuples in the slice.
|
|
KOKKOS_INLINE_FUNCTION size_type | numSoA () const |
| Get the number of structs-of-arrays in the container.
|
|
KOKKOS_INLINE_FUNCTION size_type | arraySize (const size_type s) const |
| Get the size of the data array at a given struct member index.
|
|
template<typename U = DataType> |
KOKKOS_FORCEINLINE_FUNCTION std::enable_if<(0==std::rank< U >::value &&std::is_same< U, DataType >::value), reference_type >::type | access (const size_type s, const size_type a) const |
| 2d access for Rank 0
|
|
template<typename U = DataType> |
KOKKOS_FORCEINLINE_FUNCTION std::enable_if<(1==std::rank< U >::value &&std::is_same< U, DataType >::value), reference_type >::type | access (const size_type s, const size_type a, const size_type d0) const |
| 2d access for Rank 1
|
|
template<typename U = DataType> |
KOKKOS_FORCEINLINE_FUNCTION std::enable_if<(2==std::rank< U >::value &&std::is_same< U, DataType >::value), reference_type >::type | access (const size_type s, const size_type a, const size_type d0, const size_type d1) const |
| 2d access for Rank 2
|
|
template<typename U = DataType> |
KOKKOS_FORCEINLINE_FUNCTION std::enable_if<(3==std::rank< U >::value &&std::is_same< U, DataType >::value), reference_type >::type | access (const size_type s, const size_type a, const size_type d0, const size_type d1, const size_type d2) const |
| 2d access for Rank 3
|
|
template<typename U = DataType> |
KOKKOS_FORCEINLINE_FUNCTION std::enable_if<(0==std::rank< U >::value &&std::is_same< U, DataType >::value), reference_type >::type | operator() (const size_type i) const |
| 1d access for Rank 0
|
|
template<typename U = DataType> |
KOKKOS_FORCEINLINE_FUNCTION std::enable_if<(1==std::rank< U >::value &&std::is_same< U, DataType >::value), reference_type >::type | operator() (const size_type i, const size_type d0) const |
| 1d access for Rank 1
|
|
template<typename U = DataType> |
KOKKOS_FORCEINLINE_FUNCTION std::enable_if<(2==std::rank< U >::value &&std::is_same< U, DataType >::value), reference_type >::type | operator() (const size_type i, const size_type d0, const size_type d1) const |
| 1d access for Rank 2
|
|
template<typename U = DataType> |
KOKKOS_FORCEINLINE_FUNCTION std::enable_if<(3==std::rank< U >::value &&std::is_same< U, DataType >::value), reference_type >::type | operator() (const size_type i, const size_type d0, const size_type d1, const size_type d2) const |
| 1d access for Rank 3
|
|
KOKKOS_INLINE_FUNCTION pointer_type | data () const |
| Get a raw pointer to the data for this member.
|
|
KOKKOS_INLINE_FUNCTION constexpr size_type | viewRank () const |
| Get the rank of the raw data for this slice. This includes the struct dimension, array dimension, and all tuple slice dimensions.
|
|
KOKKOS_INLINE_FUNCTION size_type | extent (const size_type d) const |
| Get the extent of a given raw slice data dimension. This includes the struct dimension, array dimension, and all tuple slice dimensions.
|
|
KOKKOS_INLINE_FUNCTION size_type | stride (const size_type d) const |
| Get the stride of a given raw slice dimension. This includes the struct dimension, array dimension, and all tuple slice dimensions.
|
|
KOKKOS_INLINE_FUNCTION kokkos_view | view () const |
| Get the underlying Kokkos View managing the slice data.
|
|
template<typename DataType, typename MemorySpace, typename MemoryAccessType, int VectorLength, int Stride>
class Cabana::Slice< DataType, MemorySpace, MemoryAccessType, VectorLength, Stride >
A slice of an array-of-structs-of-arrays with data access to a single multidimensional member.