CppBenchmark 1.0.5.0
C++ Benchmark Library
Loading...
Searching...
No Matches
context_pc.cpp
Go to the documentation of this file.
1
10
11namespace CppBenchmark {
12
13std::string ContextPC::description() const
14{
15 if ((_x < 0) && (_y < 0) && (_z < 0))
16 return "(producers:" + std::to_string(_producers) + ",consumers:" + std::to_string(_consumers) + ")";
17 else if ((_y < 0) && (_z < 0))
18 return "(producers:" + std::to_string(_producers) + ",consumers:" + std::to_string(_consumers) + "," + std::to_string(_x) + ")";
19 else if ((_z < 0))
20 return "(producers:" + std::to_string(_producers) + ",consumers:" + std::to_string(_consumers) + "," + std::to_string(_x) + "," + std::to_string(_y) + ")";
21 else
22 return "(producers:" + std::to_string(_producers) + ",consumers:" + std::to_string(_consumers) + "," + std::to_string(_x) + "," + std::to_string(_y) + "," + std::to_string(_z) + ")";
23}
24
25} // namespace CppBenchmark
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
int _producers
Benchmark producers count.
Definition context_pc.h:58
std::string description() const override
Get description of the current benchmark running context.
int _consumers
Benchmark consumers count.
Definition context_pc.h:60
Benchmark producer/consumer running context definition.
C++ Benchmark project definitions.
Definition barrier.h:15