43 for (int64_t ctr_2 = 0; ctr_2 < _size_field_2; ctr_2 += 1) {
44 for (int64_t ctr_1 = 0; ctr_1 < _size_field_1; ctr_1 += 1) {
45 for (int64_t ctr_0 = 0; ctr_0 < _size_field_0; ctr_0 += 1) {
46 _data_buffer[3 * _size_field_0 * _size_field_1 * ctr_2 + 3 * _size_field_0 * ctr_1 + 3 * ctr_0] = _data_field[_stride_field_0 * ctr_0 + _stride_field_1 * ctr_1 + _stride_field_2 * ctr_2];
47 _data_buffer[3 * _size_field_0 * _size_field_1 * ctr_2 + 3 * _size_field_0 * ctr_1 + 3 * ctr_0 + 1] = _data_field[_stride_field_0 * ctr_0 + _stride_field_1 * ctr_1 + _stride_field_2 * ctr_2 + _stride_field_3];
48 _data_buffer[3 * _size_field_0 * _size_field_1 * ctr_2 + 3 * _size_field_0 * ctr_1 + 3 * ctr_0 + 2] = _data_field[_stride_field_0 * ctr_0 + _stride_field_1 * ctr_1 + _stride_field_2 * ctr_2 + 2 * _stride_field_3];
57 for (int64_t ctr_2 = 0; ctr_2 < _size_field_2; ctr_2 += 1) {
58 for (int64_t ctr_1 = 0; ctr_1 < _size_field_1; ctr_1 += 1) {
59 for (int64_t ctr_0 = 0; ctr_0 < _size_field_0; ctr_0 += 1) {
60 _data_field[_stride_field_0 * ctr_0 + _stride_field_1 * ctr_1 + _stride_field_2 * ctr_2] = _data_buffer[3 * _size_field_0 * _size_field_1 * ctr_2 + 3 * _size_field_0 * ctr_1 + 3 * ctr_0];
61 _data_field[_stride_field_0 * ctr_0 + _stride_field_1 * ctr_1 + _stride_field_2 * ctr_2 + _stride_field_3] = _data_buffer[3 * _size_field_0 * _size_field_1 * ctr_2 + 3 * _size_field_0 * ctr_1 + 3 * ctr_0 + 1];
62 _data_field[_stride_field_0 * ctr_0 + _stride_field_1 * ctr_1 + _stride_field_2 * ctr_2 + 2 * _stride_field_3] = _data_buffer[3 * _size_field_0 * _size_field_1 * ctr_2 + 3 * _size_field_0 * ctr_1 + 3 * ctr_0 + 2];
70 byte_buffer +=
sizeof(float) - (
reinterpret_cast<std::size_t
>(byte_buffer) - (
reinterpret_cast<std::size_t
>(byte_buffer) /
sizeof(
float)) *
sizeof(
float));
71 float *buffer =
reinterpret_cast<float *
>(byte_buffer);
73 auto field =
block->getData<field::GhostLayerField<float, 3>>(fieldID);
76 field->getSliceBeforeGhostLayer(dir, ci, 1,
false);
98 float *
RESTRICT _data_buffer = buffer;
99 WALBERLA_ASSERT_GREATER_EQUAL(ci.xMin(), -int_c(field->nrOfGhostLayers()))
100 WALBERLA_ASSERT_GREATER_EQUAL(ci.yMin(), -int_c(field->nrOfGhostLayers()))
101 WALBERLA_ASSERT_GREATER_EQUAL(ci.zMin(), -int_c(field->nrOfGhostLayers()))
102 float *
RESTRICT const _data_field = field->dataAt(ci.xMin(), ci.yMin(), ci.zMin(), 0);
103 WALBERLA_ASSERT_GREATER_EQUAL(field->xSizeWithGhostLayer(), int64_t(int64_c(ci.xSize()) + 0))
104 const int64_t _size_field_0 = int64_t(int64_c(ci.xSize()) + 0);
105 WALBERLA_ASSERT_GREATER_EQUAL(field->ySizeWithGhostLayer(), int64_t(int64_c(ci.ySize()) + 0))
106 const int64_t _size_field_1 = int64_t(int64_c(ci.ySize()) + 0);
107 WALBERLA_ASSERT_GREATER_EQUAL(field->zSizeWithGhostLayer(), int64_t(int64_c(ci.zSize()) + 0))
108 const int64_t _size_field_2 = int64_t(int64_c(ci.zSize()) + 0);
109 const int64_t _stride_field_0 = int64_t(field->xStride());
110 const int64_t _stride_field_1 = int64_t(field->yStride());
111 const int64_t _stride_field_2 = int64_t(field->zStride());
112 const int64_t _stride_field_3 = int64_t(1 * int64_t(field->fStride()));
118 WALBERLA_ASSERT(
false);
123 byte_buffer +=
sizeof(float) - (
reinterpret_cast<std::size_t
>(byte_buffer) - (
reinterpret_cast<std::size_t
>(byte_buffer) /
sizeof(
float)) *
sizeof(
float));
124 float *buffer =
reinterpret_cast<float *
>(byte_buffer);
126 auto field =
block->getData<field::GhostLayerField<float, 3>>(fieldID);
129 field->getGhostRegion(dir, ci, 1,
false);
130 auto communciationDirection = stencil::inverseDir[dir];
132 switch (communciationDirection) {
152 float *
RESTRICT const _data_buffer = buffer;
153 WALBERLA_ASSERT_GREATER_EQUAL(ci.xMin(), -int_c(field->nrOfGhostLayers()))
154 WALBERLA_ASSERT_GREATER_EQUAL(ci.yMin(), -int_c(field->nrOfGhostLayers()))
155 WALBERLA_ASSERT_GREATER_EQUAL(ci.zMin(), -int_c(field->nrOfGhostLayers()))
156 float *
RESTRICT _data_field = field->dataAt(ci.xMin(), ci.yMin(), ci.zMin(), 0);
157 WALBERLA_ASSERT_GREATER_EQUAL(field->xSizeWithGhostLayer(), int64_t(int64_c(ci.xSize()) + 0))
158 const int64_t _size_field_0 = int64_t(int64_c(ci.xSize()) + 0);
159 WALBERLA_ASSERT_GREATER_EQUAL(field->ySizeWithGhostLayer(), int64_t(int64_c(ci.ySize()) + 0))
160 const int64_t _size_field_1 = int64_t(int64_c(ci.ySize()) + 0);
161 WALBERLA_ASSERT_GREATER_EQUAL(field->zSizeWithGhostLayer(), int64_t(int64_c(ci.zSize()) + 0))
162 const int64_t _size_field_2 = int64_t(int64_c(ci.zSize()) + 0);
163 const int64_t _stride_field_0 = int64_t(field->xStride());
164 const int64_t _stride_field_1 = int64_t(field->yStride());
165 const int64_t _stride_field_2 = int64_t(field->zStride());
166 const int64_t _stride_field_3 = int64_t(1 * int64_t(field->fStride()));
172 WALBERLA_ASSERT(
false);
177 auto field =
block->getData<field::GhostLayerField<float, 3>>(fieldID);
180 field->getGhostRegion(dir, ci, 1,
false);
182 uint_t elementsPerCell = 0;
210 return ci.numCells() * elementsPerCell *
sizeof(float);
static FUNC_PREFIX void pack_SW_BW_W_TW_NW_BS_S_TS_B_C_T_BN_N_TN_SE_BE_E_TE_NE(double *RESTRICT _data_buffer, double *RESTRICT const _data_field, int64_t const _size_field_0, int64_t const _size_field_1, int64_t const _size_field_2, int64_t const _stride_field_0, int64_t const _stride_field_1, int64_t const _stride_field_2, int64_t const _stride_field_3)
static FUNC_PREFIX void unpack_SW_BW_W_TW_NW_BS_S_TS_B_C_T_BN_N_TN_SE_BE_E_TE_NE(double *RESTRICT const _data_buffer, double *RESTRICT _data_field, int64_t const _size_field_0, int64_t const _size_field_1, int64_t const _size_field_2, int64_t const _stride_field_0, int64_t const _stride_field_1, int64_t const _stride_field_2, int64_t const _stride_field_3)