diff options
| author | Simon Quigley <tsimonq2@ubuntu.com> | 2018-02-27 22:34:49 -0600 | 
|---|---|---|
| committer | Simon Quigley <tsimonq2@ubuntu.com> | 2018-02-27 22:34:49 -0600 | 
| commit | 00831e690c4581ee8f0f92902ebdb75304bde817 (patch) | |
| tree | 55a37b9cc5d60ad047631ffb39d2f822a22d6d39 /includes/benchmark.h | |
| parent | d95f107ef2b9e82c341060be0def97d7bfa430b9 (diff) | |
| parent | 09fcc751ef158898c315ebc9299a0fa3a722d914 (diff) | |
Update upstream source from tag 'upstream/0.5.1+git20180227'
Update to upstream version '0.5.1+git20180227'
with Debian dir 7ca675e2ccb4367b7cc5b255a36b5173afaf9d2c
Diffstat (limited to 'includes/benchmark.h')
| -rw-r--r-- | includes/benchmark.h | 26 | 
1 files changed, 23 insertions, 3 deletions
diff --git a/includes/benchmark.h b/includes/benchmark.h index 39de042b..277f0c07 100644 --- a/includes/benchmark.h +++ b/includes/benchmark.h @@ -27,9 +27,29 @@ void benchmark_nqueens(void);  void benchmark_raytrace(void);  void benchmark_zlib(void); -gdouble benchmark_parallel_for(guint start, guint end, +typedef struct { +    double result; +    double elapsed_time; +    int threads_used; +} bench_value; + +#define EMPTY_BENCH_VALUE {-1.0f,0,0} + +char *bench_value_to_str(bench_value r); +bench_value bench_value_from_str(const char* str); + +/* Note: + *    benchmark_parallel_for(): element [start] included, but [end] is excluded. + *    callback(): expected to processes elements [start] through [end] inclusive. + */ +bench_value benchmark_parallel_for(gint n_threads, guint start, guint end, +                               gpointer callback, gpointer callback_data); + +bench_value benchmark_parallel(gint n_threads, gpointer callback, gpointer callback_data); + +bench_value benchmark_crunch_for(float seconds, gint n_threads,                                 gpointer callback, gpointer callback_data); -extern gdouble bench_results[BENCHMARK_N_ENTRIES]; +extern bench_value bench_results[BENCHMARK_N_ENTRIES]; -#endif /* __BENCHMARK_H__ */
\ No newline at end of file +#endif /* __BENCHMARK_H__ */  | 
