1#ifndef AMREX_GPU_LAUNCH_GLOBAL_H_
2#define AMREX_GPU_LAUNCH_GLOBAL_H_
3#include <AMReX_Config.H>
7#if defined(AMREX_USE_CUDA) && defined(__GNUC__)
8#pragma GCC diagnostic push
9#pragma GCC diagnostic ignored "-Wunused-parameter"
14#if defined(AMREX_USE_CUDA) || defined(AMREX_USE_HIP)
19#if defined(AMREX_USE_CUDA) && defined(AMREX_GPU_MIN_BLOCKS)
26 constexpr int launch_min_blocks (
int mt) {
27 int n = AMREX_GPU_MIN_BLOCKS * AMREX_GPU_MAX_THREADS / mt;
28 return (n < 1) ? 1 : ((n > 16) ? 16 : n);
36 template<
int amrex_launch_bounds_max_threads,
class L>
37#if defined(AMREX_USE_CUDA) && defined(AMREX_GPU_MIN_BLOCKS)
38 __launch_bounds__(amrex_launch_bounds_max_threads,
39 detail::launch_min_blocks(amrex_launch_bounds_max_threads))
41 __launch_bounds__(amrex_launch_bounds_max_threads)
45 template<
int amrex_launch_bounds_max_threads,
int min_blocks,
class L>
46 __launch_bounds__(amrex_launch_bounds_max_threads, min_blocks)
52#if defined(AMREX_USE_CUDA) && defined(__GNUC__)
53#pragma GCC diagnostic pop
#define AMREX_GPU_GLOBAL
Definition AMReX_GpuQualifiers.H:19
Definition AMReX_Amr.cpp:50
__global__ void launch_global(L f0, Lambdas... fs)
Definition AMReX_GpuLaunch.H:68