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 Types | Private Member Functions | Private Attributes | List of all members
Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t > Class Template Reference

Dynamic storage with view semantics and contiguous access. More...

#include <Stokhos_ViewStorage.hpp>

Classes

struct  apply
 Turn ViewStorage 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 const value_typeconst_reference
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 

Public Member Functions

KOKKOS_INLINE_FUNCTION ViewStorage (const error_storage_type_is_not_allocateable &z=error_storage_type_is_not_allocateable(), const value_type &x=value_type(0))
 Constructor to satisfy Sacado::MP::Vector, disabled via error type. More...
 
KOKKOS_INLINE_FUNCTION ViewStorage (pointer v, const ordinal_type &arg_size=0, const ordinal_type &arg_stride=0)
 Constructor. More...
 
KOKKOS_INLINE_FUNCTION ViewStorage (const ordinal_type &sz, const value_type *x)
 Constructor from array. More...
 
KOKKOS_INLINE_FUNCTION ViewStorage (const ordinal_type &sz, pointer v, bool owned)
 Constructor for creating a view. More...
 
KOKKOS_INLINE_FUNCTION ViewStorage (const ViewStorage &s)
 Constructor. More...
 
KOKKOS_INLINE_FUNCTION ViewStorage (const ViewStorage &s, const ordinal_type &arg_begin, const ordinal_type &arg_end)
 
KOKKOS_INLINE_FUNCTION ~ViewStorage ()
 Destructor. More...
 
KOKKOS_INLINE_FUNCTION void init (const_reference v)
 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 load (pointer v)
 Load values to an array of values. More...
 
KOKKOS_INLINE_FUNCTION void resize (ordinal_type s)
 Resize function disabled. More...
 
KOKKOS_INLINE_FUNCTION void shallowReset (pointer v, const error_storage_type_is_not_resizeable &, const error_storage_type_is_not_resizeable &, const bool owned)
 Reset function disabled. More...
 
KOKKOS_INLINE_FUNCTION ordinal_type size () const
 Return size. More...
 
KOKKOS_INLINE_FUNCTION reference operator[] (const ordinal_type &i) const
 Coefficient access (avoid if possible) More...
 
template<int i>
KOKKOS_INLINE_FUNCTION reference getCoeff ()
 
template<int i>
KOKKOS_INLINE_FUNCTION
const_reference 
getCoeff () const
 
KOKKOS_INLINE_FUNCTION
const_pointer 
coeff () const
 Get coefficients. More...
 
KOKKOS_INLINE_FUNCTION pointer coeff ()
 Get coefficients. More...
 

Static Public Attributes

static const bool is_static = static_length != 0
 
static const int static_size = static_length
 
static const bool supports_reset = false
 
static const bool supports_resize = ! is_static
 
static const bool supports_view = true
 

Private Types

enum  { stride_one = 1 == static_stride }
 

Private Member Functions

KOKKOS_INLINE_FUNCTION
ViewStorage
operator= (const ViewStorage &)
 Assignment operator. More...
 

Private Attributes

const pointer coeff_
 Coefficient values. More...
 
const
Kokkos::Impl::integral_nonzero_constant
< ordinal_t, static_length > 
size_
 Size of array. More...
 
const
Kokkos::Impl::integral_nonzero_constant
< ordinal_t, static_stride > 
stride_
 Stride of array. More...
 

Detailed Description

template<typename ordinal_t, typename value_t, unsigned static_length, unsigned static_stride, typename device_t>
class Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >

Dynamic storage with view semantics and contiguous access.

Definition at line 65 of file Stokhos_ViewStorage.hpp.

Member Typedef Documentation

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
typedef ordinal_t Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::ordinal_type

Definition at line 77 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
typedef value_t Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::value_type

Definition at line 78 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
typedef device_t Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::execution_space

Definition at line 79 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
typedef value_type& Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::reference

Definition at line 80 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
typedef const value_type& Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::const_reference

Definition at line 81 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
typedef value_type* Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::pointer

Definition at line 82 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
typedef const value_type* Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::const_pointer

Definition at line 83 of file Stokhos_ViewStorage.hpp.

Member Enumeration Documentation

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
anonymous enum
private
Enumerator
stride_one 

