35 struct seed_generator_t {
39 seed_generator_t(
unsigned s) : seed(s)
52 static bool initialized =
false;
59 return GetTickCount() ^ GetCurrentProcessId();
64 return tv.tv_sec ^ tv.tv_usec ^ (getpid() << 16);
unsigned get_next_seed()
get a seed value for prng initialization, subsequent calls return a sequence of different values ...
seed_generator_t & seed_generator()
Aquire a lock that's valid until the end of scope.
#define STXXL_BEGIN_NAMESPACE
void set_seed(unsigned seed)
set the global stxxl seed value
#define STXXL_END_NAMESPACE