23 template <
typename ValueType, uint32_t MinValue, uint32_t MaxValue,
bool MinInclusive =
false,
24 bool MaxInclusive =
true >
27 typedef ValueType value_type;
33 operator const value_type &()
const {
return value(); }
39 void operator=(
const ValueType &_value)
41 assert((MinInclusive ? _value >= (ValueType)MinValue : _value > (ValueType)MinValue) &&
42 (maxInclusive ? _value <= (ValueType)MaxValue : _value < (ValueType)MaxValue));
50 operator const ValueType() {
return value; }
63 typedef uint8_t thread_num_t;
64 typedef uint64_t thread_mask_int_t;
109 value = (value + rhs) % pool->num_threads;
115 value = (value + rhs) % pool->num_threads;
138 value = (value + pool->num_threads - rhs) % pool->num_threads;
149 value = (value + pool->num_threads - rhs) % pool->num_threads;
182 operator const ValueType() {
return value; }
188 thread_mask_int_t
get_mask() {
return 1ull << value; }
195 bool is_set(thread_mask_int_t _other_mask)
197 thread_mask_int_t this_mask = get_mask();
198 return ((this_mask & _other_mask) == this_mask);
212 template <
typename ValueType,
class TMemInterface >
221 template <
typename ValueType,
class TMemInterface >
229 template <
typename ValueType,
class TMemInterface >
236 template <
typename ValueType,
class TMemInterface >
245 template <
typename ValueType,
class TMemInterface >
253 template <
typename ValueType,
class TMemInterface >
base_thread_index< ValueType, TMemInterface > operator+(base_thread_index< ValueType, TMemInterface > lhs, const base_thread_index< ValueType, TMemInterface > &rhs)
Definition: types.h:214
base_thread_index & operator-=(const base_thread_index &rhs)
Operator-=s the specified RHS.
Definition: types.h:136
Class stl_allocator.
Definition: allocator.h:16
thread_mask_int_t get_mask()
Gets the mask.
Definition: types.h:188
friend base_thread_index operator+(base_thread_index lhs, const base_thread_index &rhs)
Operator+s the specified LHS.
Definition: types.h:125
Class constrained.
Definition: types.h:25
bool is_set(thread_mask_int_t _other_mask)
Determines whether the specified other mask is set.
Definition: types.h:195
base_thread_index & operator-=(int32_t rhs)
Operator-=s the specified RHS.
Definition: types.h:147
base_thread_index(const base_thread_index &other)
Initializes a new instance of the base_thread_index class.
Definition: types.h:157
base_thread_index(thread_pool *_pool, ValueType _value)
Initializes a new instance of the base_thread_index class.
Definition: types.h:76
base_thread_index & operator--()
Operator–s this instance.
Definition: types.h:96
base_thread_index & operator=(const base_thread_index &other)
Operator=s the specified other.
Definition: types.h:168
Class base_thread_pool.
Definition: task.h:36
base_thread_index & operator+=(const base_thread_index &rhs)
Operator+=s the specified RHS.
Definition: types.h:107
base_thread_index & operator++()
Operator++s this instance.
Definition: types.h:86