projects
/
fio.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Add sample zipf distribution randomizer
[fio.git]
/
lib
/
zipf.h
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;
11
struct frand_state rand;
12
};
13
14
void zipf_init(struct zipf_state *zs, unsigned long nranges, double theta);
15
unsigned long long zipf_next(struct zipf_state *zs);
16
17
#endif