AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::detail::DefaultStoragePolicy< T > Class Template Reference

Default storage policy for axom::Array. Uses Umpire to reallocate buffers. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/core/Array.hpp>

Inheritance diagram for axom::detail::DefaultStoragePolicy< T >:

Public Member Functions

template<int Dims>
void onShapeUpdate (StackArray< IndexType, Dims >)
 Callback to report changes in shape of data in Array. More...
 
template<typename Func >
T * reallocate (T *old_data, int, int allocator_id, int new_capacity, Func &&nontrivial_move)
 Reallocates a buffer. More...
 
void deallocate (T *data)
 Frees a buffer. More...
 

Detailed Description

template<typename T>
class axom::detail::DefaultStoragePolicy< T >

Default storage policy for axom::Array. Uses Umpire to reallocate buffers.

Member Function Documentation

◆ onShapeUpdate()

template<typename T >
template<int Dims>
void axom::detail::DefaultStoragePolicy< T >::onShapeUpdate ( StackArray< IndexType, Dims >  )
inline

Callback to report changes in shape of data in Array.

Parameters
[in]shapethe current dimensions of the array

◆ reallocate()

template<typename T >
template<typename Func >
T* axom::detail::DefaultStoragePolicy< T >::reallocate ( T *  old_data,
int  ,
int  allocator_id,
int  new_capacity,
Func &&  nontrivial_move 
)
inline

Reallocates a buffer.

Parameters
[in]old_datapointer to the old buffer
[in]old_capacitythe capacity of the currently allocated buffer
[in]allocator_idthe allocator ID to use
[in]new_capacitythe capacity to allocate
[in]nontrivial_movea callback to move elements that aren't trivially copyable
Returns
a pointer to the new buffer with moved elements

References axom::deallocate().

◆ deallocate()

template<typename T >
void axom::detail::DefaultStoragePolicy< T >::deallocate ( T *  data)
inline

Frees a buffer.

References axom::deallocate().


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