Ignore:
Timestamp:
Feb 9, 2022, 10:59:05 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
454b4e0
Parents:
7a15b7e
Message:

add fast PRNG code

File:
1 edited

Legend:

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

    r7a15b7e r12b5e94a  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jan 13 20:11:55 2022
    13 // Update Count     : 42
     12// Last Modified On : Sat Jan 15 14:34:58 2022
     13// Update Count     : 45
    1414//
    1515
     
    179179        GENERATOR( active_thread()->random_state );
    180180} // set_seed
    181 uint32_t prng( void ) { return GENERATOR( active_thread()->random_state ); } // [0,UINT_MAX]
     181
     182uint32_t prng( void ) {                                                                 // [0,UINT_MAX]
     183        uint32_t & state = active_thread()->random_state;
     184        return GENERATOR( state );
     185} // prng
    182186
    183187// Local Variables: //
Note: See TracChangeset for help on using the changeset viewer.