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 enum { etl_debug_count_suppressed__ = 0 }
162#define ETL_SET_DEBUG_COUNT(n) ((void)0)
163#define ETL_GET_DEBUG_COUNT 0
164#define ETL_INCREMENT_DEBUG_COUNT ((void)0)
165#define ETL_DECREMENT_DEBUG_COUNT ((void)0)
166#define ETL_ADD_DEBUG_COUNT(n) ((void)0)
167#define ETL_SUBTRACT_DEBUG_COUNT(n) ((void)0)
168#define ETL_RESET_DEBUG_COUNT ((void)0)
169#define ETL_OBJECT_RESET_DEBUG_COUNT(object) ((void)0)
170#define ETL_OBJECT_GET_DEBUG_COUNT(object) 0
void swap(etl::array_view< T > &lhs, etl::array_view< T > &rhs) ETL_NOEXCEPT
Swaps the values.
Definition array_view.h:650
bitset_ext
Definition absolute.h:39
T & get(array< T, Size > &a)
Definition array.h:1216