23#define RESTRICT __restrict__
24#if defined(__NVCC_DIAG_PRAGMA_SUPPORT__)
25#pragma nv_diagnostic push
26#pragma nv_diag_suppress 554
29#pragma diag_suppress 554
36#if defined(__NVCC_DIAG_PRAGMA_SUPPORT__)
37#pragma nv_diagnostic pop
47#include <gpu/DeviceSelectMPI.h>
48#include <waLBerlaDefinitions.h>
53std::shared_ptr<LBWalberlaBase>
55 double viscosity,
double density,
bool single_precision) {
56#if not defined(WALBERLA_BUILD_WITH_CUDA)
57 throw std::runtime_error(
"waLBerla was compiled without CUDA support");
59 if (single_precision) {
60 return std::make_shared<walberla::LBWalberlaImpl<float, lbmpy::Arch::GPU>>(
63 return std::make_shared<walberla::LBWalberlaImpl<double, lbmpy::Arch::GPU>>(
69#if not defined(WALBERLA_BUILD_WITH_CUDA)
70 throw std::runtime_error(
"waLBerla was compiled without CUDA support");
72 walberla::gpu::selectDeviceBasedOnMpiRank();
LBWalberlaBase provides the public interface of the LB waLBerla bridge.
walberla::LBWalberlaImpl implements the interface of the LB waLBerla bridge using sweeps generated by...
std::shared_ptr< LBWalberlaBase > new_lb_walberla_gpu(std::shared_ptr< LatticeWalberla > const &lattice, double viscosity, double density, bool single_precision)
void set_device_id_per_rank()