|
vocabtree
0.0.1
|
This uses the cycle counter of the processor. More...
Typedefs | |
| typedef unsigned long long | SysClock |
Functions | |
| SysClock | currentTicks () |
| Return the current CPU time, in terms of clock ticks. More... | |
| const char * | tickUnits () |
| double | secondsPerTick () |
| Return the conversion from ticks to seconds. More... | |
| double | msPerTick () |
| Return the conversion from ticks to milliseconds. More... | |
| double | currentSeconds () |
| Return the current CPU time, in terms of seconds. More... | |
| double | ticksPerSecond () |
| Return the conversion from seconds to ticks. More... | |
This uses the cycle counter of the processor.
Different processors in the system will have different values for this. If you process moves across processors, then the delta time you measure will likely be incorrect. This is mostly for fine grained measurements where the process is likely to be on the same processor. For more global things you should use the Time interface.
Also note that if you processors' speeds change (i.e. processors scaling) or if you are in a heterogenous environment, you will likely get spurious results.
| typedef unsigned long long CycleTimer::SysClock |
Definition at line 37 of file cycletimer.hpp.
|
inline |
Return the current CPU time, in terms of seconds.
This is slower than currentTicks(). Time zero is at some arbitrary point in the past.
Definition at line 157 of file cycletimer.hpp.
References currentTicks(), and secondsPerTick().
Referenced by bench_oxford(), and benchmark_dataset().
|
inline |
Return the current CPU time, in terms of clock ticks.
Time zero is at some arbitrary point in the past.
Definition at line 41 of file cycletimer.hpp.
Referenced by currentSeconds().
|
inline |
Return the conversion from ticks to milliseconds.
Definition at line 150 of file cycletimer.hpp.
References secondsPerTick().
|
inline |
Return the conversion from ticks to seconds.
Definition at line 75 of file cycletimer.hpp.
Referenced by currentSeconds(), msPerTick(), and ticksPerSecond().
|
inline |
Return the conversion from seconds to ticks.
Definition at line 162 of file cycletimer.hpp.
References secondsPerTick().
|
inline |
Definition at line 64 of file cycletimer.hpp.