Stokhos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | List of all members
Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t > Class Template Reference

Statically allocated storage class. More...

#include <Stokhos_StaticFixedStorage.hpp>

Classes

struct  apply
 Turn StaticFixedStorage into a meta-function class usable with mpl::apply. More...
 
struct  apply_N
 

Public Types

typedef ordinal_t ordinal_type
 
typedef value_t value_type
 
typedef device_t::execution_space execution_space
 
typedef device_t::memory_space memory_space
 
typedef value_typereference
 
typedef volatile value_typevolatile_reference
 
typedef const value_typeconst_reference
 
typedef const volatile value_typeconst_volatile_reference
 
typedef value_typepointer
 
typedef volatile value_typevolatile_pointer
 
typedef const value_typeconst_pointer
 
typedef const volatile value_typeconst_volatile_pointer
 
typedef Stokhos::StaticArrayTraits< value_type, execution_spacess
 
typedef Stokhos::MemoryTraits< memory_spaceMemTraits
 

Public Member Functions

KOKKOS_DEFAULTED_FUNCTION StaticFixedStorage ()=default
 Constructor.
 
KOKKOS_INLINE_FUNCTION StaticFixedStorage (const ordinal_type &sz, const value_type &x=value_type(0.0))
 Constructor.
 
KOKKOS_INLINE_FUNCTION StaticFixedStorage (const ordinal_type &sz, const value_type *x)
 Constructor from array.
 
KOKKOS_INLINE_FUNCTION StaticFixedStorage (const ordinal_type &sz, pointer v, bool owned)
 Constructor for creating a view (not allowed)
 
KOKKOS_DEFAULTED_FUNCTION StaticFixedStorage (const StaticFixedStorage &s)=default
 Copy constructor.
 
KOKKOS_INLINE_FUNCTION StaticFixedStorage (const volatile StaticFixedStorage &s)
 Copy constructor.
 
KOKKOS_DEFAULTED_FUNCTION ~StaticFixedStorage ()=default
 Destructor.
 
KOKKOS_DEFAULTED_FUNCTION StaticFixedStorageoperator= (const StaticFixedStorage &s)=default
 Assignment operator.
 
KOKKOS_INLINE_FUNCTION StaticFixedStorageoperator= (const volatile StaticFixedStorage &s)
 Assignment operator.
 
KOKKOS_INLINE_FUNCTION StaticFixedStorageoperator= (const StaticFixedStorage &s) volatile
 Assignment operator.
 
KOKKOS_INLINE_FUNCTION StaticFixedStorageoperator= (const volatile StaticFixedStorage &s) volatile
 Assignment operator.
 
KOKKOS_INLINE_FUNCTION void init (const_reference v)
 Initialize values to a constant value.
 
KOKKOS_INLINE_FUNCTION void init (const_reference v) volatile
 Initialize values to a constant value.
 
KOKKOS_INLINE_FUNCTION void init (const_pointer v, const ordinal_type &sz=0)
 Initialize values to an array of values.
 
KOKKOS_INLINE_FUNCTION void init (const_pointer v, const ordinal_type &sz=0) volatile
 Initialize values to an array of values.
 
KOKKOS_INLINE_FUNCTION void load (pointer v)
 Load values to an array of values.
 
KOKKOS_INLINE_FUNCTION void load (pointer v) volatile
 Load values to an array of values.
 
KOKKOS_INLINE_FUNCTION void resize (const ordinal_type &sz)
 Resize to new size (values are preserved)
 
KOKKOS_INLINE_FUNCTION void resize (const ordinal_type &sz) volatile
 Resize to new size (values are preserved)
 
KOKKOS_INLINE_FUNCTION void shallowReset (pointer v, const ordinal_type &sz, const ordinal_type &stride, bool owned)
 Reset storage to given array, size, and stride.
 
KOKKOS_INLINE_FUNCTION void shallowReset (pointer v, const ordinal_type &sz, const ordinal_type &stride, bool owned) volatile
 Reset storage to given array, size, and stride.
 
KOKKOS_INLINE_FUNCTION const_reference operator[] (const ordinal_type &i) const
 Coefficient access (avoid if possible)
 
KOKKOS_INLINE_FUNCTION const_volatile_reference operator[] (const ordinal_type &i) const volatile
 Coefficient access (avoid if possible)
 
KOKKOS_INLINE_FUNCTION reference operator[] (const ordinal_type &i)
 Coefficient access (avoid if possible)
 
