Exclusively use OAI_RNGSEED env variable everywhere

Hide normal table initialization of Ziggurat generator from outside to
force the usage of randominit() for RNG initialization. In this step,
remove the randominit() seed parameter and only rely on OAI_RNGSEED for
a consistent RNG initialization, as this parameter was used differently
("0" as fixed number or to force a random seed).

Now, only use OAI_RNGSEED env variable to force the usage of a fixed
seed.
This commit is contained in:
Laurent THOMAS
2025-12-01 12:10:31 +01:00
committed by Robert Schmidt
parent 0e4ade9472
commit a1b4220a91
31 changed files with 47 additions and 88 deletions
+1 -2
View File
@@ -528,10 +528,9 @@ int gauss(unsigned int *gauss_LUT,unsigned char Nbits);
void fill_random(void *buf, size_t sz);
double gaussdouble(double,double);
void randominit(unsigned long seed_init);
void randominit(); // fix seed number by env variable OAI_RNGSEED
double uniformrandom(void);
double gaussZiggurat(double mean, double variance);
void tableNor(unsigned long seed);
int freq_channel(channel_desc_t *desc,uint16_t nb_rb, int16_t n_samples,int scs);
int init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples,int scs);
void term_freq_channel(void);