31#ifndef ETL_DEBUG_COUNT_INCLUDED
32#define ETL_DEBUG_COUNT_INCLUDED
43#if defined(ETL_DEBUG_COUNT)
45 #define ETL_DECLARE_DEBUG_COUNT etl::debug_count etl_debug_count
46 #define ETL_SET_DEBUG_COUNT(n) etl_debug_count.set(n)
47 #define ETL_GET_DEBUG_COUNT etl_debug_count.get()
48 #define ETL_INCREMENT_DEBUG_COUNT ++etl_debug_count
49 #define ETL_DECREMENT_DEBUG_COUNT --etl_debug_count
50 #define ETL_ADD_DEBUG_COUNT(n) etl_debug_count += (n)
51 #define ETL_SUBTRACT_DEBUG_COUNT(n) etl_debug_count -= (n)
52 #define ETL_RESET_DEBUG_COUNT etl_debug_count.clear()
53 #define ETL_OBJECT_RESET_DEBUG_COUNT(object) object.etl_debug_count.clear()
54 #define ETL_OBJECT_GET_DEBUG_COUNT(object) object.etl_debug_count.get()
78 debug_count& operator++()
84 debug_count& operator--()
92 debug_count& operator+=(T n)
99 debug_count& operator-=(T n)
105 debug_count& operator=(
const debug_count& other)
107 count.store(other.count.load());
113 void swap(debug_count& other) ETL_NOEXCEPT
115 int32_t temp = other.count.load();
116 other.count.store(count.load());
120 void swap(debug_count& other) ETL_NOEXCEPT
122 swap(count, other.count);
126 operator int32_t()
const
133 return int32_t(count);
161 #define ETL_DECLARE_DEBUG_COUNT etl::debug_count etl_debug_count
162 #define ETL_SET_DEBUG_COUNT(n) ETL_DO_NOTHING
163 #define ETL_GET_DEBUG_COUNT ETL_DO_NOTHING
164 #define ETL_INCREMENT_DEBUG_COUNT ETL_DO_NOTHING
165 #define ETL_DECREMENT_DEBUG_COUNT ETL_DO_NOTHING
166 #define ETL_ADD_DEBUG_COUNT(n) ETL_DO_NOTHING
167 #define ETL_SUBTRACT_DEBUG_COUNT(n) ETL_DO_NOTHING
168 #define ETL_RESET_DEBUG_COUNT ETL_DO_NOTHING
169 #define ETL_OBJECT_RESET_DEBUG_COUNT(object) ETL_DO_NOTHING
170 #define ETL_OBJECT_GET_DEBUG_COUNT(object) ETL_DO_NOTHING
Definition debug_count.h:175
bitset_ext
Definition absolute.h:38
T & get(array< T, MAXN > &a)
Definition array.h:719
void swap(etl::array< T, SIZE > &lhs, etl::array< T, SIZE > &rhs)
Template deduction guides.
Definition array.h:630
pair holds two objects of arbitrary type
Definition utility.h:164