KOKKOS_INLINE_FUNCTION volatile_reference operator[] (const ordinal_type &i) volatile
 Coefficient access (avoid if possible)
 
template<int i>
KOKKOS_INLINE_FUNCTION reference getCoeff ()
 
template<int i>
KOKKOS_INLINE_FUNCTION volatile_reference getCoeff () volatile
 
template<int i>
KOKKOS_INLINE_FUNCTION const_volatile_reference getCoeff () const volatile
 
template<int i>
KOKKOS_INLINE_FUNCTION const_reference getCoeff () const
 
KOKKOS_INLINE_FUNCTION const_volatile_pointer coeff () const volatile
 Get coefficients.
 
KOKKOS_INLINE_FUNCTION const_pointer coeff () const
 Get coefficients.
 
KOKKOS_INLINE_FUNCTION volatile_pointer coeff () volatile
 Get coefficients.
 
KOKKOS_INLINE_FUNCTION pointer coeff ()
 Get coefficients.
 

Static Public Member Functions

static KOKKOS_INLINE_FUNCTION ordinal_type size ()
 Return size.
 

Static Public Attributes

static const bool is_static = true
 
static const int static_size = Num
 
static const bool supports_reset = false
 

Private Attributes

value_type coeff_ [Num]
 Coefficient values.
 

Detailed Description

template<typename ordinal_t, typename value_t, int Num, typename device_t>
class Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >

Statically allocated storage class.

Definition at line 69 of file Stokhos_StaticFixedStorage.hpp.

Member Typedef Documentation

◆ ordinal_type

template<typename ordinal_t , typename value_t , int Num, typename device_t >
typedef ordinal_t Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::ordinal_type

Definition at line 76 of file Stokhos_StaticFixedStorage.hpp.

◆ value_type

template<typename ordinal_t , typename value_t , int Num, typename device_t >
typedef value_t Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::value_type

Definition at line 77 of file Stokhos_StaticFixedStorage.hpp.

◆ execution_space

template<typename ordinal_t , typename value_t , int Num, typename device_t >
typedef device_t::execution_space Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::execution_space

Definition at line 78 of file Stokhos_StaticFixedStorage.hpp.

◆ memory_space

template<typename ordinal_t , typename value_t , int Num, typename device_t >
typedef device_t::memory_space Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::memory_space

Definition at line 79 of file Stokhos_StaticFixedStorage.hpp.

◆ reference

template<typename ordinal_t , typename value_t , int Num, typename device_t >
typedef value_type& Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::reference

Definition at line 80 of file Stokhos_StaticFixedStorage.hpp.

◆ volatile_reference

template<typename ordinal_t , typename value_t , int Num, typename device_t >
typedef volatile value_type& Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::volatile_reference

Definition at line 81 of file Stokhos_StaticFixedStorage.hpp.

◆ const_reference

template<typename ordinal_t , typename value_t , int Num, typename device_t >
typedef const value_type& Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::const_reference

Definition at line 82 of file Stokhos_StaticFixedStorage.hpp.

◆ const_volatile_reference

template<typename ordinal_t , typename value_t , int Num, typename device_t >
typedef const volatile value_type& Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::const_volatile_reference

Definition at line 83 of file Stokhos_StaticFixedStorage.hpp.

◆ pointer

template<typename ordinal_t , typename value_t , int Num, typename device_t >
typedef value_type* Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::pointer

Definition at line 84 of file Stokhos_StaticFixedStorage.hpp.

◆ volatile_pointer

template<typename ordinal_t , typename value_t , int Num, typename device_t >
typedef volatile value_type* Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::volatile_pointer

Definition at line 85 of file Stokhos_StaticFixedStorage.hpp.

◆ const_pointer

template<typename ordinal_t , typename value_t , int Num, typename device_t >
typedef const value_type* Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::const_pointer

Definition at line 86 of file Stokhos_StaticFixedStorage.hpp.

◆ const_volatile_pointer

template<typename ordinal_t , typename value_t , int Num, typename device_t >
typedef const volatile value_type* Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::const_volatile_pointer

Definition at line 87 of file Stokhos_StaticFixedStorage.hpp.

◆ ss

template<typename ordinal_t , typename value_t , int Num, typename device_t >
typedef Stokhos::StaticArrayTraits<value_type,execution_space> Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::ss

Definition at line 88 of file Stokhos_StaticFixedStorage.hpp.

◆ MemTraits

