PhoenixMicroBenchmark  1.0.1
Toolset for function micro-benchmarking
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
19typedef std::vector<double> VecEllapsedTime;
21typedef std::map<double, size_t> MapOrderedTime;
22
23typedef void(&EvaluateTimeFct)(size_t);
24typedef double(&EvaluateTimeFct2d)(size_t, size_t);
25
26void micro_benchmarkVecToMap(MapOrderedTime & mapOrderTime, const VecEllapsedTime & vecTime);
27
28void micro_benchmarkComputeTime(double & ellapsedTimeNs, double & ellapsedTimeErrorNs, const MapOrderedTime & mapOrderTime, size_t nbValueToBeUsed);
29
30int micro_benchmarkParseArg(int argc, char** argv, EvaluateTimeFct evalFunc);
31int micro_benchmarkParseArg2d(int argc, char** argv, EvaluateTimeFct2d evalFunc);
32
33#endif
void micro_benchmarkVecToMap(MapOrderedTime &mapOrderTime, const VecEllapsedTime &vecTime)
Fill the map of ordered time with the vector.
int micro_benchmarkParseArg(int argc, char **argv, EvaluateTimeFct evalFunc)
Call the evalFunc by respect to the arguments given to the program.
int micro_benchmarkParseArg2d(int argc, char **argv, EvaluateTimeFct2d evalFunc)
Call the evalFunc by respect to the arguments given to the program.
std::map< double, size_t > MapOrderedTime
Map of the ordered ellapsed time.
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.
double(& EvaluateTimeFct2d)(size_t, size_t)
std::vector< double > VecEllapsedTime
Vector of ellapsed time measurement.
void(& EvaluateTimeFct)(size_t)