walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T > Class Template Reference

#include <NonuniformGeneratedGPUPdfPackInfo.h>

+ Inheritance diagram for walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >:

Public Types

using LatticeStorageSpecification_T = typename PdfField_T::LatticeStorageSpecification
 
using Stencil = typename LatticeStorageSpecification_T::Stencil
 
using CommunicationStencil = typename LatticeStorageSpecification_T::CommunicationStencil
 
using CommData_T = NonuniformGPUCommData< LatticeStorageSpecification_T >
 

Public Member Functions

 NonuniformGeneratedGPUPdfPackInfo (const BlockDataID pdfFieldID, const BlockDataID commDataID)
 
bool constantDataExchange () const override
 
bool threadsafeReceiving () const override
 
void unpackDataEqualLevel (Block *receiver, Direction dir, GpuBuffer_T &buffer, gpuStream_t stream) override
 Equal Level. More...
 
void communicateLocalEqualLevel (const Block *sender, Block *receiver, stencil::Direction dir, gpuStream_t stream) override
 
void unpackDataCoarseToFine (Block *fineReceiver, const BlockID &coarseSender, stencil::Direction dir, GpuBuffer_T &buffer, gpuStream_t stream) override
 Coarse to Fine. More...
 
void communicateLocalCoarseToFine (const Block *coarseSender, Block *fineReceiver, stencil::Direction dir, gpuStream_t stream) override
 
void communicateLocalCoarseToFine (const Block *coarseSender, Block *fineReceiver, stencil::Direction dir, GpuBuffer_T &buffer, gpuStream_t stream) override
 
void prepareCoalescence (Block *coarseReceiver, gpuStream_t gpuStream=nullptr)
 Fine to Coarse. More...
 
void unpackDataFineToCoarse (Block *coarseReceiver, const BlockID &fineSender, stencil::Direction dir, GpuBuffer_T &buffer, gpuStream_t stream) override
 
void communicateLocalFineToCoarse (const Block *fineSender, Block *coarseReceiver, stencil::Direction dir, gpuStream_t stream) override
 
void communicateLocalFineToCoarse (const Block *fineSender, Block *coarseReceiver, stencil::Direction dir, GpuBuffer_T &buffer, gpuStream_t stream) override
 
uint_t sizeEqualLevelSend (const Block *sender, stencil::Direction dir) override
 
uint_t sizeCoarseToFineSend (const Block *coarseSender, const BlockID &fineReceiver, stencil::Direction dir) override
 
uint_t sizeCoarseToFineReceive (Block *fineReceiver, stencil::Direction dir) override
 
uint_t sizeFineToCoarseSend (const Block *fineSender, stencil::Direction dir) override
 
- Public Member Functions inherited from walberla::gpu::GeneratedNonUniformGPUPackInfo
 GeneratedNonUniformGPUPackInfo ()=default
 
virtual ~GeneratedNonUniformGPUPackInfo ()=default
 
void packDataEqualLevel (const Block *sender, stencil::Direction dir, GpuBuffer_T &buffer, gpuStream_t stream=nullptr) const
 
virtual void unpackDataEqualLevel (Block *receiver, stencil::Direction dir, GpuBuffer_T &buffer, gpuStream_t stream)=0
 
void packDataCoarseToFine (const Block *coarseSender, const BlockID &fineReceiver, stencil::Direction dir, GpuBuffer_T &buffer, gpuStream_t stream=nullptr) const
 
void packDataFineToCoarse (const Block *fineSender, const BlockID &coarseReceiver, stencil::Direction dir, GpuBuffer_T &buffer, gpuStream_t stream=nullptr) const
 
void clearBufferSizeCheckMap ()
 

Public Attributes

const BlockDataID commDataID_
 

Protected Member Functions

void packDataEqualLevelImpl (const Block *sender, stencil::Direction dir, GpuBuffer_T &buffer, gpuStream_t stream) const override
 
