25#include "core/DataTypes.h"
26#include "core/logging/Logging.h"
28#include "gpu/GPUField.h"
29#include "gpu/GPUWrapper.h"
31#include "domain_decomposition/BlockDataID.h"
32#include "domain_decomposition/IBlock.h"
33#include "domain_decomposition/StructuredBlockStorage.h"
34#include "field/SwapableCompare.h"
38#define RESTRICT __restrict__
40#define RESTRICT __restrict
45#if (defined WALBERLA_CXX_COMPILER_IS_GNU) || \
46 (defined WALBERLA_CXX_COMPILER_IS_CLANG)
47#pragma GCC diagnostic push
48#pragma GCC diagnostic ignored "-Wunused-parameter"
49#pragma GCC diagnostic ignored "-Wreorder"
58 BlockDataID forceID_, BlockDataID pdfsID_,
double kT,
double omega_bulk,
59 double omega_even,
double omega_odd,
double omega_shear, uint32_t seed,
69 const CellInterval &globalCellInterval,
70 cell_idx_t ghostLayers, IBlock *
block,
71 gpuStream_t
stream =
nullptr);
78 const shared_ptr<CollideSweepDoublePrecisionThermalizedCUDA> &kernel) {
79 return [kernel](IBlock *b) { kernel->run(b); };
83 const shared_ptr<CollideSweepDoublePrecisionThermalizedCUDA> &kernel,
84 const shared_ptr<StructuredBlockStorage> &blocks,
85 const CellInterval &globalCellInterval, cell_idx_t ghostLayers = 1) {
86 return [kernel, blocks, globalCellInterval,
87 ghostLayers](IBlock *b, gpuStream_t
stream =
nullptr) {
88 kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b,
97 std::function<void(IBlock *)>
99 const CellInterval &globalCellInterval,
100 cell_idx_t ghostLayers = 1,
101 gpuStream_t
stream =
nullptr) {
102 return [
this, blocks, globalCellInterval, ghostLayers,
stream](IBlock *b) {
108 void configure(
const shared_ptr<StructuredBlockStorage> &blocks,
110 Cell BlockCellBB = blocks->getBlockCellBB(*block).min();
135#if (defined WALBERLA_CXX_COMPILER_IS_GNU) || \
136 (defined WALBERLA_CXX_COMPILER_IS_CLANG)
137#pragma GCC diagnostic pop
static std::function< void(IBlock *)> getSweep(const shared_ptr< CollideSweepDoublePrecisionThermalizedCUDA > &kernel)
void run(IBlock *block, gpuStream_t stream=nullptr)
void operator()(IBlock *block, gpuStream_t stream=nullptr)
std::function< void(IBlock *)> getSweep(gpuStream_t stream=nullptr)
void runOnCellInterval(const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers, IBlock *block, gpuStream_t stream=nullptr)
std::function< void(IBlock *)> getSweepOnCellInterval(const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers=1, gpuStream_t stream=nullptr)
static std::function< void(IBlock *, gpuStream_t)> getSweepOnCellInterval(const shared_ptr< CollideSweepDoublePrecisionThermalizedCUDA > &kernel, const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers=1)
void configure(const shared_ptr< StructuredBlockStorage > &blocks, IBlock *block)
CollideSweepDoublePrecisionThermalizedCUDA(BlockDataID forceID_, BlockDataID pdfsID_, double kT, double omega_bulk, double omega_even, double omega_odd, double omega_shear, uint32_t seed, uint32_t time_step)
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
static double * block(double *p, std::size_t index, std::size_t size)
\file PackInfoPdfDoublePrecision.cpp \author pystencils