|
| BlockMap (const int size_x, const int size_y, const int size_z, const value_type pre_alloc_size) |
| (Host) Constructor
|
|
void | clear () |
| (Host) Clear tile hash table (Host, required by unordered map clear())
|
|
bool | reserve (const value_type capacity) |
| (Host) Set new capacity lower bound on the unordered map (Only for hash table, not for capacity of allocation)
|
|
KOKKOS_INLINE_FUNCTION uint32_t | capacity () const |
| (Host/Device) Require capacity of the index hash table
|
|
KOKKOS_INLINE_FUNCTION bool | valid_at (uint32_t index) const |
| (Device) Valid tile at index.
|
|
KOKKOS_INLINE_FUNCTION bool | isValidKey (key_type key) const |
| (Device) Check if the tile key is valid.
|
|
KOKKOS_INLINE_FUNCTION key_type | key_at (uint32_t index) const |
| (Device) Get tile key at index.
|
|
KOKKOS_INLINE_FUNCTION key_type | value_at (uint32_t index) const |
| (Device) get block id value at index
|
|
KOKKOS_INLINE_FUNCTION value_type | validTileNumDev () const |
| (Device) Valid tile number inside current block (MPI rank)
|
|
value_type | validTileNumHost () const |
| (Host) Valid tile number inside current block (MPI rank)
|
|
template<typename T> |
value_type | reservedTileNumHost (T factor) const |
| (Host) Reserved tile number inside current block (MPI rank)
|
|
KOKKOS_INLINE_FUNCTION void | insert (int tile_i, int tile_j, int tile_k) const |
| (Device) Insert a tile into the hash table
|
|
KOKKOS_INLINE_FUNCTION value_type | find (int tile_i, int tile_j, int tile_k) const |
| (Device) Query the tile No. from the hash table
|
|
KOKKOS_INLINE_FUNCTION value_type | findKey (key_type tile_key) const |
| (Device) Query the tile No. from the hash table
|
|
KOKKOS_INLINE_FUNCTION key_type | ijk2key (int tile_i, int tile_j, int tile_k) const |
| (Device) Transfer tile ijk to tile hash key
|
|
KOKKOS_INLINE_FUNCTION void | key2ijk (key_type &key, int &tile_i, int &tile_j, int &tile_k) const |
| (Device) Transfer tile hash key to tile ijk
|
|
|
static constexpr unsigned long long | cell_bits_per_tile_dim = CBits |
| Number of bits (per dimension) needed to index the cells inside a tile.
|
|
static constexpr unsigned long long | cell_num_per_tile_dim = CNumPerDim |
| Number of cells (per dimension) inside each tile.
|
|
static constexpr unsigned long long | cell_num_per_tile = CNumPerTile |
| Number of cells (total) inside each tile.
|
|
static constexpr HashTypes | hash_type = Hash |
| Hash table type.
|
|
template<typename MemorySpace, unsigned long long CBits, unsigned long long CNumPerDim, unsigned long long CNumPerTile,
HashTypes Hash, typename Key, typename Value>
class Cabana::Grid::BlockMap< MemorySpace, CBits, CNumPerDim, CNumPerTile, Hash, Key, Value >
Declaration of BlockMap.
Block index space, mapping tile ijks to tile No. through a hash table (Kokkos unordered map), note that the ijks should be global.
- Template Parameters
-
CBits | Number of bits (per dimension) to index the cells inside a tile |
CNumPerDim | Number of cells (per dimension) inside each tile |
CNumPerTile | Number of cells (total) inside each tile |
Hash | Hash type (lexicographical or morton) |
Key | Type of the tile/cell hash key |
Value | Type of the tile/cell No. |