Sacado Package Browser (Single Doxygen Collection)  Version of the Day
Static Public Member Functions | List of all members
Sacado::ds_array< T, true > Struct Template Reference

Dynamic array allocation class that is specialized for scalar i.e., fundamental or built-in types (float, double, etc...). More...

#include <Sacado_DynamicArrayTraits.hpp>

Static Public Member Functions

static KOKKOS_INLINE_FUNCTION Tmy_alloc (const int sz)
 
static KOKKOS_INLINE_FUNCTION void my_free (T *m, int sz)
 
static KOKKOS_INLINE_FUNCTION Tget (int sz)
 Get memory for new array of length sz. More...
 
static KOKKOS_INLINE_FUNCTION Tget_and_fill (int sz)
 Get memory for new array of length sz and fill with zeros. More...
 
static KOKKOS_INLINE_FUNCTION Tget_and_fill (const T *src, int sz)
 Get memory for new array of length sz and fill with entries from src. More...
 
static KOKKOS_INLINE_FUNCTION Tstrided_get_and_fill (const T *src, int stride, int sz)
 Get memory for new array of length sz and fill with entries from src. More...
 
static KOKKOS_INLINE_FUNCTION void copy (const T *src, T *dest, int sz)
 Copy array from src to dest of length sz. More...
 
static KOKKOS_INLINE_FUNCTION void strided_copy (const T *src, int src_stride, T *dest, int dest_stride, int sz)
 Copy array from src to dest of length sz. More...
 
static KOKKOS_INLINE_FUNCTION void zero (T *dest, int sz)
 Zero out array dest of length sz. More...
 
static KOKKOS_INLINE_FUNCTION void strided_zero (T *dest, int stride, int sz)
 Zero out array dest of length sz. More...
 
static KOKKOS_INLINE_FUNCTION void destroy_and_release (T *m, int sz)
 Destroy array elements and release memory. More...
 

Detailed Description

template<typename T>
struct Sacado::ds_array< T, true >

Dynamic array allocation class that is specialized for scalar i.e., fundamental or built-in types (float, double, etc...).

Definition at line 180 of file Sacado_DynamicArrayTraits.hpp.

Member Function Documentation

◆ my_alloc()

template<typename T >
static KOKKOS_INLINE_FUNCTION T* Sacado::ds_array< T, true >::my_alloc ( const int  sz)
inlinestatic

Definition at line 183 of file Sacado_DynamicArrayTraits.hpp.

◆ my_free()

template<typename T >
static KOKKOS_INLINE_FUNCTION void Sacado::ds_array< T, true >::my_free ( T m,
int  sz 
)
inlinestatic

Definition at line 194 of file Sacado_DynamicArrayTraits.hpp.

◆ get()

template<typename T >
static KOKKOS_INLINE_FUNCTION T* Sacado::ds_array< T, true >::get ( int  sz)
inlinestatic

Get memory for new array of length sz.

Definition at line 206 of file Sacado_DynamicArrayTraits.hpp.

◆ get_and_fill() [1/2]

template<typename T >
static KOKKOS_INLINE_FUNCTION T* Sacado::ds_array< T, true >::get_and_fill ( int  sz)
inlinestatic

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

Definition at line 216 of file Sacado_DynamicArrayTraits.hpp.

◆ get_and_fill() [2/2]

template<typename T >
static KOKKOS_INLINE_FUNCTION T* Sacado::ds_array< T, true >::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 235 of file Sacado_DynamicArrayTraits.hpp.

◆ strided_get_and_fill()

template<typename T >
static KOKKOS_INLINE_FUNCTION T* Sacado::ds_array< T, true >::strided_get_and_fill ( const T src,
int  stride,
int  sz 
)
inlinestatic

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

Definition at line 250 of file Sacado_DynamicArrayTraits.hpp.

◆ copy()

template<typename T >
static KOKKOS_INLINE_FUNCTION void Sacado::ds_array< T, true >::copy ( const T src,
T dest,
int  sz 
)
inlinestatic

Copy array from src to dest of length sz.

Definition at line 262 of file Sacado_DynamicArrayTraits.hpp.

◆ strided_copy()

template<typename T >
static KOKKOS_INLINE_FUNCTION void Sacado::ds_array< T, true >::strided_copy ( const T src,
int  src_stride,
T dest,
int  dest_stride,
int  sz 
)
inlinestatic

Copy array from src to dest of length sz.

Definition at line 274 of file Sacado_DynamicArrayTraits.hpp.

◆ zero()

template<typename T >
static KOKKOS_INLINE_FUNCTION void Sacado::ds_array< T, true >::zero ( T dest,
int  sz 
)
inlinestatic

Zero out array dest of length sz.

Definition at line 285 of file Sacado_DynamicArrayTraits.hpp.

◆ strided_zero()

template<typename T >
static KOKKOS_INLINE_FUNCTION void Sacado::ds_array< T, true >::strided_zero ( T dest,
int  stride,
int  sz 
)
inlinestatic

Zero out array dest of length sz.

Definition at line 297 of file Sacado_DynamicArrayTraits.hpp.

◆ destroy_and_release()

template<typename T >
static KOKKOS_INLINE_FUNCTION void Sacado::ds_array< T, true >::destroy_and_release ( T m,
int  sz 
)
inlinestatic

Destroy array elements and release memory.

Definition at line 306 of file Sacado_DynamicArrayTraits.hpp.


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