Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
AMReX_GpuUtility.H File Reference
#include <AMReX_Config.H>
#include <AMReX_GpuQualifiers.H>
#include <AMReX_GpuTypes.H>
#include <AMReX_GpuControl.H>
#include <AMReX_GpuDevice.H>
#include <AMReX_Extension.H>
#include <AMReX_REAL.H>
#include <AMReX_INT.H>
#include <AMReX_Math.H>
#include <AMReX_Array.H>
#include <AMReX_Array4.H>
#include <iosfwd>
#include <cmath>
#include <cstring>
#include <cuda.h>
#include <curand_kernel.h>

Go to the source code of this file.

Classes

struct  amrex::Gpu::StreamItInfo
class  amrex::Gpu::StreamIter

Namespaces

namespace  amrex
namespace  amrex::Gpu

Macros

#define AMREX_GET_DEVICE_FUNC_PTR(FP_t, sym)

Functions

template<typename T>
__host__ __device__ T amrex::Gpu::LDG (Array4< T > const &a, int i, int j, int k) noexcept
template<typename T>
__host__ __device__ T amrex::Gpu::LDG (Array4< T > const &a, int i, int j, int k, int n) noexcept
bool amrex::Gpu::isManaged (void const *p) noexcept
bool amrex::Gpu::isDevicePtr (void const *p) noexcept
bool amrex::Gpu::isPinnedPtr (void const *p) noexcept
bool amrex::Gpu::isGpuPtr (void const *p) noexcept
__host__ __device__ void * amrex::Gpu::memcpy (void *dest, const void *src, std::size_t count)
std::ostream & amrex::operator<< (std::ostream &os, const dim3 &d)
template<typename T>
__host__ __device__ bool amrex::Gpu::isnan (T x) noexcept
 Return true if x is NaN. Works under fast math.
template<typename T>
__host__ __device__ bool amrex::Gpu::isinf (T x) noexcept
 Return true if x is +/-infinity. Works under fast math.
template<typename T>
__host__ __device__ bool amrex::Gpu::isfinite (T x) noexcept
 Return true if x is neither NaN nor infinity. Works under fast math.

Macro Definition Documentation

◆ AMREX_GET_DEVICE_FUNC_PTR

#define AMREX_GET_DEVICE_FUNC_PTR ( FP_t,
sym )
Value:
[] () { \
auto* amrex_i_hp = (FP_t*) amrex::The_Pinned_Arena()->alloc(sizeof(FP_t)); \
amrex::single_task([=] AMREX_GPU_DEVICE () { *amrex_i_hp = sym; }); \
amrex::Gpu::streamSynchronize(); \
auto amrex_i_r = *amrex_i_hp; \
amrex::The_Pinned_Arena()->free(amrex_i_hp); \
return amrex_i_r; \
} ()
#define AMREX_GPU_DEVICE
Definition AMReX_GpuQualifiers.H:18
Arena * The_Pinned_Arena()
Definition AMReX_Arena.cpp:879