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()
80 debug_count& operator++()
86 debug_count& operator--()
94 debug_count& operator+=(T n)
100 template <
typename T>
101 debug_count& operator-=(T n)
107 debug_count& operator=(
const debug_count& other)
109 count.store(other.count.load());
115 void swap(debug_count& other) ETL_NOEXCEPT
117 int32_t temp = other.count.load();
118 other.count.store(count.load());
122 void swap(debug_count& other) ETL_NOEXCEPT
124 swap(count, other.count);
128 operator int32_t()
const
135 return int32_t(count);
150 etl::atomic_int32_t count;
158inline void swap(etl::debug_count& lhs, etl::debug_count& rhs)
164 #define ETL_DECLARE_DEBUG_COUNT
165 #define ETL_SET_DEBUG_COUNT(n)
166 #define ETL_GET_DEBUG_COUNT
167 #define ETL_INCREMENT_DEBUG_COUNT
168 #define ETL_DECREMENT_DEBUG_COUNT
169 #define ETL_ADD_DEBUG_COUNT(n)
170 #define ETL_SUBTRACT_DEBUG_COUNT(n)
171 #define ETL_RESET_DEBUG_COUNT
172 #define ETL_OBJECT_RESET_DEBUG_COUNT(object)
173 #define ETL_OBJECT_GET_DEBUG_COUNT(object)
bitset_ext
Definition: absolute.h:38
T & get(array< T, MAXN > &a)
Definition: array.h:710
void swap(etl::array< T, SIZE > &lhs, etl::array< T, SIZE > &rhs)
Template deduction guides.
Definition: array.h:621