Lines Matching refs:index
156 std::size_t index = tls.my_arena_index; in occupy_free_slot_in_range() local
157 if ( index < lower || index >= upper ) index = tls.my_random.get() % (upper - lower) + lower; in occupy_free_slot_in_range()
158 __TBB_ASSERT( index >= lower && index < upper, nullptr); in occupy_free_slot_in_range()
160 for ( std::size_t i = index; i < upper; ++i ) in occupy_free_slot_in_range()
162 for ( std::size_t i = lower; i < index; ++i ) in occupy_free_slot_in_range()
170 …std::size_t index = as_worker ? out_of_arena : occupy_free_slot_in_range( tls, 0, my_num_reserved… in occupy_free_slot() local
171 if ( index == out_of_arena ) { in occupy_free_slot()
173 index = occupy_free_slot_in_range(tls, my_num_reserved_slots, my_num_slots ); in occupy_free_slot()
175 if ( index == out_of_arena ) in occupy_free_slot()
179 atomic_update( my_limit, (unsigned)(index + 1), std::less<unsigned>() ); in occupy_free_slot()
180 return index; in occupy_free_slot()
193 std::size_t index = occupy_free_slot</*as_worker*/true>(tls); in process() local
194 if (index == out_of_arena) { in process()
201 __TBB_ASSERT( index >= my_num_reserved_slots, "Workers cannot occupy reserved slots" ); in process()
202 tls.attach_arena(*this, index); in process()