Structured index space. More...
#include <Cabana_Grid_IndexSpace.hpp>
Public Member Functions | |
IndexSpace () | |
Default constructor. | |
template<typename Scalar> | |
IndexSpace (const std::initializer_list< Scalar > &size) | |
Initializer list size constructor. | |
template<typename Scalar> | |
IndexSpace (const std::initializer_list< Scalar > &min, const std::initializer_list< Scalar > &max) | |
Initializer list range constructor. | |
IndexSpace (const std::array< long, N > &size) | |
Vector size constructor. | |
IndexSpace (const std::array< long, N > &min, const std::array< long, N > &max) | |
Vector range constructor. | |
KOKKOS_INLINE_FUNCTION bool | operator== (const IndexSpace< N > &rhs) const |
Comparison operator. | |
KOKKOS_INLINE_FUNCTION bool | operator!= (const IndexSpace< N > &rhs) const |
Comparison operator. | |
KOKKOS_INLINE_FUNCTION long | min (const long dim) const |
Get the minimum index in a given dimension. | |
KOKKOS_INLINE_FUNCTION Kokkos::Array< long, Rank > | min () const |
Get the minimum indices in all dimensions. | |
KOKKOS_INLINE_FUNCTION long | max (const long dim) const |
Get the maximum index in a given dimension. | |
KOKKOS_INLINE_FUNCTION Kokkos::Array< long, Rank > | max () const |
Get the maximum indices in all dimensions. | |
KOKKOS_INLINE_FUNCTION Kokkos::pair< long, long > | range (const long dim) const |
Get the range of a given dimension. | |
KOKKOS_INLINE_FUNCTION long | rank () const |
Get the number of dimensions. | |
KOKKOS_INLINE_FUNCTION long | extent (const long dim) const |
Get the extent of a given dimension. | |
KOKKOS_INLINE_FUNCTION long | size () const |
Get the total size of the index space. | |
KOKKOS_INLINE_FUNCTION bool | inRange (const long index[N]) const |
Determine if a set of indices is within the range of the index space. | |
Static Public Attributes | |
static constexpr long | Rank = N |
Number of dimensions. | |
Protected Attributes | |
Kokkos::Array< long, Rank > | _min |
Minimum index bounds. | |
Kokkos::Array< long, Rank > | _max |
Maximum index bounds. | |
Structured index space.