Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
ApproxMVBB::RandomGenerators::XorShift128Plus Class Reference

#include <RandomGenerators.hpp>

Public Types

using result_type = uint64_t
 

Public Member Functions

void jump ()
 
uint64_t operator() ()
 
void seed (uint64_t seed)
 
 XorShift128Plus (const XorShift128Plus &gen)=default
 
 XorShift128Plus (XorShift128Plus &&gen)=default
 
 XorShift128Plus (uint64_t seed)
 
 XorShift128Plus ()
 

Static Public Member Functions

static constexpr result_type max ()
 
static constexpr result_type min ()
 

Private Attributes

uint64_t s [2]
 

Detailed Description

This is the fastest generator passing BigCrush without systematic failures, but due to the relatively short period it is acceptable only for applications with a mild amount of parallelism; otherwise, use a xorshift1024* generator.

The state must be seeded so that it is not everywhere zero. If you have a 64-bit seed, we suggest to seed a splitmix64 generator and use its output to fill s.

Definition at line 62 of file RandomGenerators.hpp.

Member Typedef Documentation

Definition at line 84 of file RandomGenerators.hpp.

Constructor & Destructor Documentation

ApproxMVBB::RandomGenerators::XorShift128Plus::XorShift128Plus ( const XorShift128Plus gen)
default
ApproxMVBB::RandomGenerators::XorShift128Plus::XorShift128Plus ( XorShift128Plus &&  gen)
default
ApproxMVBB::RandomGenerators::XorShift128Plus::XorShift128Plus ( uint64_t  seed)
inline

Definition at line 204 of file RandomGenerators.hpp.

ApproxMVBB::RandomGenerators::XorShift128Plus::XorShift128Plus ( )
inline

Take time() to seed this generator

Definition at line 209 of file RandomGenerators.hpp.

Member Function Documentation

void ApproxMVBB::RandomGenerators::XorShift128Plus::jump ( )
inline

This is the jump function for the generator. It is equivalent to 2^64 calls to next(); it can be used to generate 2^64 non-overlapping subsequences for parallel computations.

Definition at line 230 of file RandomGenerators.hpp.

static constexpr result_type ApproxMVBB::RandomGenerators::XorShift128Plus::max ( )
inlinestatic

Definition at line 86 of file RandomGenerators.hpp.

static constexpr result_type ApproxMVBB::RandomGenerators::XorShift128Plus::min ( )
inlinestatic

Definition at line 85 of file RandomGenerators.hpp.

uint64_t ApproxMVBB::RandomGenerators::XorShift128Plus::operator() ( )
inline

Generate random number

Definition at line 219 of file RandomGenerators.hpp.

void ApproxMVBB::RandomGenerators::XorShift128Plus::seed ( uint64_t  seed)
inline

Definition at line 213 of file RandomGenerators.hpp.

Member Data Documentation

uint64_t ApproxMVBB::RandomGenerators::XorShift128Plus::s[2]
private

Definition at line 64 of file RandomGenerators.hpp.


The documentation for this class was generated from the following file:


asr_approx_mvbb
Author(s): Gassner Nikolai
autogenerated on Mon Jun 10 2019 12:38:09