Skip to content

Commit

Permalink
Fix bug in tyche
Browse files Browse the repository at this point in the history
  • Loading branch information
bashtage committed Oct 2, 2024
1 parent c1f49ed commit a5dc355
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions randomgen/src/tyche/tyche.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ struct TYCHE_STATE_T {

typedef struct TYCHE_STATE_T tyche_state_t;

inline uint32_t rotl(uint32_t value, unsigned int x) {
static inline uint32_t rotl(uint32_t value, unsigned int x) {
return (value << x) | (value >> (32 - x));
}

inline void mix(tyche_state_t *state) {
static inline void mix(tyche_state_t *state) {
state->a += state->b;
state->d = rotl(state->d ^ state->a, 16);
state->c += state->d;
Expand Down Expand Up @@ -73,7 +73,7 @@ static inline double tyche_next_double(tyche_state_t *state) {
}


inline void mix_openrand(tyche_state_t *state) {
static inline void mix_openrand(tyche_state_t *state) {
state->b = rotl(state->b, 7) ^ state->c;
state->c -= state->d;
state->d = rotl(state->d, 8) ^ state->a;
Expand Down

0 comments on commit a5dc355

Please sign in to comment.