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