template<typename ordinal_t , typename value_t , int Num, typename device_t >
typedef Stokhos::MemoryTraits<memory_space> Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::MemTraits

Definition at line 90 of file Stokhos_StaticFixedStorage.hpp.

Constructor & Destructor Documentation

◆ StaticFixedStorage() [1/6]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_DEFAULTED_FUNCTION Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::StaticFixedStorage ( )
default

Constructor.

◆ StaticFixedStorage() [2/6]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::StaticFixedStorage ( const ordinal_type & sz,
const value_type & x = value_type(0.0) )
inline

Constructor.

Definition at line 109 of file Stokhos_StaticFixedStorage.hpp.

◆ StaticFixedStorage() [3/6]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::StaticFixedStorage ( const ordinal_type & sz,
const value_type * x )
inline

Constructor from array.

Definition at line 116 of file Stokhos_StaticFixedStorage.hpp.

◆ StaticFixedStorage() [4/6]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::StaticFixedStorage ( const ordinal_type & sz,
pointer v,
bool owned )
inline

Constructor for creating a view (not allowed)

Definition at line 122 of file Stokhos_StaticFixedStorage.hpp.

◆ StaticFixedStorage() [5/6]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_DEFAULTED_FUNCTION Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::StaticFixedStorage ( const StaticFixedStorage< ordinal_t, value_t, Num, device_t > & s)
default

Copy constructor.

◆ StaticFixedStorage() [6/6]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::StaticFixedStorage ( const volatile StaticFixedStorage< ordinal_t, value_t, Num, device_t > & s)
inline

Copy constructor.

Definition at line 130 of file Stokhos_StaticFixedStorage.hpp.

◆ ~StaticFixedStorage()

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_DEFAULTED_FUNCTION Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::~StaticFixedStorage ( )
default

Destructor.

Member Function Documentation

