Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::sundials::MemoryHelper Class Reference

A SUNDIALS SUNMemoryHelper interface to the amrex::Arena. More...

#include <AMReX_SUNMemory.H>

Public Member Functions

 MemoryHelper (::sundials::Context *sunctx)
 Construct a helper bound to the supplied SUNDIALS context sunctx.
 
 ~MemoryHelper ()
 Destroy the associated SUNMemoryHelper and free resources.
 
 MemoryHelper (const MemoryHelper &rhs)
 Copy-construct a helper (shares the SUNMemoryHelper handle).
 
 MemoryHelper (MemoryHelper &&rhs) noexcept
 Move-construct, transferring ownership of the helper handle.
 
MemoryHelperoperator= (MemoryHelper const &rhs)=delete
 
MemoryHelperoperator= (MemoryHelper &&rhs) noexcept=delete
 
 operator SUNMemoryHelper () const
 Implicit conversion to the underlying SUNMemoryHelper handle.
 

Static Public Member Functions

static void Initialize (int nthreads)
 Allocate one helper per OpenMP thread using the given count.
 
static void Finalize ()
 Destroy all helpers created by Initialize().
 

Detailed Description

A SUNDIALS SUNMemoryHelper interface to the amrex::Arena.

This class allows SUNDIALS to allocate memory using the amrex::Arena.

Constructor & Destructor Documentation

◆ MemoryHelper() [1/3]

amrex::sundials::MemoryHelper::MemoryHelper ( ::sundials::Context *  sunctx)

Construct a helper bound to the supplied SUNDIALS context sunctx.

◆ ~MemoryHelper()

amrex::sundials::MemoryHelper::~MemoryHelper ( )

Destroy the associated SUNMemoryHelper and free resources.

◆ MemoryHelper() [2/3]

amrex::sundials::MemoryHelper::MemoryHelper ( const MemoryHelper rhs)

Copy-construct a helper (shares the SUNMemoryHelper handle).

◆ MemoryHelper() [3/3]

amrex::sundials::MemoryHelper::MemoryHelper ( MemoryHelper &&  rhs)
noexcept

Move-construct, transferring ownership of the helper handle.

Member Function Documentation

◆ Finalize()

void amrex::sundials::MemoryHelper::Finalize ( )
static

Destroy all helpers created by Initialize().

◆ Initialize()

void amrex::sundials::MemoryHelper::Initialize ( int  nthreads)
static

Allocate one helper per OpenMP thread using the given count.

Parameters
nthreadsNumber of thread-local SUNMemoryHelper instances created.

◆ operator SUNMemoryHelper()

amrex::sundials::MemoryHelper::operator SUNMemoryHelper ( ) const
inline

Implicit conversion to the underlying SUNMemoryHelper handle.

◆ operator=() [1/2]

MemoryHelper & amrex::sundials::MemoryHelper::operator= ( MemoryHelper &&  rhs)
deletenoexcept

◆ operator=() [2/2]

MemoryHelper & amrex::sundials::MemoryHelper::operator= ( MemoryHelper const &  rhs)
delete

The documentation for this class was generated from the following files: