OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
BlockMapGpu_ker< AggregateBlockT, indexT, layout_base > Class Template Reference

Detailed Description

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
class BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >

Definition at line 71 of file BlockMapGpu_ker.cuh.

Public Types

typedef AggregateBlockT AggregateType
 
typedef InsertBlockWrapper< AggregateBlockT, pMask > InsertBlockWrapperType
 

Public Member Functions

 BlockMapGpu_ker (openfpm::vector_sparse_gpu_ker< AggregateBlockT, indexT, layout_base > blockMap)
 
template<unsigned int p>
__device__ auto get (unsigned int linId) const -> ScalarTypeOf< AggregateBlockT, p >
 
template<unsigned int p>
__device__ auto get (unsigned int blockId, unsigned int offset) const -> ScalarTypeOf< AggregateBlockT, p >
 
__device__ auto getBlock (unsigned int blockId) -> decltype(blockMap.get(0))
 
template<unsigned int p>
__device__ ScalarTypeOf< AggregateBlockT, p > & getReference (unsigned int linId)
 
template<unsigned int p>
__device__ ScalarTypeOf< AggregateBlockT, p > & getReference (unsigned int blockId, unsigned int offset)
 
template<unsigned int p>
__device__ auto insert (unsigned int linId) -> ScalarTypeOf< AggregateBlockT, p > &
 
template<unsigned int p>
__device__ auto insert (unsigned int blockId, unsigned int offset) -> ScalarTypeOf< AggregateBlockT, p > &
 
template<unsigned int nChunksPerBlocks = 1>
__device__ auto insertBlock (indexT blockId, unsigned int stride=8192) -> decltype(blockMap.insert(0))
 
__device__ openfpm::vector_sparse_gpu_ker< AggregateBlockT, indexT, layout_base > & getblockMap ()
 
__device__ void get_sparse (unsigned int linId, unsigned int &dataBlockPos, unsigned int &offset) const
 
__device__ void init ()
 
__device__ void flush_block_insert ()
 
__device__ ScalarTypeOf< AggregateBlockT, pMask > getMask (unsigned int linId) const
 
__device__ void remove (unsigned int linId)
 
__device__ void remove (unsigned int blockId, unsigned int offset)
 
__device__ auto getIndexBuffer () -> decltype(blockMap.getIndexBuffer())
 Return the index buffer for the sparse vector.
 
__device__ auto getDataBuffer () -> decltype(blockMap.getDataBuffer())
 Return the data buffer for the sparse vector.
 

Static Public Member Functions

template<typename BitMaskT >
static __device__ __host__ bool getBit (const BitMaskT &bitMask, unsigned char pos)
 
template<typename BitMaskT >
static __device__ __host__ void setBit (BitMaskT &bitMask, unsigned char pos)
 
template<typename BitMaskT >
static __device__ __host__ void unsetBit (BitMaskT &bitMask, unsigned char pos)
 
static __device__ unsigned int getBlockId (unsigned int linId)
 
static __device__ unsigned int getOffset (unsigned int linId)
 
template<typename BitMaskT >
static __device__ bool exist (const BitMaskT &bitMask)
 
template<typename BitMaskT >
static __device__ void setExist (BitMaskT &bitMask)
 
template<typename BitMaskT >
static __device__ void unsetExist (BitMaskT &bitMask)
 

Static Public Attributes

static const unsigned int pMask = AggregateBlockT::max_prop_real - 1
 

Protected Attributes

openfpm::vector_sparse_gpu_ker< AggregateBlockT, indexT, layout_base > blockMap
 

Static Protected Attributes

static const unsigned char EXIST_BIT = 0
 

Member Typedef Documentation

◆ AggregateType

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
typedef AggregateBlockT BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::AggregateType

Definition at line 79 of file BlockMapGpu_ker.cuh.

◆ InsertBlockWrapperType

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
typedef InsertBlockWrapper<AggregateBlockT, pMask> BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::InsertBlockWrapperType

Definition at line 80 of file BlockMapGpu_ker.cuh.

Constructor & Destructor Documentation

◆ BlockMapGpu_ker()

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::BlockMapGpu_ker ( openfpm::vector_sparse_gpu_ker< AggregateBlockT, indexT, layout_base >  blockMap)
inline

Definition at line 102 of file BlockMapGpu_ker.cuh.

Member Function Documentation

◆ exist()

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
template<typename BitMaskT >
static __device__ bool BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::exist ( const BitMaskT &  bitMask)
inlinestatic

Definition at line 288 of file BlockMapGpu_ker.cuh.

◆ flush_block_insert()

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
__device__ void BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::flush_block_insert ( )
inline

Definition at line 278 of file BlockMapGpu_ker.cuh.

◆ get() [1/2]

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
template<unsigned int p>
__device__ auto BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::get ( unsigned int  blockId,
unsigned int  offset 
) const -> ScalarTypeOf<AggregateBlockT, p>
inline

Definition at line 120 of file BlockMapGpu_ker.cuh.

◆ get() [2/2]

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
template<unsigned int p>
__device__ auto BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::get ( unsigned int  linId) const -> ScalarTypeOf<AggregateBlockT, p>
inline

Definition at line 106 of file BlockMapGpu_ker.cuh.

◆ get_sparse()

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
__device__ void BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::get_sparse ( unsigned int  linId,
unsigned int &  dataBlockPos,
unsigned int &  offset 
) const
inline

Definition at line 234 of file BlockMapGpu_ker.cuh.

