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);
148 etl::atomic_int32_t count;
155inline void swap(etl::debug_count& lhs, etl::debug_count& rhs)
161 #define ETL_DECLARE_DEBUG_COUNT
162 #define ETL_SET_DEBUG_COUNT(n)
163 #define ETL_GET_DEBUG_COUNT
164 #define ETL_INCREMENT_DEBUG_COUNT
165 #define ETL_DECREMENT_DEBUG_COUNT
166 #define ETL_ADD_DEBUG_COUNT(n)
167 #define ETL_SUBTRACT_DEBUG_COUNT(n)
168 #define ETL_RESET_DEBUG_COUNT
169 #define ETL_OBJECT_RESET_DEBUG_COUNT(object)
170 #define ETL_OBJECT_GET_DEBUG_COUNT(object)
bitset_ext
Definition absolute.h:38
T & get(array< T, MAXN > &a)
Definition array.h:1174
void swap(etl::array< T, SIZE > &lhs, etl::array< T, SIZE > &rhs)
Template deduction guides.
Definition array.h:1085