Definition at line 68 of file Stokhos_ViewStorage.hpp.

Constructor & Destructor Documentation

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
KOKKOS_INLINE_FUNCTION Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::ViewStorage ( const error_storage_type_is_not_allocateable z = error_storage_type_is_not_allocateable(),
const value_type x = value_type(0) 
)

Constructor to satisfy Sacado::MP::Vector, disabled via error type.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
KOKKOS_INLINE_FUNCTION Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::ViewStorage ( pointer  v,
const ordinal_type arg_size = 0,
const ordinal_type arg_stride = 0 
)
inline

Constructor.

Definition at line 100 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
KOKKOS_INLINE_FUNCTION Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::ViewStorage ( const ordinal_type sz,
const value_type x 
)
inline

Constructor from array.

Definition at line 107 of file Stokhos_ViewStorage.hpp.

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

Constructor for creating a view.

Definition at line 111 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
KOKKOS_INLINE_FUNCTION Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::ViewStorage ( const ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t > &  s)
inline

Constructor.

Definition at line 116 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
KOKKOS_INLINE_FUNCTION Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::ViewStorage ( const ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t > &  s,
const ordinal_type arg_begin,
const ordinal_type arg_end 
)
inline

Definition at line 120 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
KOKKOS_INLINE_FUNCTION Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::~ViewStorage ( )
inline

Destructor.

Definition at line 128 of file Stokhos_ViewStorage.hpp.

Member Function Documentation

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
KOKKOS_INLINE_FUNCTION ViewStorage& Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::operator= ( const ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t > &  )
private

Assignment operator.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
KOKKOS_INLINE_FUNCTION void Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::init ( const_reference  v)
inline

Initialize values to a constant value.

Definition at line 138 of file Stokhos_ViewStorage.hpp.

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

Initialize values to an array of values.

Definition at line 151 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
KOKKOS_INLINE_FUNCTION void Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::load ( pointer  v)
inline

Load values to an array of values.

Definition at line 163 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
KOKKOS_INLINE_FUNCTION void Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::resize ( ordinal_type  s)
inline

Resize function disabled.

Definition at line 174 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
KOKKOS_INLINE_FUNCTION void Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::shallowReset ( pointer  v,
const error_storage_type_is_not_resizeable ,
const error_storage_type_is_not_resizeable ,
const bool  owned 
)

Reset function disabled.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
KOKKOS_INLINE_FUNCTION ordinal_type Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::size ( ) const
inline

Return size.

Definition at line 186 of file Stokhos_ViewStorage.hpp.

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

Coefficient access (avoid if possible)

Definition at line 190 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
template<int i>
KOKKOS_INLINE_FUNCTION reference Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::getCoeff ( )
inline

Definition at line 197 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
template<int i>
KOKKOS_INLINE_FUNCTION const_reference Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::getCoeff ( ) const
inline

Definition at line 201 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
KOKKOS_INLINE_FUNCTION const_pointer Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::coeff ( ) const
inline

Get coefficients.

Definition at line 205 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
KOKKOS_INLINE_FUNCTION pointer Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::coeff ( )
inline

Get coefficients.

Definition at line 209 of file Stokhos_ViewStorage.hpp.

Member Data Documentation

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
const bool Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::is_static = static_length != 0
static

Definition at line 71 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
const int Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::static_size = static_length
static

Definition at line 72 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
const bool Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::supports_reset = false
static

Definition at line 73 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
const bool Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::supports_resize = ! is_static
static

Definition at line 74 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
const bool Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::supports_view = true
static

Definition at line 75 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
const pointer Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::coeff_
private

Coefficient values.

Definition at line 214 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
const Kokkos::Impl::integral_nonzero_constant< ordinal_t , static_length > Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::size_
private

Size of array.

Definition at line 217 of file Stokhos_ViewStorage.hpp.

template<typename ordinal_t , typename value_t , unsigned static_length, unsigned static_stride, typename device_t >
const Kokkos::Impl::integral_nonzero_constant< ordinal_t , static_stride > Stokhos::ViewStorage< ordinal_t, value_t, static_length, static_stride, device_t >::stride_
private

Stride of array.

Definition at line 220 of file Stokhos_ViewStorage.hpp.


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