Block-Structured AMR Software Framework
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
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
6
7#if defined(AMREX_USE_CUDA) && defined(__GNUC__)
8#pragma GCC diagnostic push
9#pragma GCC diagnostic ignored "-Wunused-parameter"
10#endif
11
12namespace amrex {
13
14#if defined(AMREX_USE_CUDA) || defined(AMREX_USE_HIP)
15 // We cannot take rvalue lambdas.
16 template<class L>
17 AMREX_GPU_GLOBAL void launch_global (L f0) { f0(); }
18
19 template<int amrex_launch_bounds_max_threads, class L>
20 __launch_bounds__(amrex_launch_bounds_max_threads)
21 AMREX_GPU_GLOBAL void launch_global (L f0) { f0(); }
22
23 template<int amrex_launch_bounds_max_threads, int min_blocks, class L>
24 __launch_bounds__(amrex_launch_bounds_max_threads, min_blocks)
25 AMREX_GPU_GLOBAL void launch_global (L f0) { f0(); }
26#endif
27
28}
29
30#if defined(AMREX_USE_CUDA) && defined(__GNUC__)
31#pragma GCC diagnostic pop
32#endif
33
34#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:20
AMREX_GPU_GLOBAL void launch_global(L f0, Lambdas... fs)
Definition AMReX_GpuLaunch.H:51