summaryrefslogtreecommitdiff
path: root/xorshift.h
blob: 64c3ea276b722577cbca92f3697ef31afb0a2dab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#pragma once

#include <stdint.h>

#define XORSHIFT_S 16

typedef struct {
	uint64_t s[XORSHIFT_S];
	int p;
} randctx;

uint64_t xorshift_step (randctx * const st);
void xorshift_seed (randctx * const st);