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

Storage policy for sidre::Array. Uses Sidre to manage buffers. More...

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

Public Member Functions

template<int Dims>
void onShapeUpdate (StackArray< IndexType, Dims > shape)
 Callback to report changes in shape of data in Array. More...
 
template<typename Func >
T * reallocate (T *AXOM_UNUSED_PARAM(old_data), int AXOM_UNUSED_PARAM(old_capacity), int AXOM_UNUSED_PARAM(allocator_id), int new_capacity, Func &&AXOM_UNUSED_PARAM(nontrivial_move))
 Reallocates a buffer. More...
 
void deallocate (T *AXOM_UNUSED_PARAM(data))
 Deallocator callback. Unused since Sidre manages the underlying memory. More...
 
void setView (View *view)
 Sets the underlying Sidre view. More...
 
ViewgetView ()
 Return the underlying Sidre view. More...
 
const ViewgetView () const
 

Static Public Member Functions

static constexpr TypeID sidreTypeId ()
 Return the TypeID corresponding to T. More...
 

Detailed Description

template<typename T>
class axom::sidre::detail::SidreStoragePolicy< T >

Storage policy for sidre::Array. Uses Sidre to manage buffers.

Member Function Documentation

◆ onShapeUpdate()

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

Callback to report changes in shape of data in Array.

Parameters
[in]shapethe current dimensions of the array

References axom::sidre::detail::describeViewImpl(), and axom::sidre::detail::SidreStoragePolicy< T >::sidreTypeId().

◆ reallocate()

template<typename T >
template<typename Func >
T* axom::sidre::detail::SidreStoragePolicy< T >::reallocate ( T *  AXOM_UNUSED_PARAMold_data,
int   AXOM_UNUSED_PARAMold_capacity,
int   AXOM_UNUSED_PARAMallocator_id,
int  new_capacity,
Func &&  AXOM_UNUSED_PARAMnontrivial_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::sidre::View::allocate(), axom::sidre::View::getVoidPtr(), axom::sidre::View::isEmpty(), axom::sidre::View::reallocate(), and axom::sidre::detail::SidreStoragePolicy< T >::sidreTypeId().

◆ deallocate()

template<typename T >
void axom::sidre::detail::SidreStoragePolicy< T >::deallocate ( T *  AXOM_UNUSED_PARAMdata)
inline

Deallocator callback. Unused since Sidre manages the underlying memory.

◆ sidreTypeId()

template<typename T >
static constexpr TypeID axom::sidre::detail::SidreStoragePolicy< T >::sidreTypeId ( )
inlinestaticconstexpr

Return the TypeID corresponding to T.

◆ setView()

template<typename T >
void axom::sidre::detail::SidreStoragePolicy< T >::setView ( View view)
inline

Sets the underlying Sidre view.

◆ getView() [1/2]

template<typename T >
View* axom::sidre::detail::SidreStoragePolicy< T >::getView ( )
inline

Return the underlying Sidre view.

◆ getView() [2/2]

template<typename T >
const View* axom::sidre::detail::SidreStoragePolicy< T >::getView ( ) const
inline

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