3#include <AMReX_Config.H>
39 [[nodiscard]]
void*
alloc (std::size_t sz)
final;
46 void free (
void* pt)
final;
51 [[nodiscard]]
bool isManaged ()
const final;
52 [[nodiscard]]
bool isDevice ()
const final;
53 [[nodiscard]]
bool isPinned ()
const final;
A virtual base class for objects that manage their own dynamic memory allocation.
Definition AMReX_Arena.H:127
A STREAM-ordered memory arena.
Definition AMReX_SArena.H:31
bool isDevice() const final
Check whether it is non-managed GPU device memory.
Definition AMReX_SArena.cpp:48
bool isStreamOrderedArena() const final
Is this a GPU stream ordered memory allocator?
Definition AMReX_SArena.H:57
void * alloc(std::size_t sz) final
Allocates dynamic memory from the arena of size sz. Returns a pointer to this memory....
Definition AMReX_SArena.cpp:5
bool isManaged() const final
Check whether it is managed GPU memory.
Definition AMReX_SArena.cpp:42
bool isPinned() const final
Check whether it is pinned host memory.
Definition AMReX_SArena.cpp:54
void streamOrderedFree(void *pt, gpuStream_t stream) override
Definition AMReX_SArena.cpp:21
bool isDeviceAccessible() const final
Definition AMReX_SArena.cpp:30
void free(void *pt) final
Deletes the arena pointed to by pt. After this function is called, the memory can still be used by al...
Definition AMReX_SArena.cpp:13
bool isHostAccessible() const final
Definition AMReX_SArena.cpp:36
Definition AMReX_Amr.cpp:49
cudaStream_t gpuStream_t
Definition AMReX_GpuControl.H:83