This class provides an interface to linearization of coordinates and viceversa when blocks are involved. This can be seen as a lightweight version of grid_sm, with just LinId and InvLinId methods, but tuned for blocked data.
Definition at line 25 of file grid_zmb.hpp.
#include <grid_zmb.hpp>
Public Member Functions | |
__host__ __device__ | grid_zmb (const size_t(&sz)[dim]) |
__host__ __device__ | grid_zmb (const size_t domainBlockEdgeSize) |
template<typename T > | |
__host__ __device__ | grid_zmb (const grid_sm< dim, T > blockGrid) |
__host__ __device__ | grid_zmb (const grid_zmb< dim, blockEdgeSize, indexT > &other) |
__host__ __device__ grid_zmb & | operator= (const grid_zmb< dim, blockEdgeSize, indexT > &other) |
template<typename indexT_ > | |
__host__ __device__ indexT | LinId (const grid_key_dx< dim, indexT_ > coord) const |
__host__ __device__ grid_key_dx< dim, int > | InvLinId (const indexT linId) const |
__host__ __device__ grid_key_dx< dim, int > | InvLinId (indexT blockLinId, indexT localLinId) const |
template<typename indexT_ > | |
__host__ __device__ indexT | BlockLinId (const grid_key_dx< dim, indexT_ > &blockCoord) const |
__host__ __device__ grid_key_dx< dim, int > | BlockInvLinId (indexT blockLinId) const |
__host__ __device__ const indexT(& | getSize () const)[dim] |
template<typename indexT_ > | |
__host__ __device__ grid_key_dx< dim, indexT > | getGlobalCoord (const grid_key_dx< dim, indexT_ > &blockCoord, unsigned int offset) const |
indexT | getBlockSize () const |
__host__ __device__ const indexT & | size (int i) const |
__host__ __device__ void | swap (grid_zmb< dim, blockEdgeSize, indexT > &other) |
__host__ __device__ indexT | size () const |
Additional Inherited Members | |
![]() | |
Box< dim, size_t > | getBox () const |
Return the box enclosing the grid. More... | |
__host__ __device__ | grid_smb (const size_t(&sz)[dim]) |
__host__ __device__ | grid_smb (const indexT(&sz)[dim]) |
__host__ __device__ | grid_smb (const size_t domainBlockEdgeSize) |
template<typename T > | |
__host__ __device__ | grid_smb (const grid_sm< dim, T > blockGrid) |
__host__ __device__ | grid_smb (const grid_smb< dim, blockEdgeSize > &other) |
__host__ __device__ grid_smb & | operator= (const grid_smb< dim, blockEdgeSize > &other) |
__host__ __device__ const indexT(& | getSize () const)[dim] |
__host__ __device__ const indexT & | size (int i) const |
template<typename indexT_ > | |
__host__ __device__ indexT | LinId (const grid_key_dx< dim, indexT_ > coord) const |
Linearize the coordinate index. More... | |
template<typename indexT_ > | |
__host__ __device__ void | LinId (const grid_key_dx< dim, indexT_ > coord, indexT &blockLinId, int &localLinId) const |
Linearize the coordinate index. More... | |
__host__ __device__ grid_key_dx< dim, int > | InvLinId (const indexT linId) const |
__host__ __device__ grid_key_dx< dim, int > | LocalInvLinId (unsigned int localLinId) const |
__host__ __device__ grid_key_dx< dim, int > | InvLinId (indexT blockLinId, indexT localLinId) const |
Invert from the linearized block id + local id to the position of the point in coordinates. More... | |
template<typename indexT_ > | |
__host__ __device__ indexT | BlockLinId (const grid_key_dx< dim, indexT_ > &blockCoord) const |
template<typename indexT_ > | |
__host__ __device__ grid_key_dx< dim, indexT > | getGlobalCoord (const grid_key_dx< dim, indexT_ > &blockCoord, unsigned int offset) const |
__host__ __device__ grid_key_dx< dim, int > | BlockInvLinId (indexT blockLinId) const |
indexT | size_blocks () const |
indexT | size () const |
__host__ __device__ indexT | getBlockSize () const |
__host__ __device__ void | swap (grid_smb< dim, blockEdgeSize, indexT > &other) |
![]() | |
static bool | noPointers () |
![]() | |
static constexpr indexT | blockSize = IntPow<blockEdgeSize, dim>::value |