◆ operator=() [1/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_DEFAULTED_FUNCTION StaticFixedStorage & Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::operator= ( const StaticFixedStorage< ordinal_t, value_t, Num, device_t > & s)
default

Assignment operator.

◆ operator=() [2/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION StaticFixedStorage & Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::operator= ( const volatile StaticFixedStorage< ordinal_t, value_t, Num, device_t > & s)
inline

Assignment operator.

Definition at line 144 of file Stokhos_StaticFixedStorage.hpp.

◆ operator=() [3/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION StaticFixedStorage & Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::operator= ( const StaticFixedStorage< ordinal_t, value_t, Num, device_t > & s) volatile
inline

Assignment operator.

Definition at line 152 of file Stokhos_StaticFixedStorage.hpp.

◆ operator=() [4/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION StaticFixedStorage & Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::operator= ( const volatile StaticFixedStorage< ordinal_t, value_t, Num, device_t > & s) volatile
inline

Assignment operator.

Definition at line 160 of file Stokhos_StaticFixedStorage.hpp.

◆ init() [1/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION void Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::init ( const_reference v)
inline

Initialize values to a constant value.

Definition at line 167 of file Stokhos_StaticFixedStorage.hpp.

◆ init() [2/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION void Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::init ( const_reference v) volatile
inline

Initialize values to a constant value.

Definition at line 173 of file Stokhos_StaticFixedStorage.hpp.

◆ init() [3/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION void Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::init ( const_pointer v,
const ordinal_type & sz = 0 )
inline

Initialize values to an array of values.

Definition at line 179 of file Stokhos_StaticFixedStorage.hpp.

◆ init() [4/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION void Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::init ( const_pointer v,
const ordinal_type & sz = 0 ) volatile
inline

Initialize values to an array of values.

Definition at line 188 of file Stokhos_StaticFixedStorage.hpp.

◆ load() [1/2]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION void Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::load ( pointer v)
inline

Load values to an array of values.

Definition at line 197 of file Stokhos_StaticFixedStorage.hpp.

◆ load() [2/2]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION void Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::load ( pointer v) volatile
inline

Load values to an array of values.

Definition at line 203 of file Stokhos_StaticFixedStorage.hpp.

◆ resize() [1/2]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION void Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::resize ( const ordinal_type & sz)
inline

Resize to new size (values are preserved)

Definition at line 209 of file Stokhos_StaticFixedStorage.hpp.

◆ resize() [2/2]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION void Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::resize ( const ordinal_type & sz) volatile
inline

Resize to new size (values are preserved)

Definition at line 213 of file Stokhos_StaticFixedStorage.hpp.

◆ shallowReset() [1/2]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION void Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::shallowReset ( pointer v,
const ordinal_type & sz,
const ordinal_type & stride,
bool owned )
inline

Reset storage to given array, size, and stride.

Definition at line 217 of file Stokhos_StaticFixedStorage.hpp.

◆ shallowReset() [2/2]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION void Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::shallowReset ( pointer v,
const ordinal_type & sz,
const ordinal_type & stride,
bool owned ) volatile
inline

Reset storage to given array, size, and stride.

Definition at line 222 of file Stokhos_StaticFixedStorage.hpp.

◆ size()

template<typename ordinal_t , typename value_t , int Num, typename device_t >
static KOKKOS_INLINE_FUNCTION ordinal_type Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::size ( )
inlinestatic

Return size.

Definition at line 227 of file Stokhos_StaticFixedStorage.hpp.

◆ operator[]() [1/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION const_reference Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::operator[] ( const ordinal_type & i) const
inline

Coefficient access (avoid if possible)

Definition at line 231 of file Stokhos_StaticFixedStorage.hpp.

◆ operator[]() [2/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION const_volatile_reference Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::operator[] ( const ordinal_type & i) const volatile
inline

Coefficient access (avoid if possible)

Definition at line 237 of file Stokhos_StaticFixedStorage.hpp.

◆ operator[]() [3/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION reference Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::operator[] ( const ordinal_type & i)
inline

Coefficient access (avoid if possible)

Definition at line 243 of file Stokhos_StaticFixedStorage.hpp.

◆ operator[]() [4/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION volatile_reference Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::operator[] ( const ordinal_type & i) volatile
inline

Coefficient access (avoid if possible)

Definition at line 247 of file Stokhos_StaticFixedStorage.hpp.

◆ getCoeff() [1/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
template<int i>
KOKKOS_INLINE_FUNCTION reference Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::getCoeff ( )
inline

Definition at line 252 of file Stokhos_StaticFixedStorage.hpp.

◆ getCoeff() [2/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
template<int i>
KOKKOS_INLINE_FUNCTION volatile_reference Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::getCoeff ( ) volatile
inline

Definition at line 256 of file Stokhos_StaticFixedStorage.hpp.

◆ getCoeff() [3/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
template<int i>
KOKKOS_INLINE_FUNCTION const_volatile_reference Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::getCoeff ( ) const volatile
inline

Definition at line 260 of file Stokhos_StaticFixedStorage.hpp.

◆ getCoeff() [4/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
template<int i>
KOKKOS_INLINE_FUNCTION const_reference Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::getCoeff ( ) const
inline

Definition at line 264 of file Stokhos_StaticFixedStorage.hpp.

◆ coeff() [1/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION const_volatile_pointer Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::coeff ( ) const volatile
inline

Get coefficients.

Definition at line 268 of file Stokhos_StaticFixedStorage.hpp.

◆ coeff() [2/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION const_pointer Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::coeff ( ) const
inline

Get coefficients.

Definition at line 272 of file Stokhos_StaticFixedStorage.hpp.

◆ coeff() [3/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION volatile_pointer Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::coeff ( ) volatile
inline

Get coefficients.

Definition at line 276 of file Stokhos_StaticFixedStorage.hpp.

◆ coeff() [4/4]

template<typename ordinal_t , typename value_t , int Num, typename device_t >
KOKKOS_INLINE_FUNCTION pointer Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::coeff ( )
inline

Get coefficients.

Definition at line 280 of file Stokhos_StaticFixedStorage.hpp.

Member Data Documentation

◆ is_static

template<typename ordinal_t , typename value_t , int Num, typename device_t >
const bool Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::is_static = true
static

Definition at line 72 of file Stokhos_StaticFixedStorage.hpp.

◆ static_size

template<typename ordinal_t , typename value_t , int Num, typename device_t >
const int Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::static_size = Num
static

Definition at line 73 of file Stokhos_StaticFixedStorage.hpp.

◆ supports_reset

template<typename ordinal_t , typename value_t , int Num, typename device_t >
const bool Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::supports_reset = false
static

Definition at line 74 of file Stokhos_StaticFixedStorage.hpp.

◆ coeff_

template<typename ordinal_t , typename value_t , int Num, typename device_t >
value_type Stokhos::StaticFixedStorage< ordinal_t, value_t, Num, device_t >::coeff_[Num]
private

Coefficient values.

Definition at line 288 of file Stokhos_StaticFixedStorage.hpp.


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