◆ getBit()

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
template<typename BitMaskT >
static __device__ __host__ bool BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::getBit ( const BitMaskT &  bitMask,
unsigned char  pos 
)
inlinestatic

Definition at line 84 of file BlockMapGpu_ker.cuh.

◆ getBlock()

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
__device__ auto BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::getBlock ( unsigned int  blockId) -> decltype(blockMap.get(0))
inline

Definition at line 137 of file BlockMapGpu_ker.cuh.

◆ getBlockId()

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
static __device__ unsigned int BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::getBlockId ( unsigned int  linId)
inlinestatic

Definition at line 251 of file BlockMapGpu_ker.cuh.

◆ getblockMap()

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
__device__ openfpm::vector_sparse_gpu_ker< AggregateBlockT, indexT, layout_base > & BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::getblockMap ( )
inline

Definition at line 229 of file BlockMapGpu_ker.cuh.

◆ getDataBuffer()

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
__device__ auto BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::getDataBuffer ( ) -> decltype(blockMap.getDataBuffer())
inline

Return the data buffer for the sparse vector.

Definition at line 349 of file BlockMapGpu_ker.cuh.

◆ getIndexBuffer()

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
__device__ auto BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::getIndexBuffer ( ) -> decltype(blockMap.getIndexBuffer())
inline

Return the index buffer for the sparse vector.

Definition at line 339 of file BlockMapGpu_ker.cuh.

◆ getMask()

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
__device__ ScalarTypeOf< AggregateBlockT, pMask > BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::getMask ( unsigned int  linId) const
inline

Definition at line 305 of file BlockMapGpu_ker.cuh.

◆ getOffset()

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
static __device__ unsigned int BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::getOffset ( unsigned int  linId)
inlinestatic

Definition at line 260 of file BlockMapGpu_ker.cuh.

◆ getReference() [1/2]

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
template<unsigned int p>
__device__ ScalarTypeOf< AggregateBlockT, p > & BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::getReference ( unsigned int  blockId,
unsigned int  offset 
)
inline

Definition at line 161 of file BlockMapGpu_ker.cuh.

◆ getReference() [2/2]

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
template<unsigned int p>
__device__ ScalarTypeOf< AggregateBlockT, p > & BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::getReference ( unsigned int  linId)
inline

Definition at line 147 of file BlockMapGpu_ker.cuh.

◆ init()

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
__device__ void BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::init ( )
inline

Definition at line 269 of file BlockMapGpu_ker.cuh.

◆ insert() [1/2]

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
template<unsigned int p>
__device__ auto BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::insert ( unsigned int  blockId,
unsigned int  offset 
) -> ScalarTypeOf<AggregateBlockT, p>&
inline

Definition at line 185 of file BlockMapGpu_ker.cuh.

◆ insert() [2/2]

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
template<unsigned int p>
__device__ auto BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::insert ( unsigned int  linId) -> ScalarTypeOf<AggregateBlockT, p>&
inline

Definition at line 172 of file BlockMapGpu_ker.cuh.

◆ insertBlock()

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
template<unsigned int nChunksPerBlocks = 1>
__device__ auto BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::insertBlock ( indexT  blockId,
unsigned int  stride = 8192 
) -> decltype(blockMap.insert(0))
inline

Definition at line 200 of file BlockMapGpu_ker.cuh.

◆ remove() [1/2]

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
__device__ void BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::remove ( unsigned int  blockId,
unsigned int  offset 
)
inline

Definition at line 322 of file BlockMapGpu_ker.cuh.

◆ remove() [2/2]

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
__device__ void BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::remove ( unsigned int  linId)
inline

Definition at line 310 of file BlockMapGpu_ker.cuh.

◆ setBit()

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
template<typename BitMaskT >
static __device__ __host__ void BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::setBit ( BitMaskT &  bitMask,
unsigned char  pos 
)
inlinestatic

Definition at line 90 of file BlockMapGpu_ker.cuh.

◆ setExist()

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
template<typename BitMaskT >
static __device__ void BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::setExist ( BitMaskT &  bitMask)
inlinestatic

Definition at line 294 of file BlockMapGpu_ker.cuh.

◆ unsetBit()

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
template<typename BitMaskT >
static __device__ __host__ void BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::unsetBit ( BitMaskT &  bitMask,
unsigned char  pos 
)
inlinestatic

Definition at line 96 of file BlockMapGpu_ker.cuh.

◆ unsetExist()

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
template<typename BitMaskT >
static __device__ void BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::unsetExist ( BitMaskT &  bitMask)
inlinestatic

Definition at line 300 of file BlockMapGpu_ker.cuh.

Field Documentation

◆ blockMap

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
openfpm::vector_sparse_gpu_ker<AggregateBlockT, indexT, layout_base> BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::blockMap
protected

Definition at line 74 of file BlockMapGpu_ker.cuh.

◆ EXIST_BIT

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
const unsigned char BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::EXIST_BIT = 0
staticprotected

Definition at line 75 of file BlockMapGpu_ker.cuh.

◆ pMask

template<typename AggregateBlockT = aggregate<DataBlock<float, 64>>, typename indexT = int, template< typename > class layout_base = memory_traits_inte>
const unsigned int BlockMapGpu_ker< AggregateBlockT, indexT, layout_base >::pMask = AggregateBlockT::max_prop_real - 1
static

Definition at line 78 of file BlockMapGpu_ker.cuh.


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