Class for converting between 1d and 2d aosoa indices.
More...
#include <Cabana_Index.hpp>
|
static KOKKOS_FORCEINLINE_FUNCTION constexpr std::size_t | s (const std::size_t i) |
| Given a tuple index get the AoSoA struct index.
|
|
static KOKKOS_FORCEINLINE_FUNCTION constexpr std::size_t | a (const std::size_t i) |
| Given a tuple index get the AoSoA array index.
|
|
static KOKKOS_FORCEINLINE_FUNCTION constexpr std::size_t | i (const std::size_t s, const std::size_t a) |
| Given a struct index and array index in an AoSoA get the tuple index.
|
|
|
static constexpr int | vector_length = VectorLength |
| Inner array size.
|
|
static constexpr int | vector_length_offset = ( vector_length - 1 ) |
| Array size offset.
|
|
static constexpr int | vector_length_binary_bits |
| Number of binary bits needed to hold the array size.
|
|
template<int VectorLength>
class Cabana::Impl::Index< VectorLength >
Class for converting between 1d and 2d aosoa indices.
- Template Parameters
-
VectorLength | The inner array size of the AoSoA. |
◆ a()
template<int VectorLength>
static KOKKOS_FORCEINLINE_FUNCTION constexpr std::size_t Cabana::Impl::Index< VectorLength >::a |
( |
const std::size_t | i | ) |
|
|
inlinestaticconstexpr |
Given a tuple index get the AoSoA array index.
- Parameters
-
- Returns
- The index of the array index in the struct in which the tuple is located.
◆ i()
template<int VectorLength>
static KOKKOS_FORCEINLINE_FUNCTION constexpr std::size_t Cabana::Impl::Index< VectorLength >::i |
( |
const std::size_t | s, |
|
|
const std::size_t | a ) |
|
inlinestaticconstexpr |
Given a struct index and array index in an AoSoA get the tuple index.
- Parameters
-
s | The struct index. |
a | The array index. |
- Returns
- The tuple index.
◆ s()
template<int VectorLength>
static KOKKOS_FORCEINLINE_FUNCTION constexpr std::size_t Cabana::Impl::Index< VectorLength >::s |
( |
const std::size_t | i | ) |
|
|
inlinestaticconstexpr |
Given a tuple index get the AoSoA struct index.
- Parameters
-
- Returns
- The index of the struct in which the tuple is located.
◆ vector_length_binary_bits
template<int VectorLength>
Initial value:=
Impl::LogBase2<vector_length>::value
Number of binary bits needed to hold the array size.
The documentation for this class was generated from the following file: