Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
AMReX_GpuLaunch.nolint.H File Reference

Go to the source code of this file.

Macros

#define AMREX_GET_LAUNCH_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, NAME, ...)
#define AMREX_LAUNCH_DEVICE_LAMBDA(...)
#define AMREX_LAUNCH_HOST_DEVICE_LAMBDA(...)
#define AMREX_LAUNCH_DEVICE_LAMBDA_DIM(...)
#define AMREX_LAUNCH_HOST_DEVICE_LAMBDA_DIM(...)
#define AMREX_LAUNCH_HOST_DEVICE_LAMBDA_DIM_FLAG(...)
#define AMREX_HOST_DEVICE_PARALLEL_FOR_1D_FLAG(where_to_run, n, i, block)
#define AMREX_HOST_DEVICE_PARALLEL_FOR_3D_FLAG(where_to_run, box, i, j, k, block)
#define AMREX_HOST_DEVICE_PARALLEL_FOR_4D_FLAG(where_to_run, box, nc, i, j, k, n, block)
#define AMREX_HOST_DEVICE_FOR_1D_FLAG(where_to_run, n, i, block)
#define AMREX_HOST_DEVICE_FOR_3D_FLAG(where_to_run, box, i, j, k, block)
#define AMREX_HOST_DEVICE_FOR_4D_FLAG(where_to_run, box, nc, i, j, k, n, block)
#define AMREX_LAUNCH_HOST_DEVICE_LAMBDA_FLAG(where_to_run, box, tbox, block)
#define AMREX_LAUNCH_HOST_DEVICE_LAMBDA_RANGE_FLAG(where_to_run, bx1, tbx1, block1)
#define AMREX_LAUNCH_HOST_DEVICE_LAMBDA_RANGE_2_FLAG(where_to_run, bx1, tbx1, block1, bx2, tbx2, block2)
#define AMREX_LAUNCH_HOST_DEVICE_LAMBDA_RANGE_3_FLAG(where_to_run, bx1, tbx1, block1, bx2, tbx2, block2, bx3, tbx3, block3)

Macro Definition Documentation

◆ AMREX_GET_LAUNCH_MACRO

#define AMREX_GET_LAUNCH_MACRO ( _1,
_2,
_3,
_4,
_5,
_6,
_7,
_8,
_9,
NAME,
... )
Value:
NAME

◆ AMREX_HOST_DEVICE_FOR_1D_FLAG

#define AMREX_HOST_DEVICE_FOR_1D_FLAG ( where_to_run,
n,
i,
block )
Value:
{ using amrex_i_inttype = std::remove_const_t<decltype(n)>; \
if ((where_to_run == RunOn::Device) && (Gpu::inLaunchRegion())) \
{ \
amrex::ParallelFor(n, [=] AMREX_GPU_DEVICE (amrex_i_inttype i) noexcept \
block \
); \
} \
else { \
for (amrex_i_inttype i = 0; i < n; ++i) { \
block \
} \
}}
#define AMREX_GPU_DEVICE
Definition AMReX_GpuQualifiers.H:18

◆ AMREX_HOST_DEVICE_FOR_3D_FLAG

#define AMREX_HOST_DEVICE_FOR_3D_FLAG ( where_to_run,
box,
i,
j,
k,
block )
Value:
{ \
if ((where_to_run == RunOn::Device) && (Gpu::inLaunchRegion())) \
{ \
amrex::ParallelFor(box, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept \
block \
); \
} \
else { \
amrex::LoopOnCpu(box, [=] (int i, int j, int k) noexcept \
block \
); \
} \
}

◆ AMREX_HOST_DEVICE_FOR_4D_FLAG

#define AMREX_HOST_DEVICE_FOR_4D_FLAG ( where_to_run,
box,
nc,
i,
j,
k,
n,
block )
Value:
{ \
if ((where_to_run == RunOn::Device) && (Gpu::inLaunchRegion())) \
{ \
amrex::ParallelFor(box, nc, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) noexcept \
block \
); \
} \
else { \
amrex::LoopOnCpu(box, nc, [=] (int i, int j, int k, int n) noexcept \
block \
); \
} \
}

◆ AMREX_HOST_DEVICE_PARALLEL_FOR_1D_FLAG

#define AMREX_HOST_DEVICE_PARALLEL_FOR_1D_FLAG ( where_to_run,
n,
i,
block )
Value:
{ using amrex_i_inttype = std::remove_const_t<decltype(n)>; \
if ((where_to_run == RunOn::Device) && (Gpu::inLaunchRegion())) \
{ \
amrex::ParallelFor(n, [=] AMREX_GPU_DEVICE (amrex_i_inttype i) noexcept \
block \
); \
} \
else { \
AMREX_PRAGMA_SIMD \
for (amrex_i_inttype i = 0; i < n; ++i) { \
block \
} \
}}

◆ AMREX_HOST_DEVICE_PARALLEL_FOR_3D_FLAG

#define AMREX_HOST_DEVICE_PARALLEL_FOR_3D_FLAG ( where_to_run,
box,
i,
j,
k,
block )
Value:
{ \
if ((where_to_run == RunOn::Device) && (Gpu::inLaunchRegion())) \
{ \
amrex::ParallelFor(box, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept \
block \
); \
} \
else { \
amrex::LoopConcurrentOnCpu(box, [=] (int i, int j, int k) noexcept \
block \
); \
} \
}

◆ AMREX_HOST_DEVICE_PARALLEL_FOR_4D_FLAG

