Skip to content

Commit

Permalink
Do not use Nova types in benchmark base
Browse files Browse the repository at this point in the history
  • Loading branch information
kadir014 committed Oct 20, 2023
1 parent 1965ba9 commit 23116fb
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions benchmarks/benchmark_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "novaphysics/novaphysics.h"


/**
Expand All @@ -30,14 +29,14 @@ int irand(int lower, int higher) {
}

/**
* @brief Return random nv_float in given range
* @brief Return random double in given range
*
* @param lower Min range
* @param higher Max range
* @return nv_float
* @return double
*/
nv_float frand(nv_float lower, nv_float higher) {
nv_float normal = rand() / (nv_float)RAND_MAX;
double frand(double lower, double higher) {
double normal = rand() / (double)RAND_MAX;
return lower + normal * (higher - lower);
}

Expand Down Expand Up @@ -230,10 +229,6 @@ static inline void Benchmark_stop(Benchmark *bench) {
void Benchmark_results(Benchmark *bench) {
printf("100%%\n");

for (size_t i = 0; i < bench->iters; i++) {
printf("%f\n", bench->times[i]);
}

Stats stats1;
calculate_stats(&stats1, bench->times, bench->iters);
print_stats(stats1);
Expand Down

0 comments on commit 23116fb

Please sign in to comment.