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 33 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 45 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 46 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 47 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 48 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 49 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 50 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 51 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 36 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 68 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 75 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 79 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 84 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 88 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 96 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 106 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 119 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 131 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 142 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 154 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 158 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 165 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 169 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 173 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 177 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 39 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 40 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 41 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 42 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 43 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 182 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 185 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 188 of file Stokhos_ViewStorage.hpp.


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