diff options
Diffstat (limited to 'BS/host')
-rw-r--r-- | BS/host/app.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/BS/host/app.c b/BS/host/app.c index 10d76f1..f267645 100644 --- a/BS/host/app.c +++ b/BS/host/app.c @@ -33,12 +33,14 @@ // Create input arrays void create_test_file(DTYPE * input, DTYPE * querys, uint64_t nr_elements, uint64_t nr_querys) { + srand(time(NULL)); + input[0] = 1; for (uint64_t i = 1; i < nr_elements; i++) { - input[i] = input[i - 1] + 1; + input[i] = input[i - 1] + (rand() % 10) + 1; } for (uint64_t i = 0; i < nr_querys; i++) { - querys[i] = i; + querys[i] = input[rand() % nr_elements]; } } |