|
tesseract++ 0.0.1
N-dimensional tensor library for embedded systems
|
Hardware cycle counter for x86/x86_64. More...
#include <cycle_counter_x86.h>
Public Member Functions | |
| FORCE_INLINE void | start () noexcept |
| Record the starting cycle count (serialized). | |
| FORCE_INLINE void | stop () noexcept |
| Record the ending cycle count and accumulate. | |
| void | reset () noexcept |
| Reset accumulated cycles and run count to zero. | |
| double | avg_cycles () const |
| Return the average cycles per start/stop pair. | |
Public Attributes | |
| unsigned long long | start_cycles |
| unsigned long long | total_cycles = 0 |
| unsigned long long | runs = 0 |
Hardware cycle counter for x86/x86_64.
Uses __rdtsc() for timestamp reads, with _mm_lfence() to serialize instruction execution and prevent out-of-order measurement artifacts.
|
inline |
Return the average cycles per start/stop pair.
|
inlinenoexcept |
Reset accumulated cycles and run count to zero.
|
inlinenoexcept |
Record the starting cycle count (serialized).
|
inlinenoexcept |
Record the ending cycle count and accumulate.
| unsigned long long detail::CycleCounterX86::runs = 0 |
| unsigned long long detail::CycleCounterX86::start_cycles |
| unsigned long long detail::CycleCounterX86::total_cycles = 0 |