10 #ifndef KOKKOS_RANDOM_UQ_PCE_HPP
11 #define KOKKOS_RANDOM_UQ_PCE_HPP
14 #if defined(HAVE_STOKHOS_KOKKOS)
18 #include "Kokkos_Random.hpp"
26 template<
class Generator,
class Storage>
27 struct rand<Generator,Sacado::UQ::PCE<Storage> > {
30 typedef rand<Generator,BaseScalar> BaseRand;
32 KOKKOS_INLINE_FUNCTION
35 KOKKOS_INLINE_FUNCTION
36 static Scalar draw(Generator& gen) {
37 return BaseRand::draw(gen);
40 KOKKOS_INLINE_FUNCTION
41 static Scalar draw(Generator& gen,
const Scalar& range) {
42 return BaseRand::draw(gen, range.coeff(0));
45 KOKKOS_INLINE_FUNCTION
47 return BaseRand::draw(gen, start.coeff(0), end.coeff(0));
51 template<
class S,
class ... P,
class RandomPool>
56 typedef View<Sacado::UQ::PCE<S>**,P...> Vector;
58 fill_random( a_flat, g, begin.fastAccessCoeff(0), end.fastAccessCoeff(0) );
KOKKOS_INLINE_FUNCTION PCE< Storage > max(const typename PCE< Storage >::value_type &a, const PCE< Storage > &b)
ScalarType g(const Teuchos::Array< ScalarType > &x, const ScalarType &y)