Stokhos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
Stokhos::ds_array< T, isScalar > Struct Template Reference

Dynamic array allocation class that works for any type. More...

#include <Stokhos_DynamicArrayTraits.hpp>

Static Public Member Functions

static T * get_and_fill (int sz)
 Get memory for new array of length sz and fill with zeros.
 
static T * get_and_fill (const T *src, int sz)
 Get memory for new array of length sz and fill with entries from src.
 
static void copy (const T *src, T *dest, int sz)
 Copy array from src to dest of length sz.
 
static void zero (T *dest, int sz)
 Zero out array dest of length sz.
 
static void destroy_and_release (T *m, int sz)
 Destroy array elements and release memory.
 

Detailed Description

template<typename T, bool isScalar = IsScalarType<T>::value>
struct Stokhos::ds_array< T, isScalar >

Dynamic array allocation class that works for any type.

Definition at line 79 of file Stokhos_DynamicArrayTraits.hpp.

Member Function Documentation

◆ get_and_fill() [1/2]

template<typename T , bool isScalar = IsScalarType<T>::value>
static T * Stokhos::ds_array< T, isScalar >::get_and_fill ( int sz)
inlinestatic

Get memory for new array of length sz and fill with zeros.

Definition at line 82 of file Stokhos_DynamicArrayTraits.hpp.

◆ get_and_fill() [2/2]

template<typename T , bool isScalar = IsScalarType<T>::value>
static T * Stokhos::ds_array< T, isScalar >::get_and_fill ( const T * src,
int sz )
inlinestatic

Get memory for new array of length sz and fill with entries from src.

Definition at line 94 of file Stokhos_DynamicArrayTraits.hpp.

◆ copy()

template<typename T , bool isScalar = IsScalarType<T>::value>
static void Stokhos::ds_array< T, isScalar >::copy ( const T * src,
T * dest,
int sz )
inlinestatic

Copy array from src to dest of length sz.

Definition at line 103 of file Stokhos_DynamicArrayTraits.hpp.

◆ zero()

template<typename T , bool isScalar = IsScalarType<T>::value>
static void Stokhos::ds_array< T, isScalar >::zero ( T * dest,
int sz )
inlinestatic

Zero out array dest of length sz.

Definition at line 109 of file Stokhos_DynamicArrayTraits.hpp.

◆ destroy_and_release()

template<typename T , bool isScalar = IsScalarType<T>::value>
static void Stokhos::ds_array< T, isScalar >::destroy_and_release ( T * m,
int sz )
inlinestatic

Destroy array elements and release memory.

Definition at line 115 of file Stokhos_DynamicArrayTraits.hpp.


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