34 struct seed_generator_t {
38 seed_generator_t(
unsigned s) : seed(s)
51 static bool initialized =
false;
58 return GetTickCount() ^ GetCurrentProcessId();
63 return (
unsigned)(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