void packDataCoarseToFineImpl (const Block *coarseSender, const BlockID &fineReceiver, stencil::Direction dir, GpuBuffer_T &buffer, gpuStream_t stream) const override
 
void packDataFineToCoarseImpl (const Block *fineSender, const BlockID &coarseReceiver, stencil::Direction dir, GpuBuffer_T &buffer, gpuStream_t stream) const override
 

Private Member Functions

Vector3< cell_idx_tgetNeighborShift (const BlockID &fineBlock, stencil::Direction dir) const
 Helper Functions As in PdfFieldPackInfo.h. More...
 
bool areNeighborsInDirection (const Block *block, const BlockID &neighborID, Vector3< cell_idx_t > dirVec) const
 Checks whether or not the block with ID neighborID is a neighbor of block in direction dir. More...
 
CellInterval intervalHullInDirection (const CellInterval &ci, Vector3< cell_idx_t > tangentialDir, cell_idx_t width) const
 Returns the part of a cell interval's hull of given width in direction dirVec. More...
 
bool skipsThroughCoarseBlock (const Block *block, Direction dir) const
 For edge or corner directions, checks if a coarser block is part of the respective edge or corner intersection. More...
 
void getCoarseBlockCommIntervals (const BlockID &fineBlockID, Direction dir, const PdfField_T *field, std::vector< std::pair< Direction, CellInterval > > &intervals) const
 For coarse-to-fine and fine-to-coarse communication, returns a list of pairs (Direction, CellInterval) mapping sub-directions of the communication direction to cell intervals on the coarse block interior whose data must be communicated as if communicating in those sub-directions. More...
 
void getFineBlockCommIntervals (const BlockID &fineBlockID, Direction dir, const PdfField_T *field, std::vector< std::pair< Direction, CellInterval > > &intervals) const
 For coarse-to-fine and fine-to-coarse communication, returns a list of pairs (Direction, CellInterval) mapping sub-directions of the communication direction to cell intervals on the fine block whose data must be communicated as if communicating in those sub-directions. More...
 
CellInterval getCoarseBlockCoalescenceInterval (const Block *coarseBlock, const BlockID &fineBlockID, Direction dir, const PdfField_T *field) const
 

Private Attributes

const BlockDataID pdfFieldID_
 
internal::NonuniformGPUPackingKernelsWrapper< PdfField_T, LatticeStorageSpecification_T::inplace > kernels_
 

Additional Inherited Members

- Protected Attributes inherited from walberla::gpu::GeneratedNonUniformGPUPackInfo
std::map< const Block *, std::map< stencil::Direction, std::map< uint_t, size_t > > > bufferSize_
 

Member Typedef Documentation

◆ CommData_T

◆ CommunicationStencil

template<typename PdfField_T >
using walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::CommunicationStencil = typename LatticeStorageSpecification_T::CommunicationStencil

◆ LatticeStorageSpecification_T

template<typename PdfField_T >
using walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::LatticeStorageSpecification_T = typename PdfField_T::LatticeStorageSpecification

◆ Stencil

template<typename PdfField_T >
using walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::Stencil = typename LatticeStorageSpecification_T::Stencil

Constructor & Destructor Documentation

◆ NonuniformGeneratedGPUPdfPackInfo()

template<typename PdfField_T >
walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::NonuniformGeneratedGPUPdfPackInfo ( const BlockDataID  pdfFieldID,
const BlockDataID  commDataID 
)
inline

Member Function Documentation

◆ areNeighborsInDirection()

template<typename PdfField_T >
bool walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::areNeighborsInDirection ( const Block block,
const BlockID neighborID,
Vector3< cell_idx_t dirVec 
) const
private

Checks whether or not the block with ID neighborID is a neighbor of block in direction dir.

◆ communicateLocalCoarseToFine() [1/2]

