Changeset 3ef5905


Ignore:
Timestamp:
Sep 3, 2023, 8:20:39 AM (15 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
5f31bf0
Parents:
6e93819
Message:

add get_seed for thread random numbers

Location:
libcfa/src/concurrency
Files:
2 edited

Legend:

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

    r6e93819 r3ef5905  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jan  9 08:42:33 2023
    13 // Update Count     : 103
     12// Last Modified On : Sun Sep  3 07:32:28 2023
     13// Update Count     : 104
    1414//
    1515
     
    229229} // set_seed
    230230
     231size_t get_seed() { return __global_random_seed; }
     232
    231233size_t prng( void ) {                                                                   // [0,UINT_MAX]
    232234        return PRNG_NAME( active_thread()->random_state );
  • libcfa/src/concurrency/thread.hfa

    r6e93819 r3ef5905  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  2 11:27:59 2023
    13 // Update Count     : 37
     12// Last Modified On : Sun Sep  3 07:34:43 2023
     13// Update Count     : 47
    1414//
    1515
     
    144144// prng
    145145void set_seed( size_t seed );
     146size_t get_seed( void ) __attribute__(( warn_unused_result ));
    146147static inline {
    147148        size_t prng( thread$ & th ) __attribute__(( warn_unused_result )) { return PRNG_NAME( th.random_state ); } // [0,UINT_MAX]
Note: See TracChangeset for help on using the changeset viewer.