GEGELATI

Loading...
Searching...
No Matches
tpgVertexInstrumentation.h
1
36#ifndef TPG_VERTEX_INSTRUMENTATION_H
37#define TPG_VERTEX_INSTRUMENTATION_H
38
39#include <atomic>
40#include <cstddef>
41
42 namespace TPG {
47 class TPGVertexInstrumentation
48 {
49 public:
53 uint64_t getNbVisits() const;
54
59 void incrementNbVisits() const;
60
64 void reset() const;
65
66 protected:
72 TPGVertexInstrumentation() : nbVisits{0}
73 {
74 }
75
79 mutable std::atomic_uint64_t nbVisits;
80 };
81} // namespace TPG
82
83#endif // !TPG_VERTEX_INSTRUMENTATION_H
TPG::TPGVertexInstrumentation
Instrumentation code for TPGVertex class for instrumented execution.
Definition tpgVertexInstrumentation.h:48
TPG::TPGVertexInstrumentation::getNbVisits
uint64_t getNbVisits() const
Get the number of time a TPGVertexInstrumentation was visited.
Definition tpgVertexInstrumentation.cpp:38
TPG::TPGVertexInstrumentation::TPGVertexInstrumentation
TPGVertexInstrumentation()
Protected default constructor to forbid instanciation.
Definition tpgVertexInstrumentation.h:72
TPG::TPGVertexInstrumentation::reset
void reset() const
Reset the instrumentation attributes.
Definition tpgVertexInstrumentation.cpp:48
TPG::TPGVertexInstrumentation::nbVisits
std::atomic_uint64_t nbVisits
Definition tpgVertexInstrumentation.h:79
TPG::TPGVertexInstrumentation::incrementNbVisits
void incrementNbVisits() const
Add one to the number of visits for this TPGVertexInstrumented.
Definition tpgVertexInstrumentation.cpp:43
TPG
Definition executionStats.h:44