template<typename PdfField_T >
void walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::communicateLocalCoarseToFine ( const Block coarseSender,
Block fineReceiver,
stencil::Direction  dir,
GpuBuffer_T buffer,
gpuStream_t  stream 
)
overridevirtual

◆ communicateLocalCoarseToFine() [2/2]

template<typename PdfField_T >
void walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::communicateLocalCoarseToFine ( const Block coarseSender,
Block fineReceiver,
stencil::Direction  dir,
gpuStream_t  stream 
)
overridevirtual

◆ communicateLocalEqualLevel()

template<typename PdfField_T >
void walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::communicateLocalEqualLevel ( const Block sender,
Block receiver,
stencil::Direction  dir,
gpuStream_t  stream 
)
overridevirtual

◆ communicateLocalFineToCoarse() [1/2]

template<typename PdfField_T >
void walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::communicateLocalFineToCoarse ( const Block fineSender,
Block coarseReceiver,
stencil::Direction  dir,
GpuBuffer_T buffer,
gpuStream_t  stream 
)
overridevirtual

◆ communicateLocalFineToCoarse() [2/2]

template<typename PdfField_T >
void walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::communicateLocalFineToCoarse ( const Block fineSender,
Block coarseReceiver,
stencil::Direction  dir,
gpuStream_t  stream 
)
overridevirtual

◆ constantDataExchange()

template<typename PdfField_T >
bool walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::constantDataExchange ( ) const
inlineoverridevirtual

◆ getCoarseBlockCoalescenceInterval()

template<typename PdfField_T >
CellInterval walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::getCoarseBlockCoalescenceInterval ( const Block coarseBlock,
const BlockID fineBlockID,
Direction  dir,
const PdfField_T field 
) const
private

◆ getCoarseBlockCommIntervals()

template<typename PdfField_T >
void walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::getCoarseBlockCommIntervals ( const BlockID fineBlockID,
Direction  dir,
const PdfField_T field,
std::vector< std::pair< Direction, CellInterval > > &  intervals 
) const
inlineprivate

For coarse-to-fine and fine-to-coarse communication, returns a list of pairs (Direction, CellInterval) mapping sub-directions of the communication direction to cell intervals on the coarse block interior whose data must be communicated as if communicating in those sub-directions.

Parameters
fineBlockIDID of the fine block
dirDirection from the coarse to the fine block
fieldPointer to the PDF field on the coarse block
intervalsVector that will be filled with the computed intervals

◆ getFineBlockCommIntervals()

template<typename PdfField_T >
void walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::getFineBlockCommIntervals ( const BlockID fineBlockID,
Direction  dir,
const PdfField_T field,
std::vector< std::pair< Direction, CellInterval > > &  intervals 
) const
inlineprivate

For coarse-to-fine and fine-to-coarse communication, returns a list of pairs (Direction, CellInterval) mapping sub-directions of the communication direction to cell intervals on the fine block whose data must be communicated as if communicating in those sub-directions.

Parameters
fineBlockIDID of the fine block
dirDirection from the fine to the coarse block
fieldPointer to the PDF Field on the fine block
intervalsVector that will be filled with the computed intervals

◆ getNeighborShift()

template<typename PdfField_T >
Vector3< cell_idx_t > walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::getNeighborShift ( const BlockID fineBlock,
stencil::Direction  dir 
) const
inlineprivate

Helper Functions As in PdfFieldPackInfo.h.

◆ intervalHullInDirection()

template<typename PdfField_T >
CellInterval walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::intervalHullInDirection ( const CellInterval ci,
Vector3< cell_idx_t tangentialDir,
cell_idx_t  width 
) const
inlineprivate

Returns the part of a cell interval's hull of given width in direction dirVec.

Parameters
ciThe original cell interval
dirVecDirection Vector
widthWidth of the hull
Returns
Interval forming the part of the hull

◆ packDataCoarseToFineImpl()

