28 lines
520 B
C
28 lines
520 B
C
#ifndef XORSHIFT_H
|
|
#define XORSHIFT_H
|
|
|
|
#include "../../common/aliases/aliases.h"
|
|
|
|
#ifdef __cplusplus
|
|
BEGIN_C_LINKAGE
|
|
#endif // __cplusplus
|
|
|
|
typedef struct xor_256_state XOR256State;
|
|
struct xor_256_state {
|
|
u64 x;
|
|
u64 y;
|
|
u64 z;
|
|
u64 w;
|
|
};
|
|
|
|
XOR256State wapp_prng_xorshift_init_state(void);
|
|
u64 wapp_prng_xorshift_256(XOR256State *state);
|
|
u64 wapp_prng_xorshift_256ss(XOR256State *state);
|
|
u64 wapp_prng_xorshift_256p(XOR256State *state);
|
|
|
|
#ifdef __cplusplus
|
|
END_C_LINKAGE
|
|
#endif // __cplusplus
|
|
|
|
#endif // !XORSHIFT_H
|