A slice of an array-of-structs-of-arrays with data access to a single multidimensional member.
More...
|
|
| 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.