Ignore:
Timestamp:
Dec 9, 2022, 5:11:27 PM (2 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, master
Children:
70cd431
Parents:
e1d66c84
Message:

change all PRNG to prime the PRNG state in set_seed with the given seed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/thread.cfa

    re1d66c84 r261e107  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Nov 30 18:14:07 2022
    13 // Update Count     : 95
     12// Last Modified On : Fri Dec  9 15:13:04 2022
     13// Update Count     : 98
    1414//
    1515
     
    230230void set_seed( size_t seed ) {
    231231        PRNG_STATE_T & state = active_thread()->random_state;
     232        PRNG_SET_SEED( state, seed );
    232233        __global_random_seed = seed;
    233         PRNG_SET_SEED( state, seed );
    234         (void)PRNG_NAME( state );                                                       // prime PRNG
    235234        __global_random_prime = seed;
    236235        __global_random_mask = true;
Note: See TracChangeset for help on using the changeset viewer.