23#include "core/DataTypes.h"
24#include "core/Macros.h"
34#pragma GCC diagnostic push
35#pragma GCC diagnostic ignored "-Wstrict-aliasing"
36#pragma GCC diagnostic ignored "-Wunused-variable"
37#pragma GCC diagnostic ignored "-Wconversion"
42#ifdef __NVCC_DIAG_PRAGMA_SUPPORT__
43#pragma nv_diag_suppress 177
45#pragma diag_suppress 177
49namespace internal_c656da8359b8f47f0007107280d91a58 {
50static FUNC_PREFIX void reactionkernelindexed_5_single_precision_boundary_ReactionKernelIndexed_5_single_precision(uint8_t *
RESTRICT const _data_indexVector,
float *
RESTRICT _data_rho_0,
float *
RESTRICT _data_rho_1,
float *
RESTRICT _data_rho_2,
float *
RESTRICT _data_rho_3,
float *
RESTRICT _data_rho_4, int64_t
const _stride_rho_0_0, int64_t
const _stride_rho_0_1, int64_t
const _stride_rho_0_2, int64_t
const _stride_rho_1_0, int64_t
const _stride_rho_1_1, int64_t
const _stride_rho_1_2, int64_t
const _stride_rho_2_0, int64_t
const _stride_rho_2_1, int64_t
const _stride_rho_2_2, int64_t
const _stride_rho_3_0, int64_t
const _stride_rho_3_1, int64_t
const _stride_rho_3_2, int64_t
const _stride_rho_4_0, int64_t
const _stride_rho_4_1, int64_t
const _stride_rho_4_2, int32_t indexVectorSize,
float order_0,
float order_1,
float order_2,
float order_3,
float order_4,
float rate_coefficient,
float stoech_0,
float stoech_1,
float stoech_2,
float stoech_3,
float stoech_4) {
51 for (int64_t ctr_0 = 0; ctr_0 < indexVectorSize; ctr_0 += 1) {
52 const int32_t x = *((int32_t *)(&_data_indexVector[12 * ctr_0]));
53 const int32_t y = *((int32_t *)(&_data_indexVector[12 * ctr_0 + 4]));
54 const int32_t z = *((int32_t *)(&_data_indexVector[12 * ctr_0 + 8]));
56 const int32_t cx[] = {0};
57 const int32_t cy[] = {0};
58 const int32_t cz[] = {0};
59 const int32_t invdir[] = {0};
61 const float local_rho_0 = _data_rho_0[_stride_rho_0_0 * x + _stride_rho_0_1 * y + _stride_rho_0_2 * z];
62 const float local_rho_1 = _data_rho_1[_stride_rho_1_0 * x + _stride_rho_1_1 * y + _stride_rho_1_2 * z];
63 const float local_rho_2 = _data_rho_2[_stride_rho_2_0 * x + _stride_rho_2_1 * y + _stride_rho_2_2 * z];
64 const float local_rho_3 = _data_rho_3[_stride_rho_3_0 * x + _stride_rho_3_1 * y + _stride_rho_3_2 * z];
65 const float local_rho_4 = _data_rho_4[_stride_rho_4_0 * x + _stride_rho_4_1 * y + _stride_rho_4_2 * z];
66 const float rate_factor = rate_coefficient * powf(local_rho_0, order_0) * powf(local_rho_1, order_1) * powf(local_rho_2, order_2) * powf(local_rho_3, order_3) * powf(local_rho_4, order_4);
67 _data_rho_0[_stride_rho_0_0 * x + _stride_rho_0_1 * y + _stride_rho_0_2 * z] = local_rho_0 + rate_factor * stoech_0;
68 _data_rho_1[_stride_rho_1_0 * x + _stride_rho_1_1 * y + _stride_rho_1_2 * z] = local_rho_1 + rate_factor * stoech_1;
69 _data_rho_2[_stride_rho_2_0 * x + _stride_rho_2_1 * y + _stride_rho_2_2 * z] = local_rho_2 + rate_factor * stoech_2;
70 _data_rho_3[_stride_rho_3_0 * x + _stride_rho_3_1 * y + _stride_rho_3_2 * z] = local_rho_3 + rate_factor * stoech_3;
71 _data_rho_4[_stride_rho_4_0 * x + _stride_rho_4_1 * y + _stride_rho_4_2 * z] = local_rho_4 + rate_factor * stoech_4;
78#pragma GCC diagnostic pop
85void ReactionKernelIndexed_5_single_precision::run_impl(IBlock *
block, IndexVectors::Type type) {
86 auto *indexVectors =
block->uncheckedFastGetData<IndexVectors>(indexVectorID);
87 int32_t indexVectorSize = int32_c(indexVectors->indexVector(type).size());
88 if (indexVectorSize == 0)
91 auto pointer = indexVectors->pointerCpu(type);
93 uint8_t *_data_indexVector =
reinterpret_cast<uint8_t *
>(pointer);
95 auto rho_1 =
block->getData<field::GhostLayerField<float, 1>>(
rho_1ID);
96 auto rho_3 =
block->getData<field::GhostLayerField<float, 1>>(
rho_3ID);
97 auto rho_2 =
block->getData<field::GhostLayerField<float, 1>>(
rho_2ID);
98 auto rho_0 =
block->getData<field::GhostLayerField<float, 1>>(
rho_0ID);
99 auto rho_4 =
block->getData<field::GhostLayerField<float, 1>>(
rho_4ID);
112 WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(rho_0->nrOfGhostLayers()))
113 float *
RESTRICT _data_rho_0 = rho_0->dataAt(0, 0, 0, 0);
114 WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(rho_1->nrOfGhostLayers()))
115 float *
RESTRICT _data_rho_1 = rho_1->dataAt(0, 0, 0, 0);
116 WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(rho_2->nrOfGhostLayers()))
117 float *
RESTRICT _data_rho_2 = rho_2->dataAt(0, 0, 0, 0);
118 WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(rho_3->nrOfGhostLayers()))
119 float *
RESTRICT _data_rho_3 = rho_3->dataAt(0, 0, 0, 0);
120 WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(rho_4->nrOfGhostLayers()))
121 float *
RESTRICT _data_rho_4 = rho_4->dataAt(0, 0, 0, 0);
122 const int64_t _stride_rho_0_0 = int64_t(rho_0->xStride());
123 const int64_t _stride_rho_0_1 = int64_t(rho_0->yStride());
124 const int64_t _stride_rho_0_2 = int64_t(rho_0->zStride());
125 const int64_t _stride_rho_1_0 = int64_t(rho_1->xStride());
126 const int64_t _stride_rho_1_1 = int64_t(rho_1->yStride());
127 const int64_t _stride_rho_1_2 = int64_t(rho_1->zStride());
128 const int64_t _stride_rho_2_0 = int64_t(rho_2->xStride());
129 const int64_t _stride_rho_2_1 = int64_t(rho_2->yStride());
130 const int64_t _stride_rho_2_2 = int64_t(rho_2->zStride());
131 const int64_t _stride_rho_3_0 = int64_t(rho_3->xStride());
132 const int64_t _stride_rho_3_1 = int64_t(rho_3->yStride());
133 const int64_t _stride_rho_3_2 = int64_t(rho_3->zStride());
134 const int64_t _stride_rho_4_0 = int64_t(rho_4->xStride());
135 const int64_t _stride_rho_4_1 = int64_t(rho_4->yStride());
136 const int64_t _stride_rho_4_2 = int64_t(rho_4->zStride());
137 internal_c656da8359b8f47f0007107280d91a58::reactionkernelindexed_5_single_precision_boundary_ReactionKernelIndexed_5_single_precision(_data_indexVector, _data_rho_0, _data_rho_1, _data_rho_2, _data_rho_3, _data_rho_4, _stride_rho_0_0, _stride_rho_0_1, _stride_rho_0_2, _stride_rho_1_0, _stride_rho_1_1, _stride_rho_1_2, _stride_rho_2_0, _stride_rho_2_1, _stride_rho_2_2, _stride_rho_3_0, _stride_rho_3_1, _stride_rho_3_2, _stride_rho_4_0, _stride_rho_4_1, _stride_rho_4_2, indexVectorSize, order_0, order_1, order_2, order_3, order_4, rate_coefficient, stoech_0, stoech_1, stoech_2, stoech_3, stoech_4);
#define FUNC_PREFIX
\file AdvectiveFluxKernel_double_precision.cpp \author pystencils
#define RESTRICT
\file AdvectiveFluxKernel_double_precision.h \author pystencils
void inner(IBlock *block)
void outer(IBlock *block)
static double * block(double *p, std::size_t index, std::size_t size)
static FUNC_PREFIX void reactionkernelindexed_5_single_precision_boundary_ReactionKernelIndexed_5_single_precision(uint8_t *RESTRICT const _data_indexVector, float *RESTRICT _data_rho_0, float *RESTRICT _data_rho_1, float *RESTRICT _data_rho_2, float *RESTRICT _data_rho_3, float *RESTRICT _data_rho_4, int64_t const _stride_rho_0_0, int64_t const _stride_rho_0_1, int64_t const _stride_rho_0_2, int64_t const _stride_rho_1_0, int64_t const _stride_rho_1_1, int64_t const _stride_rho_1_2, int64_t const _stride_rho_2_0, int64_t const _stride_rho_2_1, int64_t const _stride_rho_2_2, int64_t const _stride_rho_3_0, int64_t const _stride_rho_3_1, int64_t const _stride_rho_3_2, int64_t const _stride_rho_4_0, int64_t const _stride_rho_4_1, int64_t const _stride_rho_4_2, int32_t indexVectorSize, float order_0, float order_1, float order_2, float order_3, float order_4, float rate_coefficient, float stoech_0, float stoech_1, float stoech_2, float stoech_3, float stoech_4)
\file PackInfoPdfDoublePrecision.cpp \author pystencils