Celeritas
0.5.0-86+4a8eea4
|
#include "XorwowRngData.hh"
#include <random>
#include <utility>
#include "corecel/Assert.hh"
#include "corecel/data/Collection.hh"
#include "corecel/data/CollectionBuilder.hh"
Functions | |
void | celeritas::initialize_xorwow (Span< XorwowState > state, XorwowSeed const &seed, StreamId stream) |
Initialize XORWOW states with well-distributed random data. More... | |
template<MemSpace M> | |
void | celeritas::resize (XorwowRngStateData< Ownership::value, M > *state, HostCRef< XorwowRngParamsData > const ¶ms, StreamId stream, size_type size) |
Resize and seed the RNG states. | |
template void | celeritas::resize (HostVal< XorwowRngStateData > *, HostCRef< XorwowRngParamsData > const &, StreamId, size_type) |
template void | celeritas::resize (XorwowRngStateData< Ownership::value, MemSpace::device > *, HostCRef< XorwowRngParamsData > const &, StreamId, size_type) |
void celeritas::initialize_xorwow | ( | Span< XorwowState > | state, |
XorwowSeed const & | seed, | ||
StreamId | stream | ||
) |
Initialize XORWOW states with well-distributed random data.
cuRAND and hipRAND implement functions that permute the original (but seemingly arbitrary) seeds given in Marsaglia with 64 bits of seed data. We simply generate pseudorandom, independent starting states for all data in all threads using a 32-bit MT19937 engine.