44 #ifndef STOKHOS_STANDARD_STORAGE_HPP 45 #define STOKHOS_STANDARD_STORAGE_HPP 47 #include "Teuchos_Array.hpp" 52 template <
typename ordinal_type,
typename value_type>
62 template <
typename ord_t,
typename val_t>
85 std::copy(v, v+sz,
coeff_.begin());
124 #endif // STOKHOS_STANDARD_STORAGE_HPP const value_type & const_reference
void init(const_pointer v, const ordinal_type &sz=0)
Initialize values to an array of values.
StandardStorage(const ordinal_type &sz, const value_type &x=value_type(0.0))
Constructor.
pointer coeff()
Get coefficients.
const IndexType const IndexType const IndexType const IndexType const ValueType const ValueType * x
StandardStorage< ord_t, val_t > type
const value_type * const_pointer
Top-level namespace for Stokhos classes and functions.
void load(pointer v)
Load values to an array of values.
Teuchos::Array< value_type > coeff_
Coefficient values.
void init(const_reference v)
Initialize values to a constant value.
const_pointer coeff() const
Get coefficients.
const_reference operator[](const ordinal_type &i) const
Coefficient access (avoid if possible)
ordinal_type size() const
Return size.
~StandardStorage()
Destructor.
void resize(const ordinal_type &sz)
Resize to new size (values are preserved)
Turn StandardStorage into a meta-function class usable with mpl::apply.
std::enable_if< Kokkos::is_view_uq_pce< Kokkos::View< XD, XP... > >::value >::type fill(const Kokkos::View< XD, XP... > &x, const typename Kokkos::View< XD, XP... >::non_const_value_type &val)