Commit | Line | Data |
---|---|---|
e25839d4 JA |
1 | #ifndef FIO_ZIPF_H |
2 | #define FIO_ZIPF_H | |
3 | ||
4 | #include "rand.h" | |
5 | ||
6 | struct zipf_state { | |
7 | uint64_t nranges; | |
8 | double theta; | |
9 | double zeta2; | |
10 | double zetan; | |
925fee33 | 11 | double pareto_pow; |
e25839d4 JA |
12 | struct frand_state rand; |
13 | }; | |
14 | ||
15 | void zipf_init(struct zipf_state *zs, unsigned long nranges, double theta); | |
16 | unsigned long long zipf_next(struct zipf_state *zs); | |
17 | ||
925fee33 JA |
18 | void pareto_init(struct zipf_state *zs, unsigned long nranges, double h); |
19 | unsigned long long pareto_next(struct zipf_state *zs); | |
20 | ||
e25839d4 | 21 | #endif |