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"
60 double omega_shear,
double v_s)
67 const CellInterval &globalCellInterval,
68 cell_idx_t ghostLayers, IBlock *
block,
69 gpuStream_t
stream =
nullptr);
76 const shared_ptr<CollideSweepDoublePrecisionLeesEdwardsCUDA> &kernel) {
77 return [kernel](IBlock *b) { kernel->run(b); };
81 const shared_ptr<CollideSweepDoublePrecisionLeesEdwardsCUDA> &kernel,
82 const shared_ptr<StructuredBlockStorage> &blocks,
83 const CellInterval &globalCellInterval, cell_idx_t ghostLayers = 1) {
84 return [kernel, blocks, globalCellInterval,
85 ghostLayers](IBlock *b, gpuStream_t
stream =
nullptr) {
86 kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b,
95 std::function<void(IBlock *)>
97 const CellInterval &globalCellInterval,
98 cell_idx_t ghostLayers = 1,
99 gpuStream_t
stream =
nullptr) {
100 return [
this, blocks, globalCellInterval, ghostLayers,
stream](IBlock *b) {
106 void configure(
const shared_ptr<StructuredBlockStorage> &blocks,
119#if (defined WALBERLA_CXX_COMPILER_IS_GNU) || \
120 (defined WALBERLA_CXX_COMPILER_IS_CLANG)
121#pragma GCC diagnostic pop
CollideSweepDoublePrecisionLeesEdwardsCUDA(BlockDataID forceID_, BlockDataID pdfsID_, double grid_size, double omega_shear, double v_s)
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< CollideSweepDoublePrecisionLeesEdwardsCUDA > &kernel, const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers=1)
static std::function< void(IBlock *)> getSweep(const shared_ptr< CollideSweepDoublePrecisionLeesEdwardsCUDA > &kernel)
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)
void run(IBlock *block, gpuStream_t stream=nullptr)
void configure(const shared_ptr< StructuredBlockStorage > &blocks, IBlock *block)
void operator()(IBlock *block, gpuStream_t stream=nullptr)
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