62 const std::uint64_t seed);
70 template <
typename TData>
72 const size_t n, TData *x,
73 const unsigned int streamID = 0);
77 template <
typename TData>
79 const size_t n, TData *x,
80 const unsigned int streamID = 0);
89 static std::uint64_t
StreamSeed(
const std::uint64_t seed,
90 const unsigned int streamID)
94 std::uint64_t z = seed + 0x9E3779B97F4A7C15ull * (streamID + 1ull);
95 z = (z ^ (z >> 30)) * 0xBF58476D1CE4E5B9ull;
96 z = (z ^ (z >> 27)) * 0x94D049BB133111EBull;
#define LIB_UTILITIES_EXPORT
Fills device memory with pseudo-random numbers.
static std::uint64_t StreamSeed(const std::uint64_t seed, const unsigned int streamID)
Seed of the generator of stream streamID.
DeviceRandomGenerator & operator=(const DeviceRandomGenerator &)=delete
std::unique_ptr< Engines > m_engines
void Uniform(const TData a, const TData b, const size_t n, TData *x, const unsigned int streamID=0)
Fill the n entries of x with numbers uniform between a and b.
DeviceRandomGenerator(const DeviceRandomGenerator &)=delete
void Normal(const TData mean, const TData sigma, const size_t n, TData *x, const unsigned int streamID=0)
Fill the n entries of x with normal numbers of the given mean and standard deviation.