Stokhos  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Classes | Public Types | Public Member Functions | Static Public 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_type & reference
 
typedef const value_type & const_reference
 
typedef value_type * pointer
 
typedef const value_type * const_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.
 
KOKKOS_INLINE_FUNCTION ViewStorage (pointer v, const ordinal_type &arg_size=0, const ordinal_type &arg_stride=0)
 Constructor.
 
KOKKOS_INLINE_FUNCTION ViewStorage (const ordinal_type &sz, const value_type *x)
 Constructor from array.
 
KOKKOS_INLINE_FUNCTION ViewStorage (const ordinal_type &sz, pointer v, bool owned)
 Constructor for creating a view.
 
KOKKOS_INLINE_FUNCTION ViewStorage (const ViewStorage &s)
 Constructor.
 
KOKKOS_INLINE_FUNCTION ViewStorage (const ViewStorage &s, const ordinal_type &arg_begin, const ordinal_type &arg_end)
 
KOKKOS_INLINE_FUNCTION ~ViewStorage ()
 Destructor.
 
KOKKOS_INLINE_FUNCTION void init (const_reference v)
 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 load (pointer v)
 Load values to an array of values.
 
KOKKOS_INLINE_FUNCTION void resize (ordinal_type s)
 Resize function disabled.
 
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.
 
KOKKOS_INLINE_FUNCTION ordinal_type size () const
 Return size.
 
KOKKOS_INLINE_FUNCTION reference operator[] (const ordinal_type &i) const
 Coefficient access (avoid if possible)
 
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.
 
KOKKOS_INLINE_FUNCTION pointer coeff ()
 Get coefficients.
 

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
 

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.


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