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

Index space with tile as unit; _min and _max forms the tile range. Note this is for sparse grid only, mainly used in sparse halo impl. More...

#include <Cabana_Grid_SparseIndexSpace.hpp>

Inheritance diagram for Cabana::Grid::TileIndexSpace< N, cellBitsPerTileDim, >:
Collaboration diagram for Cabana::Grid::TileIndexSpace< N, cellBitsPerTileDim, >:

Public Member Functions

 TileIndexSpace ()
 brief Default constructor.
 
 TileIndexSpace (const std::initializer_list< long > &size)
 Other constructors.
 
 TileIndexSpace (const std::initializer_list< long > &min, const std::initializer_list< long > &max)
 Other constructors.
 
template<typename... Params>
 TileIndexSpace (Params &&... pars)
 Other constructors.
 
KOKKOS_INLINE_FUNCTION long min (const long dim) const
 Get the minimum index in a given dimension.
 
KOKKOS_INLINE_FUNCTION long max (const long dim) const
 Get the maximum index in a given dimension.
 
KOKKOS_INLINE_FUNCTION Kokkos::Array< long, Rankmin () const
 Get the minimum indices in all dimensions.
 
KOKKOS_INLINE_FUNCTION Kokkos::Array< long, Rankmax () const
 Get the maximum indices in all dimensions.
 
KOKKOS_FORCEINLINE_FUNCTION long sizeTile () const
 Get the total number of tiles of the index space.
 
KOKKOS_FORCEINLINE_FUNCTION long sizeCell () const
 Get the total number of cells of the index space.
 
template<int NSD = N>
KOKKOS_FORCEINLINE_FUNCTION std::enable_if_t< 3==NSD, bool > tileInRange (const long tile_i, const long tile_j, const long tile_k) const
 Determine if given tile indices is within the range of the index space.
 
template<int NSD = N>
KOKKOS_FORCEINLINE_FUNCTION std::enable_if_t< 3==NSD, bool > cellInRange (const long cell_i, const long cell_j, const long cell_k) const
 Determine if given cell indices is within the range of the index space.
 
- Public Member Functions inherited from Cabana::Grid::IndexSpace< N >
 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 std::size_t Rank = N
 dimension
 
static constexpr unsigned long long cell_bits_per_tile_dim
 
static constexpr unsigned long long cell_num_per_tile
 number of local cells in each tile in each dimension
 
- Static Public Attributes inherited from Cabana::Grid::IndexSpace< N >
static constexpr long Rank = N
 Number of dimensions.
 

Additional Inherited Members

- Protected Attributes inherited from Cabana::Grid::IndexSpace< N >
Kokkos::Array< long, Rank_min
 Minimum index bounds.
 
Kokkos::Array< long, Rank_max
 Maximum index bounds.
 

Detailed Description

template<std::size_t N, unsigned long long cellBitsPerTileDim, typename std::enable_if_t<(N==3), bool > = true>
class Cabana::Grid::TileIndexSpace< N, cellBitsPerTileDim, >

Index space with tile as unit; _min and _max forms the tile range. Note this is for sparse grid only, mainly used in sparse halo impl.

Member Data Documentation

◆ cell_bits_per_tile_dim

template<std::size_t N, unsigned long long cellBitsPerTileDim, typename std::enable_if_t<(N==3), bool > = true>
unsigned long long Cabana::Grid::TileIndexSpace< N, cellBitsPerTileDim, >::cell_bits_per_tile_dim
staticconstexpr
Initial value:
=
cellBitsPerTileDim

number of bits to represent the local cell id in each tile in each dimension

◆ cell_num_per_tile

template<std::size_t N, unsigned long long cellBitsPerTileDim, typename std::enable_if_t<(N==3), bool > = true>
unsigned long long Cabana::Grid::TileIndexSpace< N, cellBitsPerTileDim, >::cell_num_per_tile
staticconstexpr
Initial value:
=
static constexpr std::size_t Rank
dimension
Definition Cabana_Grid_SparseIndexSpace.hpp:1140
static constexpr unsigned long long cell_bits_per_tile_dim
Definition Cabana_Grid_SparseIndexSpace.hpp:1143

number of local cells in each tile in each dimension


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