Cloudy
Spectral Synthesis Code for Astrophysics
Loading...
Searching...
No Matches
t_ran Class Reference

#include <ran.h>

Collaboration diagram for t_ran:

Public Member Functions

int8 i7 ()
 
uint8 u8 ()
 
int16 i15 ()
 
uint16 u16 ()
 
int32 i31 ()
 
uint32 u32 ()
 
int64 i63 ()
 
uint64 u64 ()
 
double dbl ()
 
realnum rnm ()
 
double normal ()
 
void init ()
 
void init (uint64 s, int nRANK)
 
void new_rank (int nRANK)
 
uint64 get_seed () const
 
string print_seed () const
 
 t_ran (algo_prng algo)
 
 t_ran (const t_ran &)=delete
 
t_ranoperator= (const t_ran &)=delete
 
 ~t_ran ()
 

Private Member Functions

void p_init (uint64 s, int nRANK)
 
void p_seed (uint64 s, int nRANK)
 
uint64 p_generate_random_seed ()
 
uint64 p_random_seed ()
 
void p_xoroshiro128plus (uint64 *pool, size_t size)
 
void p_xoshiro256starstar (uint64 *pool, size_t size)
 
double p_ZigTailNormal (bool lgNegative)
 
void p_u64 (void *pool, size_t size)
 
void p_dbl (void *pool, size_t size)
 
void p_flt (void *pool, size_t size)
 
void p_zig (void *pool, size_t size)
 

Private Attributes

bool p_lgInitialized
 
algo_prng p_algo
 
size_t p_sq
 
size_t p_npack
 
size_t p_ns
 
uint64 p_s
 
uint64 * p_state
 
const double * p_zigxd
 
const double * p_zigrd
 
const double * p_zige2d
 
ran_pool< uint8 > p_pc
 
ran_pool< uint16 > p_ps
 
ran_pool< uint32 > p_pi
 
ran_pool< uint64 > p_pl
 
ran_pool< double > p_pd
 
ran_pool< sys_floatp_pf
 
ran_pool< double > p_zd
 

Static Private Attributes

static const size_t ND = 2048
 
static const size_t SQ_XOROSHIRO128 = 2
 
static const size_t SQ_XOSHIRO256 = 4
 

Constructor & Destructor Documentation

◆ t_ran() [1/2]

t_ran::t_ran ( algo_prng algo)
explicit

◆ t_ran() [2/2]

t_ran::t_ran ( const t_ran & )
delete

References t_ran().

Here is the call graph for this function:

◆ ~t_ran()

t_ran::~t_ran ( )
inline

References p_state, and posix_memalign_free().

Here is the call graph for this function:

Member Function Documentation

◆ dbl()

double t_ran::dbl ( )
inline

References p_pd.

Referenced by normal(), and p_ZigTailNormal().

◆ get_seed()

uint64 t_ran::get_seed ( ) const
inline

References p_s.

◆ i15()

int16 t_ran::i15 ( )
inline

References p_ps.

◆ i31()

int32 t_ran::i31 ( )
inline

References p_pi.

◆ i63()

int64 t_ran::i63 ( )
inline

References p_pl.

◆ i7()

int8 t_ran::i7 ( )
inline

References p_pc.

◆ init() [1/2]

void t_ran::init ( )
inline

References p_generate_random_seed(), and p_init().

Here is the call graph for this function:

◆ init() [2/2]

void t_ran::init ( uint64 s,
int nRANK )
inline

References p_init().

Here is the call graph for this function:

◆ new_rank()

void t_ran::new_rank ( int nRANK)
inline

References ASSERT, p_lgInitialized, p_s, and p_seed().

Here is the call graph for this function:

◆ normal()

double t_ran::normal ( )
inline

References dbl(), e2(), LIKELY, p_zd, p_zige2d, p_zigrd, p_ZigTailNormal(), p_zigxd, pow2, u8(), and UNLIKELY.

Here is the call graph for this function:

◆ operator=()

t_ran & t_ran::operator= ( const t_ran & )
delete

References t_ran().

Here is the call graph for this function:

◆ p_dbl()

void t_ran::p_dbl ( void * pool,
size_t size )
private

References convert_double(), DEBUG_ENTRY, and p_u64().

Referenced by p_init().

Here is the call graph for this function:

◆ p_flt()

void t_ran::p_flt ( void * pool,
size_t size )
private

References convert_float(), DEBUG_ENTRY, and p_u64().

Referenced by p_init().

Here is the call graph for this function:

◆ p_generate_random_seed()

uint64 t_ran::p_generate_random_seed ( )
private

References DEBUG_ENTRY, MD5string(), mode_rb, and ran.

Referenced by init().

Here is the call graph for this function:

◆ p_init()

void t_ran::p_init ( uint64 s,
int nRANK )
private

