PhoenixMicroBenchmark
1.3.0
Toolset for function micro-benchmarking
Toggle main menu visibility
Loading...
Searching...
No Matches
micro_benchmark_common.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_COMMON_H__
8
#define __MICRO_BENCHMARK_COMMON_H__
9
10
#include <chrono>
11
#include <string>
12
#include <vector>
13
#include <map>
14
#include <iostream>
15
16
#include "
pin_thread_to_core.h
"
17
19
typedef
std::vector<double>
VecEllapsedTime
;
21
typedef
std::map<double, size_t>
MapOrderedTime
;
22
23
typedef
void(&
EvaluateTimeFct
)(size_t);
24
typedef
double(&
EvaluateTimeFct2d
)(size_t, size_t);
25
26
void
micro_benchmarkVecToMap
(
MapOrderedTime
& mapOrderTime,
const
VecEllapsedTime
& vecTime);
27
28
void
micro_benchmarkComputeTime
(
double
& ellapsedTimeNs,
double
& ellapsedTimeErrorNs,
const
MapOrderedTime
& mapOrderTime,
size_t
nbValueToBeUsed);
29
30
int
micro_benchmarkParseArg
(
int
argc,
char
** argv,
EvaluateTimeFct
evalFunc);
31
int
micro_benchmarkParseArg2d
(
int
argc,
char
** argv,
EvaluateTimeFct2d
evalFunc);
32
33
#endif
micro_benchmarkVecToMap
void micro_benchmarkVecToMap(MapOrderedTime &mapOrderTime, const VecEllapsedTime &vecTime)
Fill the map of ordered time with the vector.
Definition
micro_benchmark_common.cpp:15
micro_benchmarkParseArg
int micro_benchmarkParseArg(int argc, char **argv, EvaluateTimeFct evalFunc)
Call the evalFunc by respect to the arguments given to the program.
Definition
micro_benchmark_common.cpp:92
micro_benchmarkParseArg2d
int micro_benchmarkParseArg2d(int argc, char **argv, EvaluateTimeFct2d evalFunc)
Call the evalFunc by respect to the arguments given to the program.
Definition
micro_benchmark_common.cpp:124
MapOrderedTime
std::map< double, size_t > MapOrderedTime
Map of the ordered ellapsed time.
Definition
micro_benchmark_common.h:21
micro_benchmarkComputeTime
void micro_benchmarkComputeTime(double &ellapsedTimeNs, double &ellapsedTimeErrorNs, const MapOrderedTime &mapOrderTime, size_t nbValueToBeUsed)
Compute the total computing time and associated error with the given data.
Definition
micro_benchmark_common.cpp:32
EvaluateTimeFct2d
double(& EvaluateTimeFct2d)(size_t, size_t)
Definition
micro_benchmark_common.h:24
VecEllapsedTime
std::vector< double > VecEllapsedTime
Vector of ellapsed time measurement.
Definition
micro_benchmark_common.h:19
EvaluateTimeFct
void(& EvaluateTimeFct)(size_t)
Definition
micro_benchmark_common.h:23
pin_thread_to_core.h
src
micro_benchmark_common.h
Generated by
1.17.0