Changeset a6bb5fc for libcfa/src


Ignore:
Timestamp:
Mar 20, 2023, 3:45:23 PM (21 months ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master
Children:
c3ed603
Parents:
4c6ba5a
Message:

fixed merge conflict

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/bits/random.hfa

    r4c6ba5a ra6bb5fc  
    1010// Created On       : Fri Jan 14 07:18:11 2022
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Dec 22 20:54:22 2022
    13 // Update Count     : 178
     12// Last Modified On : Mon Mar 20 10:01:40 2023
     13// Update Count     : 180
    1414//
    1515
     
    4646// Define C/CFA PRNG name and random-state.
    4747
    48 // SKULLDUGGERY: typedefs name struct and typedef with the same name to deal with CFA typedef numbering problem.
    49 
    5048#ifdef XOSHIRO256PP
    5149#define PRNG_NAME_64 xoshiro256pp
    5250#define PRNG_STATE_64_T GLUE(PRNG_NAME_64,_t)
    53 typedef struct PRNG_STATE_64_T { uint64_t s0, s1, s2, s3; } PRNG_STATE_64_T;
     51typedef struct { uint64_t s0, s1, s2, s3; } PRNG_STATE_64_T;
    5452#endif // XOSHIRO256PP
    5553
     
    5755#define PRNG_NAME_32 xoshiro128pp
    5856#define PRNG_STATE_32_T GLUE(PRNG_NAME_32,_t)
    59 typedef struct PRNG_STATE_32_T { uint32_t s0, s1, s2, s3; } PRNG_STATE_32_T;
     57typedef struct { uint32_t s0, s1, s2, s3; } PRNG_STATE_32_T;
    6058#endif // XOSHIRO128PP
    6159
     
    9391#define PRNG_NAME_64 kiss_64
    9492#define PRNG_STATE_64_T GLUE(PRNG_NAME_64,_t)
    95 typedef struct PRNG_STATE_64_T { uint64_t z, w, jsr, jcong; } PRNG_STATE_64_T;
     93typedef struct { uint64_t z, w, jsr, jcong; } PRNG_STATE_64_T;
    9694#endif // KISS_^64
    9795
     
    9997#define PRNG_NAME_32 xorwow
    10098#define PRNG_STATE_32_T GLUE(PRNG_NAME_32,_t)
    101 typedef struct PRNG_STATE_32_T { uint32_t a, b, c, d, counter; } PRNG_STATE_32_T;
     99typedef struct { uint32_t a, b, c, d, counter; } PRNG_STATE_32_T;
    102100#endif // XOSHIRO128PP
    103101
     
    189187
    190188#ifndef XOSHIRO256PP
    191 typedef struct xoshiro256pp_t { uint64_t s0, s1, s2, s3; } xoshiro256pp_t;
     189typedef struct { uint64_t s0, s1, s2, s3; } xoshiro256pp_t;
    192190#endif // ! XOSHIRO256PP
    193191
     
    220218    uint64_t seed4 = wyhash64( state );
    221219        state = (xoshiro256pp_t){ seed1, seed2, seed3, seed4 };
    222         xoshiro256pp( state );
     220        xoshiro256pp( state );                                                          // prime
    223221} // xoshiro256pp_set_seed
    224222
     
    233231
    234232#ifndef XOSHIRO128PP
    235 typedef struct xoshiro128pp_t { uint32_t s0, s1, s2, s3; } xoshiro128pp_t;
     233typedef struct { uint32_t s0, s1, s2, s3; } xoshiro128pp_t;
    236234#endif // ! XOSHIRO128PP
    237235
     
    315313// The state must be seeded with a nonzero value.
    316314#ifndef KISS_64
    317 typedef struct kiss_64_t { uint64_t z, w, jsr, jcong; } kiss_64_t;
     315typedef struct { uint64_t z, w, jsr, jcong; } kiss_64_t;
    318316#endif // ! KISS_64
    319317
     
    337335// The state array must be initialized to non-zero in the first four words.
    338336#ifndef XORWOW
    339 typedef struct xorwow_t { uint32_t a, b, c, d, counter; } xorwow_t;
     337typedef struct { uint32_t a, b, c, d, counter; } xorwow_t;
    340338#endif // ! XORWOW
    341339
Note: See TracChangeset for help on using the changeset viewer.