Block-Structured AMR Software Framework
AMReX_GpuControl.H File Reference
#include <AMReX_Config.H>
#include <AMReX_GpuQualifiers.H>
#include <AMReX_GpuTypes.H>
#include <utility>

Go to the source code of this file.

Classes

struct  amrex::Gpu::LaunchSafeGuard
 
struct  amrex::Gpu::GraphSafeGuard
 
struct  amrex::Gpu::SingleStreamRegion
 
struct  amrex::Gpu::NoSyncRegion
 

Namespaces

 amrex
 
 amrex::Gpu
 

Macros

#define AMREX_HIP_OR_CUDA(a, b)   b
 
#define AMREX_HIP_OR_CUDA_OR_SYCL(a, b, c)   b
 
#define AMREX_GPU_OR_CPU(a, b)   a
 
#define AMREX_SYCL_ONLY(a)   ((void)0)
 
#define AMREX_SYCL_1D_ONLY(a)   ((void)0)
 
#define AMREX_SYCL_2D_ONLY(a)   ((void)0)
 
#define AMREX_SYCL_3D_ONLY(a)   ((void)0)
 

Typedefs

using amrex::gpuStream_t = cudaStream_t
 

Enumerations

enum class  amrex::RunOn { amrex::Gpu , amrex::Cpu , amrex::Device =Gpu , amrex::Host =Cpu }
 

Functions

bool amrex::Gpu::inLaunchRegion () noexcept
 
bool amrex::Gpu::notInLaunchRegion () noexcept
 
bool amrex::Gpu::setLaunchRegion (bool launch) noexcept
 
bool amrex::Gpu::inGraphRegion ()
 
bool amrex::Gpu::notInGraphRegion ()
 
bool amrex::Gpu::setGraphRegion (bool graph)
 
bool amrex::Gpu::inSingleStreamRegion () noexcept
 
bool amrex::Gpu::inNoSyncRegion () noexcept
 
bool amrex::Gpu::setSingleStreamRegion (bool b) noexcept
 
bool amrex::Gpu::setNoSyncRegion (bool b) noexcept
 

Macro Definition Documentation

◆ AMREX_GPU_OR_CPU

#define AMREX_GPU_OR_CPU (   a,
 
)    a

◆ AMREX_HIP_OR_CUDA

#define AMREX_HIP_OR_CUDA (   a,
 
)    b

◆ AMREX_HIP_OR_CUDA_OR_SYCL

#define AMREX_HIP_OR_CUDA_OR_SYCL (   a,
  b,
 
)    b

◆ AMREX_SYCL_1D_ONLY

#define AMREX_SYCL_1D_ONLY (   a)    ((void)0)

◆ AMREX_SYCL_2D_ONLY

#define AMREX_SYCL_2D_ONLY (   a)    ((void)0)

◆ AMREX_SYCL_3D_ONLY

#define AMREX_SYCL_3D_ONLY (   a)    ((void)0)

◆ AMREX_SYCL_ONLY

#define AMREX_SYCL_ONLY (   a)    ((void)0)