Block-Structured AMR Software Framework
AMReX_GpuLaunchGlobal.H
Go to the documentation of this file.
1 #ifndef AMREX_GPU_LAUNCH_GLOBAL_H_
2 #define AMREX_GPU_LAUNCH_GLOBAL_H_
3 #include <AMReX_Config.H>
4 
5 #include <AMReX_GpuQualifiers.H>
6 
7 namespace amrex {
8 
9 #if defined(AMREX_USE_CUDA) || defined(AMREX_USE_HIP)
10  // We cannot take rvalue lambdas.
11  template<class L>
12  AMREX_GPU_GLOBAL void launch_global (L f0) { f0(); }
13 
14  template<int amrex_launch_bounds_max_threads, class L>
15  __launch_bounds__(amrex_launch_bounds_max_threads)
16  AMREX_GPU_GLOBAL void launch_global (L f0) { f0(); }
17 
18  template<int amrex_launch_bounds_max_threads, int min_blocks, class L>
19  __launch_bounds__(amrex_launch_bounds_max_threads, min_blocks)
20  AMREX_GPU_GLOBAL void launch_global (L f0) { f0(); }
21 #endif
22 
23 }
24 
25 #endif
#define AMREX_GPU_GLOBAL
Definition: AMReX_GpuQualifiers.H:19
Definition: AMReX_Amr.cpp:49
__launch_bounds__(amrex_launch_bounds_max_threads) AMREX_GPU_GLOBAL void launch_global(L f0)
Definition: AMReX_GpuLaunchGlobal.H:15
AMREX_GPU_GLOBAL void launch_global(L f0, Lambdas... fs)
Definition: AMReX_GpuLaunch.H:51