diff options
author | Jens Axboe <axboe@kernel.dk> | 2012-11-07 16:12:43 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-11-07 16:12:43 +0100 |
commit | 1442ba18b74e353ecbdf828b43f965648de2d546 (patch) | |
tree | b35498bc02acbe753ba4677d6f454a845c6e8eea /lib/zipf.c | |
parent | b2b0b7534d857e4ca22429a9f573791b8e03264c (diff) | |
download | fio-1442ba18b74e353ecbdf828b43f965648de2d546.tar.gz |
zipf: cleanup
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'lib/zipf.c')
-rw-r--r-- | lib/zipf.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -99,21 +99,16 @@ static void shared_rand_init(struct zipf_state *zs, unsigned long nranges) void zipf_init(struct zipf_state *zs, unsigned long nranges, double theta) { - unsigned int i; - shared_rand_init(zs, nranges); zs->theta = theta; - - for (i = 1; i <= 2; i++) - zs->zeta2 += pow(1.0 / (double) i, zs->theta); + zs->zeta2 = pow(1.0, zs->theta) + pow(0.5, zs->theta); zipf_load_gen_zeta(zs); } unsigned long long zipf_next(struct zipf_state *zs) { - double alpha, eta, rand_uni, rand_z; unsigned long long n = zs->nranges; unsigned long long val; |