25#include "communication/UniformPackInfo.h"
26#include "core/DataTypes.h"
27#include "core/cell/CellInterval.h"
28#include "domain_decomposition/IBlock.h"
29#include "field/GhostLayerField.h"
30#include "stencil/Directions.h"
35#define RESTRICT __restrict__
37#define RESTRICT __restrict
46 :
public ::walberla::communication::UniformPackInfo {
54 void unpackData(IBlock *receiver, stencil::Direction dir,
55 mpi::RecvBuffer &buffer) {
56 const auto dataSize =
size(dir, receiver);
57 unpack(dir, buffer.skip(dataSize +
sizeof(
double)), receiver);
61 stencil::Direction dir) {
62 mpi::SendBuffer sBuffer;
63 packData(sender, dir, sBuffer);
64 mpi::RecvBuffer rBuffer(sBuffer);
65 unpackData(receiver, stencil::inverseDir[dir], rBuffer);
69 mpi::SendBuffer &outBuffer)
const {
70 const auto dataSize =
size(dir, sender);
71 pack(dir, outBuffer.forward(dataSize +
sizeof(
double)),
72 const_cast<IBlock *
>(sender));
75 void pack(stencil::Direction dir,
unsigned char *buffer, IBlock *
block)
const;
76 void unpack(stencil::Direction dir,
unsigned char *buffer,
78 uint_t
size(stencil::Direction dir,
const IBlock *
block)
const;
void unpackData(IBlock *receiver, stencil::Direction dir, mpi::RecvBuffer &buffer)
void pack(stencil::Direction dir, unsigned char *buffer, IBlock *block) const
void communicateLocal(const IBlock *sender, IBlock *receiver, stencil::Direction dir)
bool threadsafeReceiving() const
void packDataImpl(const IBlock *sender, stencil::Direction dir, mpi::SendBuffer &outBuffer) const
uint_t size(stencil::Direction dir, const IBlock *block) const
PackInfoVecDoublePrecision(BlockDataID fieldID_)
virtual ~PackInfoVecDoublePrecision()
void unpack(stencil::Direction dir, unsigned char *buffer, IBlock *block) const
bool constantDataExchange() const
static double * block(double *p, std::size_t index, std::size_t size)
\file PackInfoPdfDoublePrecision.cpp \author pystencils