PhoenixMicroBenchmark  1.0.1
Toolset for function micro-benchmarking
Loading...
Searching...
No Matches
micro_benchmark_ns.h
Go to the documentation of this file.
1/***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5****************************************/
6
7#ifndef __MICRO_BENCHMARK_NS_H__
8#define __MICRO_BENCHMARK_NS_H__
9
11
12typedef std::chrono::steady_clock HiPeClock;
13typedef std::chrono::nanoseconds NanoSecs;
14// typedef std::chrono::duration<double, std::nano> NanoSecs;
15
16typedef std::chrono::time_point<std::chrono::steady_clock> HiPeTime;
17
19
20template<typename _Callable, typename... _Args>
21void micro_benchmarkNs(double & ellapsedTimeNs, double & ellapsedTimeErrorNs, size_t nbTestPerf, size_t nbCallPerTest,
22 _Callable&& __f, _Args&&... __args);
23
24template<typename _Callable, typename... _Args>
25void micro_benchmarkAutoNs(double & ellapsedTimeNs, double & ellapsedTimeErrorNs, _Callable&& __f, _Args&&... __args);
26
27
28template<typename _Callable, typename... _Args>
29void micro_benchmarkNs(double & ellapsedTimeNs, double & ellapsedTimeErrorNs,
30 double & timePerElement, double & timeErrorPerElement, size_t nbTestPerf, size_t nbCallPerTest, size_t nbElement,
31 _Callable&& __f, _Args&&... __args);
32
33template<typename _Callable, typename... _Args>
34void micro_benchmarkAutoNs(double & ellapsedTimeNs, double & ellapsedTimeErrorNs,
35 double & timePerElement, double & timeErrorPerElement, size_t nbElement,
36 _Callable&& __f, _Args&&... __args);
37
38
39template<typename _Callable, typename... _Args>
40void micro_benchmarkNsPrint(const std::string & testName, size_t nbTestPerf, size_t nbCallPerTest, size_t nbElement, _Callable&& __f, _Args&&... __args);
41
42template<typename _Callable, typename... _Args>
43void micro_benchmarkAutoNsPrint(const std::string & testName, size_t nbElement, _Callable&& __f, _Args&&... __args);
44
46
47
48#endif
49
void micro_benchmarkNsPrint(const std::string &testName, size_t nbTestPerf, size_t nbCallPerTest, size_t nbElement, _Callable &&__f, _Args &&... __args)
Do the micro benchmarking of a given function and gives performance results in ns and print the resul...
void micro_benchmarkAutoNs(double &ellapsedTimeNs, double &ellapsedTimeErrorNs, _Callable &&__f, _Args &&... __args)
Do the micro benchmarking of a given function and gives performance results in ns.
std::chrono::nanoseconds NanoSecs
HiPeTime phoenix_getTime()
Get the current time.
void micro_benchmarkNs(double &ellapsedTimeNs, double &ellapsedTimeErrorNs, size_t nbTestPerf, size_t nbCallPerTest, _Callable &&__f, _Args &&... __args)
Do the micro benchmarking of a given function and gives performance results in ns.
std::chrono::time_point< std::chrono::steady_clock > HiPeTime
std::chrono::steady_clock HiPeClock
void micro_benchmarkAutoNsPrint(const std::string &testName, size_t nbElement, _Callable &&__f, _Args &&... __args)
Do the micro benchmarking of a given function and gives performance results in ns and print the resul...