Changeset bdce852


Ignore:
Timestamp:
Jun 30, 2020, 12:43:03 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
7812a7b5
Parents:
9bbbc8e
Message:

Switched RNG from lehmer64 to wyhash64 for 32-bit builts

Location:
libcfa/src/concurrency
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/invoke.h

    r9bbbc8e rbdce852  
    5757                        } preemption_state;
    5858
    59                         __uint128_t rand_seed;
     59                        #if defined(__SIZEOF_INT128__)
     60                                __uint128_t rand_seed;
     61                        #else
     62                                uint64 rand_seed;
     63                        #endif
    6064                } kernelTLS __attribute__ ((tls_model ( "initial-exec" )));
    6165        }
  • libcfa/src/concurrency/kernel_private.hfa

    r9bbbc8e rbdce852  
    9696        // kernelTLS.rand_seed ^= kernelTLS.rand_seed << 7;
    9797        // return kernelTLS.rand_seed;
    98         return __lehmer64( kernelTLS.rand_seed );
     98        #if defined(__SIZEOF_INT128__)
     99                return __lehmer64( kernelTLS.rand_seed );
     100        #else
     101                return __wyhash64( kernelTLS.rand_seed );
     102        #endif
    99103}
    100104
Note: See TracChangeset for help on using the changeset viewer.