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

#include <Stokhos_DynamicStridedStorage.hpp>

Classes

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

Public Types

typedef ordinal_t ordinal_type
 
typedef value_t value_type
 
typedef device_t execution_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::DynArrayTraits
< value_type, execution_space
ds
 

Public Member Functions

KOKKOS_INLINE_FUNCTION DynamicStridedStorage (const ordinal_type &sz=1, const value_type &x=value_type(0.0))
 Constructor. More...
 
KOKKOS_INLINE_FUNCTION DynamicStridedStorage (const ordinal_type &sz, const value_type *x)
 Constructor from array. More...
 
KOKKOS_INLINE_FUNCTION DynamicStridedStorage (const ordinal_type &sz, pointer v, bool owned)
 Constructor for creating a view. More...
 
KOKKOS_INLINE_FUNCTION DynamicStridedStorage (const DynamicStridedStorage &s)
 Constructor. More...
 
KOKKOS_INLINE_FUNCTION DynamicStridedStorage (const volatile DynamicStridedStorage &s)
 Constructor. More...
 
KOKKOS_INLINE_FUNCTION ~DynamicStridedStorage ()
 Destructor. More...
 
KOKKOS_INLINE_FUNCTION
DynamicStridedStorage
operator= (const DynamicStridedStorage &s)
 Assignment operator. More...
 
KOKKOS_INLINE_FUNCTION
DynamicStridedStorage
operator= (const volatile DynamicStridedStorage &s)
 Assignment operator. More...
 
KOKKOS_INLINE_FUNCTION
volatile DynamicStridedStorage
operator= (const DynamicStridedStorage &s) volatile
 Assignment operator. More...
 
KOKKOS_INLINE_FUNCTION
volatile DynamicStridedStorage
operator= (const volatile DynamicStridedStorage &s) volatile
 Assignment operator. More...
 
KOKKOS_INLINE_FUNCTION void init (const_reference v)
 Initialize values to a constant value. More...
 
KOKKOS_INLINE_FUNCTION void init (const_reference v) volatile
 Initialize values to a constant value. More...
 
KOKKOS_INLINE_FUNCTION void init (const_pointer v, const ordinal_type &sz=0)
 Initialize values to an array of values. More...
 
KOKKOS_INLINE_FUNCTION void init (const_pointer v, const ordinal_type &sz=0) volatile
 Initialize values to an array of values. More...
 
KOKKOS_INLINE_FUNCTION void load (pointer v)
 Load values to an array of values. More...
 
KOKKOS_INLINE_FUNCTION void load (pointer v) volatile
 Load values to an array of values. More...
 
KOKKOS_INLINE_FUNCTION void resize (const ordinal_type &sz)
 Resize to new size (values are preserved) More...
 
KOKKOS_INLINE_FUNCTION void resize (const ordinal_type &sz) volatile
 Resize to new size (values are preserved) More...
 
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. More...
 
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. More...
 
KOKKOS_INLINE_FUNCTION ordinal_type size () const
 Return size. More...
 
KOKKOS_INLINE_FUNCTION ordinal_type size () const volatile
 Return size. More...
 
KOKKOS_INLINE_FUNCTION
const_reference 
operator[] (const ordinal_type &i) const
 Coefficient access (avoid if possible) More...
 
KOKKOS_INLINE_FUNCTION
const_volatile_reference 
operator[] (const ordinal_type &i) const volatile
 Coefficient access (avoid if possible) More...
 
KOKKOS_INLINE_FUNCTION reference operator[] (const ordinal_type &i)
 Coefficient access (avoid if possible) More...
 
KOKKOS_INLINE_FUNCTION
volatile_reference 
operator[] (const ordinal_type &i) volatile
 Coefficient access (avoid if possible) More...
 
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_reference 
getCoeff () const
 
template<int i>
KOKKOS_INLINE_FUNCTION
const_volatile_reference 
getCoeff () const volatile
 
KOKKOS_INLINE_FUNCTION
const_volatile_pointer 
coeff () const volatile
 Get coefficients. More...
 
KOKKOS_INLINE_FUNCTION
const_pointer 
coeff () const
 Get coefficients. More...
 
KOKKOS_INLINE_FUNCTION
volatile_pointer 
coeff () volatile
 Get coefficients. More...
 
KOKKOS_INLINE_FUNCTION pointer coeff ()
 Get coefficients. More...
 

Static Public Attributes

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

Private Attributes

pointer coeff_
 Coefficient values. More...
 
ordinal_type sz_
 Size of array used. More...
 
ordinal_type stride_
 Stride of array. More...
 
bool is_owned_
 Do we own the array. More...
 

Detailed Description

template<typename ordinal_t, typename value_t, typename device_t>
class Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >

Definition at line 24 of file Stokhos_DynamicStridedStorage.hpp.

Member Typedef Documentation

template<typename ordinal_t , typename value_t , typename device_t >
typedef ordinal_t Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::ordinal_type

Definition at line 31 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
typedef value_t Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::value_type

Definition at line 32 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
typedef device_t Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::execution_space

Definition at line 33 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
typedef value_type& Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::reference

Definition at line 34 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
typedef volatile value_type& Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::volatile_reference

Definition at line 35 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
typedef const value_type& Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::const_reference

Definition at line 36 of file Stokhos_DynamicStridedStorage.hpp.

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

Definition at line 37 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
typedef value_type* Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::pointer

Definition at line 38 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
typedef volatile value_type* Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::volatile_pointer

Definition at line 39 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
typedef const value_type* Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::const_pointer

Definition at line 40 of file Stokhos_DynamicStridedStorage.hpp.

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

