![]() |
Blaze 3.9
|
Classes | |
struct | blaze::timing::CpuPolicy |
Timing policy for the measurement of the CPU time. More... | |
class | blaze::timing::Timer< TP > |
Progress timer for time and performance measurements. More... | |
struct | blaze::timing::WcPolicy |
Timing policy for the measurement of the wall clock time. More... | |
Typedefs | |
using | blaze::timing::CpuTimer = Timer< CpuPolicy > |
Progress timer for CPU time measurements. More... | |
using | blaze::timing::WcTimer = Timer< WcPolicy > |
Progress timer for wall clock time measurements. More... | |
The timing submodule offers the necessary functionality for timing and benchmarking purposes. The central element of the timing module is the Timer class. Depending on a chosen timing policy, this class offers the possibility to measure both single times and time series. In order to make time measurement as easy as possible, the Blaze library offers the two classes WcTimer and CpuTimer (both using the Timer class) to measure both wall clock and CPU time. The following example gives an impression on how time measurement for a single time works with the the Blaze library. Note that in this example the WcTimer could be easily replaced with the CpuTimer if instead of the wall clock time the CPU time was to be measured.
As already mentioned, it is also possible to start several time measurements with a single timer to evaluate for instance the minimal, the maximal or the average time of a specific task. The next example demonstrates a possible setup for such a series of time measurements:
using blaze::timing::CpuTimer = typedef Timer<CpuPolicy> |
using blaze::timing::WcTimer = typedef Timer<WcPolicy> |
Progress timer for wall clock time measurements.
The WcTimer combines the Timer class template with the WcPolicy timing policy. It measures the amount of "wall clock" time elapsing for the processing of a programm or code fragment. In contrast to the measurement of CPU time, the wall clock time also contains waiting times such as input/output operations.