Cabana 0.8.0-dev
 
Loading...
Searching...
No Matches
Cabana::Grid::TileMap< CBits, CNumPerDim, CNumPerTile > Class Template Reference

Declaration of TileMap. More...

#include <Cabana_Grid_SparseIndexSpace.hpp>

Static Public Member Functions

template<typename... Coords>
static KOKKOS_INLINE_FUNCTION constexpr auto coordToOffset (Coords &&... coords) -> uint64_t
 Cell ijk <=> Cell Id.
 
template<typename Key, typename... Coords>
static KOKKOS_INLINE_FUNCTION constexpr void offsetToCoord (Key &&key, Coords &... coords)
 (Host/Device) Compute from offset to coordinates
 

Static Public Attributes

static constexpr int cell_bits_per_tile_dim = CBits
 Number of bits (per dimension) needed to index the cells inside a tile.
 
static constexpr int cell_num_per_tile_dim = CNumPerDim
 Number of cells (per dimension) inside each tile.
 
static constexpr int cell_num_per_tile = CNumPerTile
 Number of cells (total) inside each tile.
 
static constexpr int rank = 3
 Indexing dimension, currently only serves 3D representations.
 

Detailed Description

template<int CBits, int CNumPerDim, int CNumPerTile>
class Cabana::Grid::TileMap< CBits, CNumPerDim, CNumPerTile >

Declaration of TileMap.

Tile index space, inside each local tile, mapping cell ijks to cell No.(Lexicographical Order)

Template Parameters
CBitsBits number (per dimension) to index cells inside each tile
CbitsNumber of bits (per dimension) to index the cells inside a tile
CNumPerDimCell number (per dimension) inside each tile
CNumPerTileCel number (total) inside each tile

Member Function Documentation

◆ coordToOffset()

template<int CBits, int CNumPerDim, int CNumPerTile>
template<typename... Coords>
static KOKKOS_INLINE_FUNCTION constexpr auto Cabana::Grid::TileMap< CBits, CNumPerDim, CNumPerTile >::coordToOffset ( Coords &&... coords) -> uint64_t
inlinestaticconstexpr

Cell ijk <=> Cell Id.

(Host/Device) Compute from coordinate to offset

Parameters
coordscoordinates used to compute the offset

◆ offsetToCoord()

template<int CBits, int CNumPerDim, int CNumPerTile>
template<typename Key, typename... Coords>
static KOKKOS_INLINE_FUNCTION constexpr void Cabana::Grid::TileMap< CBits, CNumPerDim, CNumPerTile >::offsetToCoord ( Key && key,
Coords &... coords )
inlinestaticconstexpr

(Host/Device) Compute from offset to coordinates

Parameters
keyThe given single number
coordsThe output coordinates

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