|
waLBerla 7.2
|
Pack Info class template for lattice Boltzmann PDF fields.
Relies on a code-generated class providing kernel implementations for packing, unpacking and local copying of data.
This template relies on a PackingKernels implementation generated by lbmpy_walberla.packing_kernels. The code generated part provides the kernels for transferring data between communication buffers and fields. The iteration slices are constructed by this class.
The code-generated substructure enables the usage of arbitrary, in particular in-place streaming patterns.
| PackingKernels_T | Type of a PackingKernels implementation generated using lbmpy_walberla.generate_packing_kernels. |
#include <UniformGeneratedGPUPdfPackInfo.h>
Inheritance diagram for walberla::lbm_generated::UniformGeneratedGPUPdfPackInfo< PdfField_T >:Public Types | |
| using | LatticeStorageSpecification_T = typename PdfField_T::LatticeStorageSpecification |
| using | PackingKernels_T = typename LatticeStorageSpecification_T::PackKernels |
| using | Stencil = typename LatticeStorageSpecification_T::Stencil |
Public Member Functions | |
| UniformGeneratedGPUPdfPackInfo (const BlockDataID pdfFieldID, cell_idx_t cellLayersToSend=1, bool sendAll=false) | |
| void | pack (stencil::Direction dir, unsigned char *buffer, IBlock *block, gpuStream_t stream) override |
| Pack data from a block into a send buffer. | |
| void | communicateLocal (stencil::Direction dir, const IBlock *sender, IBlock *receiver, gpuStream_t stream) override |
| Copy data from one local block to another local block. | |
| void | unpack (stencil::Direction dir, unsigned char *buffer, IBlock *block, gpuStream_t stream) override |
| Unpack data from a receive buffer into a block. | |
| uint_t | size (stencil::Direction dir, IBlock *block) override |
Public Member Functions inherited from walberla::gpu::GeneratedGPUPackInfo | |
| GeneratedGPUPackInfo ()=default | |
| virtual | ~GeneratedGPUPackInfo ()=default |
Private Attributes | |
| const BlockDataID | pdfFieldID_ |
| internal::UniformPackingGPUKernelsWrapper< PdfField_T, LatticeStorageSpecification_T::inplace > | kernels_ |
| cell_idx_t | ghostLayersToSend_ |
| bool | sendAll_ |
| using walberla::lbm_generated::UniformGeneratedGPUPdfPackInfo< PdfField_T >::LatticeStorageSpecification_T = typename PdfField_T::LatticeStorageSpecification |
| using walberla::lbm_generated::UniformGeneratedGPUPdfPackInfo< PdfField_T >::PackingKernels_T = typename LatticeStorageSpecification_T::PackKernels |
| using walberla::lbm_generated::UniformGeneratedGPUPdfPackInfo< PdfField_T >::Stencil = typename LatticeStorageSpecification_T::Stencil |
|
inline |
|
overridevirtual |
Copy data from one local block to another local block.
Both blocks are allocated on the same MPI rank.
| dir | the direction of the communication (from sender to receiver) |
| sender | id of block where the data should be copied from |
| receiver | id of block where the data should be copied to |
| stream | GPU stream |
Implements walberla::gpu::GeneratedGPUPackInfo.
|
overridevirtual |
Pack data from a block into a send buffer.
| dir | pack data for neighbor in this direction |
| buffer | buffer for writing the data into |
| block | the block whose data should be packed into a buffer |
| stream | GPU stream |
Implements walberla::gpu::GeneratedGPUPackInfo.
|
overridevirtual |
Implements walberla::gpu::GeneratedGPUPackInfo.
|
overridevirtual |
Unpack data from a receive buffer into a block.
| dir | receive data from neighbor in this direction |
| buffer | buffer for reading the data from |
| block | the block where the unpacked data should be stored into |
| stream | GPU stream |
Implements walberla::gpu::GeneratedGPUPackInfo.
|
private |
|
private |
|
private |
|
private |