1 #ifndef AMREX_PARENA_H_
2 #define AMREX_PARENA_H_
3 #include <AMReX_Config.H>
23 PArena (Long release_threshold);
30 [[nodiscard]]
void*
alloc (std::size_t nbytes)
final;
31 void free (
void* p)
final;
36 [[nodiscard]]
bool isManaged () const final;
37 [[nodiscard]]
bool isDevice () const final;
38 [[nodiscard]]
bool isPinned () const final;
45 #ifdef AMREX_GPU_STREAM_ALLOC_SUPPORT
52 uint64_t m_old_release_threshold;,
53 cuuint64_t m_old_release_threshold;
#define AMREX_HIP_OR_CUDA(a, b)
Definition: AMReX_GpuControl.H:21
A virtual base class for objects that manage their own dynamic memory allocation.
Definition: AMReX_Arena.H:100
This arena uses CUDA stream-ordered memory allocator if available. If not, use The_Arena().
Definition: AMReX_PArena.H:21
void * alloc(std::size_t nbytes) final
Definition: AMReX_PArena.cpp:54
PArena(Long release_threshold)
Definition: AMReX_PArena.cpp:12
~PArena() override
Definition: AMReX_PArena.cpp:39
bool isManaged() const final
Definition: AMReX_PArena.cpp:158
bool isStreamOrderedArena() const final
Is this CUDA stream ordered memory allocator?
Definition: AMReX_PArena.H:42
void free(void *p) final
A pure virtual function for deleting the arena pointed to by pt.
Definition: AMReX_PArena.cpp:89
PArena & operator=(const PArena &rhs)=delete
bool isPinned() const final
Definition: AMReX_PArena.cpp:192
bool isDeviceAccessible() const final
Definition: AMReX_PArena.cpp:124
PArena(PArena &&rhs)=delete
bool isHostAccessible() const final
Definition: AMReX_PArena.cpp:141
PArena(const PArena &rhs)=delete
bool isDevice() const final
Definition: AMReX_PArena.cpp:175
Definition: AMReX_Amr.cpp:49