CppBenchmark 1.0.5.0
C++ Benchmark Library
Loading...
Searching...
No Matches
context.cpp
Go to the documentation of this file.
1
9#include "benchmark/context.h"
10
11namespace CppBenchmark {
12
13std::string Context::description() const
14{
15 if ((_x < 0) && (_y < 0) && (_z < 0))
16 return "";
17 else if ((_y < 0) && (_z < 0))
18 return "(" + std::to_string(_x) + ")";
19 else if ((_z < 0))
20 return "(" + std::to_string(_x) + "," + std::to_string(_y) + ")";
21 else
22 return "(" + std::to_string(_x) + "," + std::to_string(_y) + "," + std::to_string(_z) + ")";
23}
24
25} // namespace CppBenchmark
virtual std::string description() const
Get description of the current benchmark running context.
Definition context.cpp:13
int _x
Benchmark first parameter. Valid only if not negative!
Definition context.h:74
int _z
Benchmark third parameter. Valid only if not negative!
Definition context.h:78
int _y
Benchmark second parameter. Valid only if not negative!
Definition context.h:76
Benchmark running context definition.
C++ Benchmark project definitions.
Definition barrier.h:15