Cabana 0.8.0-dev
 
Loading...
Searching...
No Matches
Cabana::Grid::IndexSpace< N > Class Template Reference

Structured index space. More...

#include <Cabana_Grid_IndexSpace.hpp>

Inheritance diagram for Cabana::Grid::IndexSpace< N >:

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, Rankmin () 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, Rankmax () 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.
 

Detailed Description

template<long N>
class Cabana::Grid::IndexSpace< N >

Structured index space.


The documentation for this class was generated from the following file: