Block-Structured AMR Software Framework
AMReX_BArena.H
Go to the documentation of this file.
1 #ifndef AMREX_BARENA_H_
2 #define AMREX_BARENA_H_
3 #include <AMReX_Config.H>
4 
5 #include <AMReX_Arena.H>
6 
7 
8 namespace amrex {
14 class BArena
15  :
16  public Arena
17 {
18 public:
23  [[nodiscard]] void* alloc (std::size_t sz) final;
27  void free (void* pt) final;
28 
29  [[nodiscard]] bool isDeviceAccessible () const final;
30  [[nodiscard]] bool isHostAccessible () const final;
31 
32  [[nodiscard]] bool isManaged () const final;
33  [[nodiscard]] bool isDevice () const final;
34  [[nodiscard]] bool isPinned () const final;
35 };
36 
37 }
38 
39 #endif
A virtual base class for objects that manage their own dynamic memory allocation.
Definition: AMReX_Arena.H:100
A Concrete Class for Dynamic Memory Management This is the simplest dynamic memory management class d...
Definition: AMReX_BArena.H:17
bool isPinned() const final
Definition: AMReX_BArena.cpp:43
void free(void *pt) final
Deletes the arena pointed to by pt.
Definition: AMReX_BArena.cpp:12
bool isManaged() const final
Definition: AMReX_BArena.cpp:31
bool isHostAccessible() const final
Definition: AMReX_BArena.cpp:25
bool isDevice() const final
Definition: AMReX_BArena.cpp:37
void * alloc(std::size_t sz) final
Allocates a dynamic memory arena of size sz. Returns a pointer to this memory.
Definition: AMReX_BArena.cpp:4
bool isDeviceAccessible() const final
Definition: AMReX_BArena.cpp:19
Definition: AMReX_Amr.cpp:49