configure: add gettid() test
[fio.git] / lib / zipf.h
... / ...
CommitLineData
1#ifndef FIO_ZIPF_H
2#define FIO_ZIPF_H
3
4#include <inttypes.h>
5#include "rand.h"
6#include "types.h"
7
8struct zipf_state {
9 uint64_t nranges;
10 double theta;
11 double zeta2;
12 double zetan;
13 double pareto_pow;
14 struct frand_state rand;
15 uint64_t rand_off;
16 bool disable_hash;
17};
18
19void zipf_init(struct zipf_state *zs, uint64_t nranges, double theta, unsigned int seed);
20uint64_t zipf_next(struct zipf_state *zs);
21
22void pareto_init(struct zipf_state *zs, uint64_t nranges, double h, unsigned int seed);
23uint64_t pareto_next(struct zipf_state *zs);
24void zipf_disable_hash(struct zipf_state *zs);
25
26#endif