Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Static Public Member Functions | List of all members
Stokhos::DynArrayTraits< T, device_t, isScalar > Struct Template Reference

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

#include <Stokhos_DynArrayTraits.hpp>

Public Types

typedef T value_type
 
typedef device_t execution_space
 

Static Public Member Functions

static KOKKOS_INLINE_FUNCTION void copy (const volatile T *src, volatile T *dest, std::size_t sz)
 Copy array from src to dest of length sz. More...
 
static KOKKOS_INLINE_FUNCTION void copy (const volatile T *src, T *dest, std::size_t sz)
 Copy array from src to dest of length sz. More...
 
static KOKKOS_INLINE_FUNCTION void copy (const T *src, volatile T *dest, std::size_t sz)
 Copy array from src to dest of length sz. More...
 
static KOKKOS_INLINE_FUNCTION void copy (const T *src, T *dest, std::size_t sz)
 Copy array from src to dest of length sz. More...
 
static KOKKOS_INLINE_FUNCTION void zero (T *dest, std::size_t sz)
 Zero out array dest of length sz. More...
 
static KOKKOS_INLINE_FUNCTION void zero (volatile T *dest, std::size_t sz)
 Zero out array dest of length sz. More...
 
static KOKKOS_INLINE_FUNCTION void fill (T *dest, std::size_t sz, const T &v)
 Fill array dest of length sz with value v. More...
 
static KOKKOS_INLINE_FUNCTION void fill (volatile T *dest, std::size_t sz, const T &v)
 Fill array dest of length sz with value v. More...
 
static KOKKOS_INLINE_FUNCTION T * get_and_fill (std::size_t sz, const T &x=T(0.0))
 Get memory for new array of length sz and fill with zeros. More...
 
static KOKKOS_INLINE_FUNCTION T * get_and_fill (const T *src, std::size_t sz)
 Get memory for new array of length sz and fill with entries from src. More...
 
static KOKKOS_INLINE_FUNCTION T * get_and_fill (const volatile T *src, std::size_t sz)
 Get memory for new array of length sz and fill with entries from src. More...
 
static KOKKOS_INLINE_FUNCTION void destroy_and_release (T *m, std::size_t sz)
 Destroy array elements and release memory. More...
 
static KOKKOS_INLINE_FUNCTION void destroy_and_release (volatile T *m, std::size_t sz)
 Destroy array elements and release memory. More...
 

Detailed Description

template<typename T, typename device_t, bool isScalar = IsScalarType2<T>::value>
struct Stokhos::DynArrayTraits< T, device_t, isScalar >

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

Definition at line 48 of file Stokhos_DynArrayTraits.hpp.

Member Typedef Documentation

template<typename T , typename device_t , bool isScalar = IsScalarType2<T>::value>
typedef T Stokhos::DynArrayTraits< T, device_t, isScalar >::value_type

Definition at line 50 of file Stokhos_DynArrayTraits.hpp.

template<typename T , typename device_t , bool isScalar = IsScalarType2<T>::value>
typedef device_t Stokhos::DynArrayTraits< T, device_t, isScalar >::execution_space

Definition at line 51 of file Stokhos_DynArrayTraits.hpp.

Member Function Documentation

template<typename T , typename device_t , bool isScalar = IsScalarType2<T>::value>
static KOKKOS_INLINE_FUNCTION void Stokhos::DynArrayTraits< T, device_t, isScalar >::copy ( const volatile T *  src,
volatile T *  dest,
std::size_t  sz 
)
inlinestatic

Copy array from src to dest of length sz.

Definition at line 56 of file Stokhos_DynArrayTraits.hpp.

template<typename T , typename device_t , bool isScalar = IsScalarType2<T>::value>
static KOKKOS_INLINE_FUNCTION void Stokhos::DynArrayTraits< T, device_t, isScalar >::copy ( const volatile T *  src,
T *  dest,
std::size_t  sz 
)
inlinestatic

Copy array from src to dest of length sz.

Definition at line 65 of file Stokhos_DynArrayTraits.hpp.

template<typename T , typename device_t , bool isScalar = IsScalarType2<T>::value>
static KOKKOS_INLINE_FUNCTION void Stokhos::DynArrayTraits< T, device_t, isScalar >::copy ( const T *  src,
volatile T *  dest,
std::size_t  sz 
)
inlinestatic

