1 #ifndef AMREX_SUNMEMORY_H_
2 #define AMREX_SUNMEMORY_H_
6 #include <sundials/sundials_context.h>
7 #include <sundials/sundials_memory.h>
24 operator SUNMemoryHelper()
const {
return helper; }
A virtual base class for objects that manage their own dynamic memory allocation.
Definition: AMReX_Arena.H:100
A SUNDIALS SUNMemoryHelper interface to the amrex::Arena.
Definition: AMReX_SUNMemory.H:16
MemoryHelper(::sundials::Context *sunctx)
Definition: AMReX_SUNMemory.cpp:136
~MemoryHelper()
Definition: AMReX_SUNMemory.cpp:142
SUNMemoryHelper helper
Definition: AMReX_SUNMemory.H:29
static void Initialize(int nthreads)
Definition: AMReX_SUNMemory.cpp:174
MemoryHelper & operator=(MemoryHelper const &rhs)=delete
::sundials::Context * sunctx
Definition: AMReX_SUNMemory.H:30
static void Finalize()
Definition: AMReX_SUNMemory.cpp:190
constexpr int get_thread_num()
Definition: AMReX_OpenMP.H:37
Definition: AMReX_NVector_MultiFab.cpp:15
MemoryHelper * The_SUNMemory_Helper(int i)
Get the i-th SUNMemoryHelper instance.
Definition: AMReX_SUNMemory.cpp:199
amrex::Arena * getArena(SUNMemoryType type)
Get the proper amrex::Arena based on the SUNMemoryType.