template<typename PdfField_T >
void walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::packDataCoarseToFineImpl ( const Block coarseSender,
const BlockID fineReceiver,
stencil::Direction  dir,
GpuBuffer_T buffer,
gpuStream_t  stream 
) const
overrideprotectedvirtual

◆ packDataEqualLevelImpl()

template<typename PdfField_T >
void walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::packDataEqualLevelImpl ( const Block sender,
stencil::Direction  dir,
GpuBuffer_T buffer,
gpuStream_t  stream 
) const
overrideprotectedvirtual

◆ packDataFineToCoarseImpl()

template<typename PdfField_T >
void walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::packDataFineToCoarseImpl ( const Block fineSender,
const BlockID coarseReceiver,
stencil::Direction  dir,
GpuBuffer_T buffer,
gpuStream_t  stream 
) const
overrideprotectedvirtual

◆ prepareCoalescence()

template<typename PdfField_T >
void walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::prepareCoalescence ( Block coarseReceiver,
gpuStream_t  gpuStream = nullptr 
)

Fine to Coarse.

◆ sizeCoarseToFineReceive()

template<typename PdfField_T >
uint_t walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::sizeCoarseToFineReceive ( Block fineReceiver,
stencil::Direction  dir 
)
overridevirtual

◆ sizeCoarseToFineSend()

template<typename PdfField_T >
uint_t walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::sizeCoarseToFineSend ( const Block coarseSender,
const BlockID fineReceiver,
stencil::Direction  dir 
)
overridevirtual

◆ sizeEqualLevelSend()

template<typename PdfField_T >
uint_t walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::sizeEqualLevelSend ( const Block sender,
stencil::Direction  dir 
)
overridevirtual

◆ sizeFineToCoarseSend()

template<typename PdfField_T >
uint_t walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::sizeFineToCoarseSend ( const Block fineSender,
stencil::Direction  dir 
)
overridevirtual

◆ skipsThroughCoarseBlock()

template<typename PdfField_T >
bool walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::skipsThroughCoarseBlock ( const Block block,
Direction  dir 
) const
inlineprivate

For edge or corner directions, checks if a coarser block is part of the respective edge or corner intersection.

Parameters
blockThe local block
dirThe direction to check
Returns
true if dir is an edge or corner direction skipping through a coarser block.

◆ threadsafeReceiving()

template<typename PdfField_T >
bool walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::threadsafeReceiving ( ) const
inlineoverridevirtual

◆ unpackDataCoarseToFine()

template<typename PdfField_T >
void walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::unpackDataCoarseToFine ( Block fineReceiver,
const BlockID coarseSender,
stencil::Direction  dir,
GpuBuffer_T buffer,
gpuStream_t  stream 
)
overridevirtual

Coarse to Fine.

Implements walberla::gpu::GeneratedNonUniformGPUPackInfo.

◆ unpackDataEqualLevel()

template<typename PdfField_T >
void walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::unpackDataEqualLevel ( Block receiver,
Direction  dir,
GpuBuffer_T buffer,
gpuStream_t  stream 
)
override

Equal Level.

◆ unpackDataFineToCoarse()

template<typename PdfField_T >
void walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::unpackDataFineToCoarse ( Block coarseReceiver,
const BlockID fineSender,
stencil::Direction  dir,
GpuBuffer_T buffer,
gpuStream_t  stream 
)
overridevirtual

Member Data Documentation

◆ commDataID_

template<typename PdfField_T >
const BlockDataID walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::commDataID_

◆ kernels_

template<typename PdfField_T >
internal::NonuniformGPUPackingKernelsWrapper< PdfField_T, LatticeStorageSpecification_T::inplace > walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::kernels_
private

◆ pdfFieldID_

template<typename PdfField_T >
const BlockDataID walberla::lbm_generated::NonuniformGeneratedGPUPdfPackInfo< PdfField_T >::pdfFieldID_
private

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