Skip to content

Random Number

Duane Labreche edited this page Sep 21, 2018 · 9 revisions

headers: Kokkos_Core.hpp, Kokkos_Complex.hpp

template<class Generator> struct rand<Generator, gen_data_type>

  • KOKKOS_INLINE_FUNCTION static gen_func_type max(){return type_value}

  • KOKKOS_INLINE_FUNCTION static gen_func_type draw(Generator& gen) {return gen_data_type((gen.rand()&gen_return__value)}

  • KOKKOS_INLINE_FUNCTION static gen_func_type draw(Generator& gen, const gen_data_type& range) {return gen_data_type((gen.rand(range));}

  • KOKKOS_INLINE_FUNCTION static gen_func_type draw(Generator& gen, const gen_data_type& start, const gen_data_type& end) {return gen_data_type(gen.rand(start,end));}

Function specializations for gen_data_type, gen_func_type and type_value gen_data_type: Scalar, char, short, int, uint, long, ulong, long long, ulong long, float, double, complex, complex

Clone this wiki locally