diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecision.cpp b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecision.cpp index 38f8b24e5a..e60d8e3939 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecision.cpp +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecision.cpp @@ -24,6 +24,8 @@ #include "core/cell/CellInterval.h" #include "stencil/Directions.h" +#include + #if (defined WALBERLA_CXX_COMPILER_IS_GNU) || (defined WALBERLA_CXX_COMPILER_IS_CLANG) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wfloat-equal" @@ -519,6 +521,7 @@ static FUNC_PREFIX void unpack_NE(double *RESTRICT const _data_buffer, double *R } // namespace internal_unpack_NE void PackInfoPdfDoublePrecision::pack(Direction dir, unsigned char *byte_buffer, IBlock *block) const { + byte_buffer += sizeof(double) - (reinterpret_cast(byte_buffer) - (reinterpret_cast(byte_buffer) / sizeof(double)) * sizeof(double)); double *buffer = reinterpret_cast(byte_buffer); auto pdfs = block->getData>(pdfsID); @@ -893,6 +896,7 @@ void PackInfoPdfDoublePrecision::pack(Direction dir, unsigned char *byte_buffer, } void PackInfoPdfDoublePrecision::unpack(Direction dir, unsigned char *byte_buffer, IBlock *block) const { + byte_buffer += sizeof(double) - (reinterpret_cast(byte_buffer) - (reinterpret_cast(byte_buffer) / sizeof(double)) * sizeof(double)); double *buffer = reinterpret_cast(byte_buffer); auto pdfs = block->getData>(pdfsID); diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecision.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecision.h index 1ac61f80e7..24547126a1 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecision.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecision.h @@ -54,7 +54,7 @@ class PackInfoPdfDoublePrecision void unpackData(IBlock *receiver, stencil::Direction dir, mpi::RecvBuffer &buffer) { const auto dataSize = size(dir, receiver); - unpack(dir, buffer.skip(dataSize), receiver); + unpack(dir, buffer.skip(dataSize + sizeof(double)), receiver); } void communicateLocal(const IBlock *sender, IBlock *receiver, @@ -68,7 +68,8 @@ class PackInfoPdfDoublePrecision void packDataImpl(const IBlock *sender, stencil::Direction dir, mpi::SendBuffer &outBuffer) const { const auto dataSize = size(dir, sender); - pack(dir, outBuffer.forward(dataSize), const_cast(sender)); + pack(dir, outBuffer.forward(dataSize + sizeof(double)), + const_cast(sender)); } void pack(stencil::Direction dir, unsigned char *buffer, IBlock *block) const; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecision.cpp b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecision.cpp index 6865af37ae..ff741ff659 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecision.cpp +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecision.cpp @@ -24,6 +24,8 @@ #include "core/cell/CellInterval.h" #include "stencil/Directions.h" +#include + #if (defined WALBERLA_CXX_COMPILER_IS_GNU) || (defined WALBERLA_CXX_COMPILER_IS_CLANG) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wfloat-equal" @@ -519,6 +521,7 @@ static FUNC_PREFIX void unpack_NE(float *RESTRICT const _data_buffer, float *RES } // namespace internal_unpack_NE void PackInfoPdfSinglePrecision::pack(Direction dir, unsigned char *byte_buffer, IBlock *block) const { + byte_buffer += sizeof(float) - (reinterpret_cast(byte_buffer) - (reinterpret_cast(byte_buffer) / sizeof(float)) * sizeof(float)); float *buffer = reinterpret_cast(byte_buffer); auto pdfs = block->getData>(pdfsID); @@ -893,6 +896,7 @@ void PackInfoPdfSinglePrecision::pack(Direction dir, unsigned char *byte_buffer, } void PackInfoPdfSinglePrecision::unpack(Direction dir, unsigned char *byte_buffer, IBlock *block) const { + byte_buffer += sizeof(float) - (reinterpret_cast(byte_buffer) - (reinterpret_cast(byte_buffer) / sizeof(float)) * sizeof(float)); float *buffer = reinterpret_cast(byte_buffer); auto pdfs = block->getData>(pdfsID); diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecision.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecision.h index 62def10d25..8af0323e41 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecision.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecision.h @@ -54,7 +54,7 @@ class PackInfoPdfSinglePrecision void unpackData(IBlock *receiver, stencil::Direction dir, mpi::RecvBuffer &buffer) { const auto dataSize = size(dir, receiver); - unpack(dir, buffer.skip(dataSize), receiver); + unpack(dir, buffer.skip(dataSize + sizeof(float)), receiver); } void communicateLocal(const IBlock *sender, IBlock *receiver, @@ -68,7 +68,8 @@ class PackInfoPdfSinglePrecision void packDataImpl(const IBlock *sender, stencil::Direction dir, mpi::SendBuffer &outBuffer) const { const auto dataSize = size(dir, sender); - pack(dir, outBuffer.forward(dataSize), const_cast(sender)); + pack(dir, outBuffer.forward(dataSize + sizeof(float)), + const_cast(sender)); } void pack(stencil::Direction dir, unsigned char *buffer, IBlock *block) const; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecision.cpp b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecision.cpp index 8ce646c035..99a0d5e85a 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecision.cpp +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecision.cpp @@ -24,6 +24,8 @@ #include "core/cell/CellInterval.h" #include "stencil/Directions.h" +#include + #if (defined WALBERLA_CXX_COMPILER_IS_GNU) || (defined WALBERLA_CXX_COMPILER_IS_CLANG) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wfloat-equal" @@ -67,6 +69,7 @@ static FUNC_PREFIX void unpack_SW_BW_W_TW_NW_BS_S_TS_B_C_T_BN_N_TN_SE_BE_E_TE_NE } // namespace internal_1ccccad4ca561e07a0934cadb07d0fc1 void PackInfoVecDoublePrecision::pack(Direction dir, unsigned char *byte_buffer, IBlock *block) const { + byte_buffer += sizeof(double) - (reinterpret_cast(byte_buffer) - (reinterpret_cast(byte_buffer) / sizeof(double)) * sizeof(double)); double *buffer = reinterpret_cast(byte_buffer); auto field = block->getData>(fieldID); @@ -119,6 +122,7 @@ void PackInfoVecDoublePrecision::pack(Direction dir, unsigned char *byte_buffer, } void PackInfoVecDoublePrecision::unpack(Direction dir, unsigned char *byte_buffer, IBlock *block) const { + byte_buffer += sizeof(double) - (reinterpret_cast(byte_buffer) - (reinterpret_cast(byte_buffer) / sizeof(double)) * sizeof(double)); double *buffer = reinterpret_cast(byte_buffer); auto field = block->getData>(fieldID); diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecision.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecision.h index 4b3c18a11c..cd5bbd38a0 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecision.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecision.h @@ -54,7 +54,7 @@ class PackInfoVecDoublePrecision void unpackData(IBlock *receiver, stencil::Direction dir, mpi::RecvBuffer &buffer) { const auto dataSize = size(dir, receiver); - unpack(dir, buffer.skip(dataSize), receiver); + unpack(dir, buffer.skip(dataSize + sizeof(double)), receiver); } void communicateLocal(const IBlock *sender, IBlock *receiver, @@ -68,7 +68,8 @@ class PackInfoVecDoublePrecision void packDataImpl(const IBlock *sender, stencil::Direction dir, mpi::SendBuffer &outBuffer) const { const auto dataSize = size(dir, sender); - pack(dir, outBuffer.forward(dataSize), const_cast(sender)); + pack(dir, outBuffer.forward(dataSize + sizeof(double)), + const_cast(sender)); } void pack(stencil::Direction dir, unsigned char *buffer, IBlock *block) const; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecision.cpp b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecision.cpp index e7d7ddaf13..d78828c644 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecision.cpp +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecision.cpp @@ -24,6 +24,8 @@ #include "core/cell/CellInterval.h" #include "stencil/Directions.h" +#include + #if (defined WALBERLA_CXX_COMPILER_IS_GNU) || (defined WALBERLA_CXX_COMPILER_IS_CLANG) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wfloat-equal" @@ -67,6 +69,7 @@ static FUNC_PREFIX void unpack_SW_BW_W_TW_NW_BS_S_TS_B_C_T_BN_N_TN_SE_BE_E_TE_NE } // namespace internal_1ccccad4ca561e07a0934cadb07d0fc1 void PackInfoVecSinglePrecision::pack(Direction dir, unsigned char *byte_buffer, IBlock *block) const { + byte_buffer += sizeof(float) - (reinterpret_cast(byte_buffer) - (reinterpret_cast(byte_buffer) / sizeof(float)) * sizeof(float)); float *buffer = reinterpret_cast(byte_buffer); auto field = block->getData>(fieldID); @@ -119,6 +122,7 @@ void PackInfoVecSinglePrecision::pack(Direction dir, unsigned char *byte_buffer, } void PackInfoVecSinglePrecision::unpack(Direction dir, unsigned char *byte_buffer, IBlock *block) const { + byte_buffer += sizeof(float) - (reinterpret_cast(byte_buffer) - (reinterpret_cast(byte_buffer) / sizeof(float)) * sizeof(float)); float *buffer = reinterpret_cast(byte_buffer); auto field = block->getData>(fieldID); diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecision.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecision.h index f659104bfb..cc578eab00 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecision.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecision.h @@ -54,7 +54,7 @@ class PackInfoVecSinglePrecision void unpackData(IBlock *receiver, stencil::Direction dir, mpi::RecvBuffer &buffer) { const auto dataSize = size(dir, receiver); - unpack(dir, buffer.skip(dataSize), receiver); + unpack(dir, buffer.skip(dataSize + sizeof(float)), receiver); } void communicateLocal(const IBlock *sender, IBlock *receiver, @@ -68,7 +68,8 @@ class PackInfoVecSinglePrecision void packDataImpl(const IBlock *sender, stencil::Direction dir, mpi::SendBuffer &outBuffer) const { const auto dataSize = size(dir, sender); - pack(dir, outBuffer.forward(dataSize), const_cast(sender)); + pack(dir, outBuffer.forward(dataSize + sizeof(float)), + const_cast(sender)); } void pack(stencil::Direction dir, unsigned char *buffer, IBlock *block) const;