Project

General

Profile

Bug #12231 » test_jenkins.c

generates the first 10k draws for 1.37 - Samuel Just, 07/07/2015 11:42 PM

 
#include "crush/hash.c"
#include <stdio.h>

int main() {
const int x = 11319630;
for (int r = 0; r < 10000; ++r) {
int64_t max = -1;
int64_t max_osd = -1;
for (int osd = 0; osd < 6; ++osd) {
uint64_t draw = crush_hash32_3(CRUSH_HASH_RJENKINS1, x, osd, r);
draw &= 0xffff;
draw *= 65536;
if ((int64_t)draw > max) {
max_osd = osd;
max = draw;
}
printf("%lu\t", draw);
}
printf("%ld\n", max_osd);
}
}
(3-3/5)