template<typename GPUFieldType>
class walberla::gpu::communication::MemcpyPackInfo< GPUFieldType >
Data packing/unpacking for ghost layer based communication of a GPUField.
Encapsulate information on how to extract data from blocks that should be communicated to neighboring blocks (see pack()) and how to inject this data in a receiving block (see unpack()). This involves a device memory buffer and two device-to-device memory copy operations.
A special method exists for communication between two blocks which are allocated on the same process (see communicateLocal()). In this case the data does not have be communicated via a device buffer, but can be sent directly. This involves a single device-to-device memory copy operation.
Data that is packed in direction "dir" at one block is unpacked in direction "stencil::inverseDir[dir]" at the neighboring block. This behavior must be implemented in communicateLocal()!
- Template Parameters
-
|
| MemcpyPackInfo (BlockDataID fieldId, const uint_t numGhostLayers=0) |
|
| ~MemcpyPackInfo () override=default |
|
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 |
|
| GeneratedGPUPackInfo ()=default |
|
virtual | ~GeneratedGPUPackInfo ()=default |
|