OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
grid_zmb< dim, blockEdgeSize, indexT > Class Template Reference

Detailed Description

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT>
class grid_zmb< dim, blockEdgeSize, indexT >

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>

+ Inheritance diagram for grid_zmb< dim, blockEdgeSize, indexT >:

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_zmboperator= (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 getBlockEgdeSize () const
 
__host__ __device__ indexT size () const
 

Additional Inherited Members

- Private Member Functions inherited from grid_smb< dim, blockEdgeSize, indexT >
__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)
 
__host__ __device__ grid_smb (const grid_sm< dim, T > blockGrid)
 
__host__ __device__ grid_smb (const grid_smb< dim, blockEdgeSize > &other)
 
Box< dim, size_t > getBox () const
 Return the box enclosing the grid.
 
__host__ __device__ grid_smboperator= (const grid_smb< dim, blockEdgeSize > &other)
 
__host__ __device__ const indexT(& getSize () const)[dim]
 
__host__ __device__ const indexT & size (int i) const
 
indexT size () const
 
__host__ __device__ indexT LinId (const grid_key_dx< dim, indexT_ > coord) const
 Linearize the coordinate index.
 
__host__ __device__ void LinId (const grid_key_dx< dim, indexT_ > coord, indexT &blockLinId, int &localLinId) const
 Linearize the coordinate index.
 
__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
 Invert from the linearized block id + local id to the position of the point in coordinates.
 
__host__ __device__ grid_key_dx< dim, int > LocalInvLinId (unsigned int localLinId) const
 
__host__ __device__ indexT BlockLinId (const grid_key_dx< dim, indexT_ > &blockCoord) const
 
__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
 
__host__ __device__ indexT getBlockEgdeSize () const
 
__host__ __device__ indexT getBlockSize () const
 
__host__ __device__ void swap (grid_smb< dim, blockEdgeSize, indexT > &other)
 
- Static Private Member Functions inherited from grid_smb< dim, blockEdgeSize, indexT >
static bool noPointers ()
 
- Static Private Attributes inherited from grid_smb< dim, blockEdgeSize, indexT >
static constexpr indexT blockSize
 

Constructor & Destructor Documentation

◆ grid_zmb() [1/5]

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT >
grid_zmb< dim, blockEdgeSize, indexT >::grid_zmb ( )
inline

Definition at line 30 of file grid_zmb.hpp.

◆ grid_zmb() [2/5]

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT >
__host__ __device__ grid_zmb< dim, blockEdgeSize, indexT >::grid_zmb ( const size_t(&)  sz[dim])
inline

Definition at line 32 of file grid_zmb.hpp.

◆ grid_zmb() [3/5]

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT >
__host__ __device__ grid_zmb< dim, blockEdgeSize, indexT >::grid_zmb ( const size_t  domainBlockEdgeSize)
inline

Definition at line 36 of file grid_zmb.hpp.

◆ grid_zmb() [4/5]

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT >
template<typename T >
__host__ __device__ grid_zmb< dim, blockEdgeSize, indexT >::grid_zmb ( const grid_sm< dim, T >  blockGrid)
inline

Definition at line 41 of file grid_zmb.hpp.

◆ grid_zmb() [5/5]

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT >
__host__ __device__ grid_zmb< dim, blockEdgeSize, indexT >::grid_zmb ( const grid_zmb< dim, blockEdgeSize, indexT > &  other)
inline

Definition at line 54 of file grid_zmb.hpp.

Member Function Documentation

◆ BlockInvLinId()

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT >
__host__ __device__ grid_key_dx< dim, int > grid_zmb< dim, blockEdgeSize, indexT >::BlockInvLinId ( indexT  blockLinId) const
inline

Definition at line 108 of file grid_zmb.hpp.

◆ BlockLinId()

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT >
template<typename indexT_ >
__host__ __device__ indexT grid_zmb< dim, blockEdgeSize, indexT >::BlockLinId ( const grid_key_dx< dim, indexT_ > &  blockCoord) const
inline

Definition at line 103 of file grid_zmb.hpp.

◆ getBlockEgdeSize()

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT >
__host__ __device__ indexT grid_zmb< dim, blockEdgeSize, indexT >::getBlockEgdeSize ( ) const
inline

Definition at line 144 of file grid_zmb.hpp.

◆ getBlockSize()

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT >
indexT grid_zmb< dim, blockEdgeSize, indexT >::getBlockSize ( ) const
inline

Definition at line 129 of file grid_zmb.hpp.

◆ getGlobalCoord()

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT >
template<typename indexT_ >
__host__ __device__ grid_key_dx< dim, indexT > grid_zmb< dim, blockEdgeSize, indexT >::getGlobalCoord ( const grid_key_dx< dim, indexT_ > &  blockCoord,
unsigned int  offset 
) const
inline

Definition at line 124 of file grid_zmb.hpp.

◆ getSize()

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT >
__host__ __device__ const indexT(& grid_zmb< dim, blockEdgeSize, indexT >::getSize ( ) )[dim]
inline

Definition at line 116 of file grid_zmb.hpp.

◆ InvLinId() [1/2]

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT >
__host__ __device__ grid_key_dx< dim, int > grid_zmb< dim, blockEdgeSize, indexT >::InvLinId ( const indexT  linId) const
inline

Definition at line 80 of file grid_zmb.hpp.

◆ InvLinId() [2/2]

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT >
__host__ __device__ grid_key_dx< dim, int > grid_zmb< dim, blockEdgeSize, indexT >::InvLinId ( indexT  blockLinId,
indexT  localLinId 
) const
inline

Definition at line 88 of file grid_zmb.hpp.

◆ LinId()

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT >
template<typename indexT_ >
__host__ __device__ indexT grid_zmb< dim, blockEdgeSize, indexT >::LinId ( const grid_key_dx< dim, indexT_ >  coord) const
inline

Definition at line 65 of file grid_zmb.hpp.

◆ operator=()

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT >
__host__ __device__ grid_zmb & grid_zmb< dim, blockEdgeSize, indexT >::operator= ( const grid_zmb< dim, blockEdgeSize, indexT > &  other)
inline

Definition at line 58 of file grid_zmb.hpp.

◆ size() [1/2]

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT >
__host__ __device__ indexT grid_zmb< dim, blockEdgeSize, indexT >::size ( ) const
inline

Definition at line 149 of file grid_zmb.hpp.

◆ size() [2/2]

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT >
__host__ __device__ const indexT & grid_zmb< dim, blockEdgeSize, indexT >::size ( int  i) const
inline

Definition at line 134 of file grid_zmb.hpp.

◆ swap()

template<unsigned int dim, unsigned int blockEdgeSize, typename indexT >
__host__ __device__ void grid_zmb< dim, blockEdgeSize, indexT >::swap ( grid_zmb< dim, blockEdgeSize, indexT > &  other)
inline

Definition at line 139 of file grid_zmb.hpp.


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