Definition at line 41 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
typedef Stokhos::DynArrayTraits<value_type,execution_space> Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::ds

Definition at line 42 of file Stokhos_DynamicStridedStorage.hpp.

Constructor & Destructor Documentation

template<typename ordinal_t , typename value_t , typename device_t >
KOKKOS_INLINE_FUNCTION Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::DynamicStridedStorage ( const ordinal_type sz = 1,
const value_type x = value_type(0.0) 
)
inline

Constructor.

Definition at line 52 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
KOKKOS_INLINE_FUNCTION Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::DynamicStridedStorage ( const ordinal_type sz,
const value_type x 
)
inline

Constructor from array.

Definition at line 60 of file Stokhos_DynamicStridedStorage.hpp.

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

Constructor for creating a view.

Definition at line 67 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
KOKKOS_INLINE_FUNCTION Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::DynamicStridedStorage ( const DynamicStridedStorage< ordinal_t, value_t, device_t > &  s)
inline

Constructor.

Definition at line 72 of file Stokhos_DynamicStridedStorage.hpp.

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

Constructor.

Definition at line 85 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
KOKKOS_INLINE_FUNCTION Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::~DynamicStridedStorage ( )
inline

Destructor.

Definition at line 98 of file Stokhos_DynamicStridedStorage.hpp.

Member Function Documentation

template<typename ordinal_t , typename value_t , typename device_t >
KOKKOS_INLINE_FUNCTION DynamicStridedStorage& Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::operator= ( const DynamicStridedStorage< ordinal_t, value_t, device_t > &  s)
inline

Assignment operator.

Definition at line 104 of file Stokhos_DynamicStridedStorage.hpp.

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

Assignment operator.

Definition at line 133 of file Stokhos_DynamicStridedStorage.hpp.

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

Assignment operator.

Definition at line 163 of file Stokhos_DynamicStridedStorage.hpp.

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

Assignment operator.

Definition at line 193 of file Stokhos_DynamicStridedStorage.hpp.

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

Initialize values to a constant value.

Definition at line 222 of file Stokhos_DynamicStridedStorage.hpp.

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

Initialize values to a constant value.

Definition at line 232 of file Stokhos_DynamicStridedStorage.hpp.

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

Initialize values to an array of values.

Definition at line 242 of file Stokhos_DynamicStridedStorage.hpp.

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

Initialize values to an array of values.

Definition at line 255 of file Stokhos_DynamicStridedStorage.hpp.

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

Load values to an array of values.

Definition at line 268 of file Stokhos_DynamicStridedStorage.hpp.

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

Load values to an array of values.

Definition at line 277 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
KOKKOS_INLINE_FUNCTION void Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::resize ( const ordinal_type sz)
inline

Resize to new size (values are preserved)

Definition at line 286 of file Stokhos_DynamicStridedStorage.hpp.

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

Resize to new size (values are preserved)

Definition at line 308 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
KOKKOS_INLINE_FUNCTION void Stokhos::DynamicStridedStorage< ordinal_t, value_t, 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 330 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
KOKKOS_INLINE_FUNCTION void Stokhos::DynamicStridedStorage< ordinal_t, value_t, 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 342 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
KOKKOS_INLINE_FUNCTION ordinal_type Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::size ( ) const
inline

Return size.

Definition at line 354 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
KOKKOS_INLINE_FUNCTION ordinal_type Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::size ( ) const volatile
inline

Return size.

Definition at line 358 of file Stokhos_DynamicStridedStorage.hpp.

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

Coefficient access (avoid if possible)

Definition at line 362 of file Stokhos_DynamicStridedStorage.hpp.

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

Coefficient access (avoid if possible)

Definition at line 368 of file Stokhos_DynamicStridedStorage.hpp.

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

Coefficient access (avoid if possible)

Definition at line 374 of file Stokhos_DynamicStridedStorage.hpp.

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

Coefficient access (avoid if possible)

Definition at line 380 of file Stokhos_DynamicStridedStorage.hpp.

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

Definition at line 386 of file Stokhos_DynamicStridedStorage.hpp.

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

Definition at line 390 of file Stokhos_DynamicStridedStorage.hpp.

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

Definition at line 394 of file Stokhos_DynamicStridedStorage.hpp.

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

Definition at line 398 of file Stokhos_DynamicStridedStorage.hpp.

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

Get coefficients.

Definition at line 402 of file Stokhos_DynamicStridedStorage.hpp.

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

Get coefficients.

Definition at line 406 of file Stokhos_DynamicStridedStorage.hpp.

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

Get coefficients.

Definition at line 410 of file Stokhos_DynamicStridedStorage.hpp.

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

Get coefficients.

Definition at line 414 of file Stokhos_DynamicStridedStorage.hpp.

Member Data Documentation

template<typename ordinal_t , typename value_t , typename device_t >
const bool Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::is_static = false
static

Definition at line 27 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
const int Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::static_size = 0
static

Definition at line 28 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
const bool Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::supports_reset = true
static

Definition at line 29 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
pointer Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::coeff_
private

Coefficient values.

Definition at line 419 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
ordinal_type Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::sz_
private

Size of array used.

Definition at line 422 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
ordinal_type Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::stride_
private

Stride of array.

Definition at line 425 of file Stokhos_DynamicStridedStorage.hpp.

template<typename ordinal_t , typename value_t , typename device_t >
bool Stokhos::DynamicStridedStorage< ordinal_t, value_t, device_t >::is_owned_
private

Do we own the array.

Definition at line 428 of file Stokhos_DynamicStridedStorage.hpp.


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