Copy array from src to dest of length sz.

Definition at line 74 of file Stokhos_DynArrayTraits.hpp.

template<typename T , typename device_t , bool isScalar = IsScalarType2<T>::value>
static KOKKOS_INLINE_FUNCTION void Stokhos::DynArrayTraits< T, device_t, isScalar >::copy ( const T *  src,
T *  dest,
std::size_t  sz 
)
inlinestatic

Copy array from src to dest of length sz.

Definition at line 83 of file Stokhos_DynArrayTraits.hpp.

template<typename T , typename device_t , bool isScalar = IsScalarType2<T>::value>
static KOKKOS_INLINE_FUNCTION void Stokhos::DynArrayTraits< T, device_t, isScalar >::zero ( T *  dest,
std::size_t  sz 
)
inlinestatic

Zero out array dest of length sz.

Definition at line 92 of file Stokhos_DynArrayTraits.hpp.

template<typename T , typename device_t , bool isScalar = IsScalarType2<T>::value>
static KOKKOS_INLINE_FUNCTION void Stokhos::DynArrayTraits< T, device_t, isScalar >::zero ( volatile T *  dest,
std::size_t  sz 
)
inlinestatic

Zero out array dest of length sz.

Definition at line 99 of file Stokhos_DynArrayTraits.hpp.

template<typename T , typename device_t , bool isScalar = IsScalarType2<T>::value>
static KOKKOS_INLINE_FUNCTION void Stokhos::DynArrayTraits< T, device_t, isScalar >::fill ( T *  dest,
std::size_t  sz,
const T &  v 
)
inlinestatic

Fill array dest of length sz with value v.

Definition at line 108 of file Stokhos_DynArrayTraits.hpp.

template<typename T , typename device_t , bool isScalar = IsScalarType2<T>::value>
static KOKKOS_INLINE_FUNCTION void Stokhos::DynArrayTraits< T, device_t, isScalar >::fill ( volatile T *  dest,
std::size_t  sz,
const T &  v 
)
inlinestatic

Fill array dest of length sz with value v.

Definition at line 117 of file Stokhos_DynArrayTraits.hpp.

template<typename T , typename device_t , bool isScalar = IsScalarType2<T>::value>
static KOKKOS_INLINE_FUNCTION T* Stokhos::DynArrayTraits< T, device_t, isScalar >::get_and_fill ( std::size_t  sz,
const T &  x = T(0.0) 
)
inlinestatic

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

Definition at line 126 of file Stokhos_DynArrayTraits.hpp.

template<typename T , typename device_t , bool isScalar = IsScalarType2<T>::value>
static KOKKOS_INLINE_FUNCTION T* Stokhos::DynArrayTraits< T, device_t, isScalar >::get_and_fill ( const T *  src,
std::size_t  sz 
)
inlinestatic

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

Definition at line 143 of file Stokhos_DynArrayTraits.hpp.

template<typename T , typename device_t , bool isScalar = IsScalarType2<T>::value>
static KOKKOS_INLINE_FUNCTION T* Stokhos::DynArrayTraits< T, device_t, isScalar >::get_and_fill ( const volatile T *  src,
std::size_t  sz 
)
inlinestatic

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

Definition at line 159 of file Stokhos_DynArrayTraits.hpp.

template<typename T , typename device_t , bool isScalar = IsScalarType2<T>::value>
static KOKKOS_INLINE_FUNCTION void Stokhos::DynArrayTraits< T, device_t, isScalar >::destroy_and_release ( T *  m,
std::size_t  sz 
)
inlinestatic

Destroy array elements and release memory.

Definition at line 172 of file Stokhos_DynArrayTraits.hpp.

template<typename T , typename device_t , bool isScalar = IsScalarType2<T>::value>
static KOKKOS_INLINE_FUNCTION void Stokhos::DynArrayTraits< T, device_t, isScalar >::destroy_and_release ( volatile T *  m,
std::size_t  sz 
)
inlinestatic

Destroy array elements and release memory.

Definition at line 179 of file Stokhos_DynArrayTraits.hpp.


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