#define AMREX_HOST_DEVICE_PARALLEL_FOR_4D_FLAG ( where_to_run,
box,
nc,
i,
j,
k,
n,
block )
Value:
{ \
if ((where_to_run == RunOn::Device) && (Gpu::inLaunchRegion())) \
{ \
amrex::ParallelFor(box, nc, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) noexcept \
block \
); \
} \
else { \
amrex::LoopConcurrentOnCpu(box, nc, [=] (int i, int j, int k, int n) noexcept \
block \
); \
} \
}

◆ AMREX_LAUNCH_DEVICE_LAMBDA

#define AMREX_LAUNCH_DEVICE_LAMBDA ( ...)
Value:
AMREX_GET_LAUNCH_MACRO(__VA_ARGS__,\
AMREX_WRONG_NUM_ARGS)(__VA_ARGS__)
#define AMREX_GPU_LAUNCH_DEVICE_LAMBDA_RANGE_2(...)
Definition AMReX_GpuLaunchMacrosC.nolint.H:35
#define AMREX_GPU_LAUNCH_DEVICE_LAMBDA_RANGE(...)
Definition AMReX_GpuLaunchMacrosC.nolint.H:34
#define AMREX_GPU_LAUNCH_DEVICE_LAMBDA_RANGE_3(...)
Definition AMReX_GpuLaunchMacrosC.nolint.H:36
#define AMREX_GET_LAUNCH_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, NAME,...)
Definition AMReX_GpuLaunch.nolint.H:4
#define AMREX_WRONG_NUM_ARGS(...)
Definition AMReX_GpuQualifiers.H:67

◆ AMREX_LAUNCH_DEVICE_LAMBDA_DIM

#define AMREX_LAUNCH_DEVICE_LAMBDA_DIM ( ...)

◆ AMREX_LAUNCH_HOST_DEVICE_LAMBDA

#define AMREX_LAUNCH_HOST_DEVICE_LAMBDA ( ...)
Value:
AMREX_GET_LAUNCH_MACRO(__VA_ARGS__,\
AMREX_WRONG_NUM_ARGS)(__VA_ARGS__)
#define AMREX_GPU_LAUNCH_HOST_DEVICE_LAMBDA_RANGE_3(TN1, TI1, block1, TN2, TI2, block2, TN3, TI3, block3)
Definition AMReX_GpuLaunchMacrosC.nolint.H:21
#define AMREX_GPU_LAUNCH_HOST_DEVICE_LAMBDA_RANGE_2(TN1, TI1, block1, TN2, TI2, block2)
Definition AMReX_GpuLaunchMacrosC.nolint.H:11
#define AMREX_GPU_LAUNCH_HOST_DEVICE_LAMBDA_RANGE(TN, TI, block)
Definition AMReX_GpuLaunchMacrosC.nolint.H:4

◆ AMREX_LAUNCH_HOST_DEVICE_LAMBDA_DIM

#define AMREX_LAUNCH_HOST_DEVICE_LAMBDA_DIM ( ...)

◆ AMREX_LAUNCH_HOST_DEVICE_LAMBDA_DIM_FLAG

#define AMREX_LAUNCH_HOST_DEVICE_LAMBDA_DIM_FLAG ( ...)
Value:
#define AMREX_LAUNCH_HOST_DEVICE_LAMBDA_RANGE_3_FLAG(where_to_run, bx1, tbx1, block1, bx2, tbx2, block2, bx3, tbx3, block3)
Definition AMReX_GpuLaunch.nolint.H:172

◆ AMREX_LAUNCH_HOST_DEVICE_LAMBDA_FLAG

#define AMREX_LAUNCH_HOST_DEVICE_LAMBDA_FLAG ( where_to_run,
box,
tbox,
block )
Value:
if ((where_to_run == RunOn::Device) && (Gpu::inLaunchRegion())) \
{ \
AMREX_LAUNCH_DEVICE_LAMBDA(box,tbox,block); \
} else { \
auto tbox = box; \
block; \
}

◆ AMREX_LAUNCH_HOST_DEVICE_LAMBDA_RANGE_2_FLAG

#define AMREX_LAUNCH_HOST_DEVICE_LAMBDA_RANGE_2_FLAG ( where_to_run,
bx1,
tbx1,
block1,
bx2,
tbx2,
block2 )
Value:
if ((where_to_run == RunOn::Device) && (Gpu::inLaunchRegion())) \
{ \
AMREX_LAUNCH_DEVICE_LAMBDA(bx1,tbx1,block1,bx2,tbx2,block2); \
} else { \
auto tbx1 = bx1; \
auto tbx2 = bx2; \
block1; \
block2; \
}

◆ AMREX_LAUNCH_HOST_DEVICE_LAMBDA_RANGE_3_FLAG

#define AMREX_LAUNCH_HOST_DEVICE_LAMBDA_RANGE_3_FLAG ( where_to_run,
bx1,
tbx1,
block1,
bx2,
tbx2,
block2,
bx3,
tbx3,
block3 )
Value:
if ((where_to_run == RunOn::Device) && (Gpu::inLaunchRegion())) \
{ \
AMREX_LAUNCH_DEVICE_LAMBDA(bx1,tbx1,block1,bx2,tbx2,block2,bx3,tbx3,block3); \
} else { \
auto tbx1 = bx1; \
auto tbx2 = bx2; \
auto tbx3 = bx3; \
block1; \
block2; \
block3; \
}

◆ AMREX_LAUNCH_HOST_DEVICE_LAMBDA_RANGE_FLAG

#define AMREX_LAUNCH_HOST_DEVICE_LAMBDA_RANGE_FLAG ( where_to_run,
bx1,
tbx1,
block1 )
Value:
if ((where_to_run == RunOn::Device) && (Gpu::inLaunchRegion())) \
{ \
AMREX_LAUNCH_DEVICE_LAMBDA(bx1,tbx1,block1); \
} else { \
auto tbx1 = bx1; \
block1; \
}