References DEBUG_ENTRY, ND, p_dbl(), p_flt(), p_lgInitialized, p_pc, p_pd, p_pf, p_pi, p_pl, p_ps, p_seed(), p_u64(), p_zd, p_zig(), p_zige2d, p_zigrd, p_zigxd, ZigEX2, ZigRN, and ZigXN.

Referenced by init(), and init().

Here is the call graph for this function:

◆ p_random_seed()

uint64 t_ran::p_random_seed ( )
private

◆ p_seed()

void t_ran::p_seed ( uint64 s,
int nRANK )
private

References DEBUG_ENTRY, init_seed(), p_algo, p_npack, p_ns, p_pc, p_pd, p_pf, p_pi, p_pl, p_ps, p_s, p_state, and p_zd.

Referenced by new_rank(), and p_init().

Here is the call graph for this function:

◆ p_u64()

void t_ran::p_u64 ( void * pool,
size_t size )
private

References DEBUG_ENTRY, p_algo, p_xoroshiro128plus(), p_xoshiro256starstar(), PRNG_XOROSHIRO128PLUS, PRNG_XOSHIRO256STARSTAR, and TotalInsanity().

Referenced by p_dbl(), p_flt(), p_init(), and p_zig().

Here is the call graph for this function:

◆ p_xoroshiro128plus()

void t_ran::p_xoroshiro128plus ( uint64 * pool,
size_t size )
private

References p_ns, p_state, and xoroshiro128plus().

Referenced by p_u64().

Here is the call graph for this function:

◆ p_xoshiro256starstar()

void t_ran::p_xoshiro256starstar ( uint64 * pool,
size_t size )
private

References p_ns, p_state, and xoshiro256starstar().

Referenced by p_u64().

Here is the call graph for this function:

◆ p_zig()

void t_ran::p_zig ( void * pool,
size_t size )
private

References convert_zig(), DEBUG_ENTRY, and p_u64().

Referenced by p_init().

Here is the call graph for this function:

◆ p_ZigTailNormal()

double t_ran::p_ZigTailNormal ( bool lgNegative)
private

References dbl(), DEBUG_ENTRY, and pow2.

Referenced by normal().

Here is the call graph for this function:

◆ print_seed()

string t_ran::print_seed ( ) const
inline

References p_s.

◆ rnm()

realnum t_ran::rnm ( )
inline

References p_pd, and p_pf.

◆ u16()

uint16 t_ran::u16 ( )
inline

References p_ps.

◆ u32()

uint32 t_ran::u32 ( )
inline

References p_pi.

◆ u64()

uint64 t_ran::u64 ( )
inline

References p_pl.

◆ u8()

uint8 t_ran::u8 ( )
inline

References p_pc.

Referenced by normal().

Member Data Documentation

◆ ND

const size_t t_ran::ND = 2048
staticprivate

Referenced by p_init().

◆ p_algo

algo_prng t_ran::p_algo
private

Referenced by p_seed(), p_u64(), and t_ran().

◆ p_lgInitialized

bool t_ran::p_lgInitialized
private

Referenced by new_rank(), p_init(), and t_ran().

◆ p_npack

size_t t_ran::p_npack
private

Referenced by p_seed(), and t_ran().

◆ p_ns

size_t t_ran::p_ns
private

◆ p_pc

ran_pool<uint8> t_ran::p_pc
private

Referenced by i7(), p_init(), p_seed(), and u8().

◆ p_pd

ran_pool<double> t_ran::p_pd
private

Referenced by dbl(), p_init(), p_seed(), and rnm().

◆ p_pf

ran_pool<sys_float> t_ran::p_pf
private

Referenced by p_init(), p_seed(), and rnm().

◆ p_pi

ran_pool<uint32> t_ran::p_pi
private

Referenced by i31(), p_init(), p_seed(), and u32().

◆ p_pl

ran_pool<uint64> t_ran::p_pl
private

Referenced by i63(), p_init(), p_seed(), and u64().

◆ p_ps

ran_pool<uint16> t_ran::p_ps
private

Referenced by i15(), p_init(), p_seed(), and u16().

◆ p_s

uint64 t_ran::p_s
private

◆ p_sq

size_t t_ran::p_sq
private

Referenced by t_ran().

◆ p_state

uint64* t_ran::p_state
private

◆ p_zd

ran_pool<double> t_ran::p_zd
private

Referenced by normal(), p_init(), and p_seed().

◆ p_zige2d

const double* t_ran::p_zige2d
private

Referenced by normal(), and p_init().

◆ p_zigrd

const double* t_ran::p_zigrd
private

Referenced by normal(), and p_init().

◆ p_zigxd

const double* t_ran::p_zigxd
private

Referenced by normal(), and p_init().

◆ SQ_XOROSHIRO128

const size_t t_ran::SQ_XOROSHIRO128 = 2
staticprivate

Referenced by t_ran().

◆ SQ_XOSHIRO256

const size_t t_ran::SQ_XOSHIRO256 = 4
staticprivate

Referenced by t_ran().


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