Lines Matching refs:queue
88 const CQ queue; in TestEmptyQueue() local
89 CHECK(queue.size() == 0); in TestEmptyQueue()
90 CHECK(queue.capacity()> 0); in TestEmptyQueue()
91 CHECK(size_t(queue.capacity())>= std::size_t(-1)/(sizeof(void*)+sizeof(T))); in TestEmptyQueue()
109 CQ queue; in TestFullQueue() local
110 queue.set_capacity(n); in TestFullQueue()
114 bool result = queue.try_push( f); in TestFullQueue()
120 bool result = queue.try_pop(f); in TestFullQueue()
141 CQ queue; in TestClear() local
143 queue.set_capacity(q_capacity); in TestClear()
148 queue.push(f); in TestClear()
151 CHECK(queue.size() == n); in TestClear()
153 queue.clear(); in TestClear()
154 CHECK(queue.size()==0); in TestClear()
158 queue.push( f); in TestClear()
161 CHECK(queue.size() == n); in TestClear()
162 queue.clear(); in TestClear()
163 CHECK(queue.size() == 0); in TestClear()
168 queue.push(f); in TestClear()
171 CHECK(queue.size()==n); in TestClear()
233 CQ queue; in TestIterator() local
234 const CQ& const_queue = queue; in TestIterator()
236 TestIteratorAux( queue.unsafe_begin() , queue.unsafe_end() , j); in TestIterator()
237 TestIteratorAux( queue.unsafe_cbegin() , queue.unsafe_cend() , j); in TestIterator()
239 TestIteratorAux( const_queue.unsafe_begin(), queue.unsafe_end() , j); in TestIterator()
240 TestIteratorAux( queue.unsafe_begin() , const_queue.unsafe_end(), j); in TestIterator()
243 queue.push(f); in TestIterator()
246 TestIteratorAssignment<typename CQ::const_iterator>( queue.unsafe_begin()); in TestIterator()
247 TestIteratorAssignment<typename CQ::iterator>( queue.unsafe_begin()); in TestIterator()
592 oneapi::tbb::concurrent_bounded_queue<T>& queue; member
594 …TestNegativeQueueBody( oneapi::tbb::concurrent_bounded_queue<T>& q, std::size_t n ) : queue(q), nt… in TestNegativeQueueBody()
599 while (int(queue.size())> -number_of_pops) { in operator ()()
604 CHECK(queue.size() == std::size_t(i - number_of_pops)); in operator ()()
605 CHECK((queue.empty() == (queue.size() <= 0))); in operator ()()
608 queue.push(T()); in operator ()()
613 queue.pop(item); in operator ()()
621 oneapi::tbb::concurrent_bounded_queue<T> queue; in TestNegativeQueue() local
622 utils::NativeParallelFor( nthread, TestNegativeQueueBody<T>(queue,nthread)); in TestNegativeQueue()
640 CQ* queue; member
656 prepopped = queue->try_pop(f); in operator ()()
662 push(*queue, g, j); in operator ()()
664 while(!(queue)->try_pop(f)) utils::yield(); in operator ()()
696 CQ queue; in TestPushPop() local
697 queue.set_capacity(capacity); in TestPushPop()
698 body.queue = &queue; in TestPushPop()
703 push(queue, f, i); in TestPushPop()
704 CHECK_FAST(queue.size() == i + 1); in TestPushPop()
705 CHECK_FAST(!queue.empty()); in TestPushPop()
717 CHECK_FAST(!queue.empty()); in TestPushPop()
719 bool result = queue.try_pop(f); in TestPushPop()
721 CHECK_FAST(int(queue.size()) == i); in TestPushPop()
724 REQUIRE_MESSAGE(queue.empty(), "The queue should be empty"); in TestPushPop()
725 REQUIRE_MESSAGE(queue.size() == 0, "The queue should have zero size"); in TestPushPop()
1109 static bool push( CQ& queue, VType&& val ) { in push()
1110 queue.push( std::forward<VType>( val ) ); in push()
1118 static bool push( CQ& queue, VType&& val ) { in push()
1119 return queue.try_push( std::forward<VType>( val ) ); in push()
1128 static bool pop( CQ& queue, VType&& val ) { in pop()
1129 if( queue.empty() ) return false; in pop()
1130 queue.pop( std::forward<VType>( val ) ); in pop()
1138 static bool pop( CQ& queue, VType&& val ) { in pop()
1139 return queue.try_pop( std::forward<VType>( val ) ); in pop()
1293 void TestQueueOperabilityAfterDataMove( CQ& queue ) { in TestQueueOperabilityAfterDataMove() argument
1298 FillTest<push_op>(queue, v); in TestQueueOperabilityAfterDataMove()
1299 EmptyTest<try_pop_op>(queue, v); in TestQueueOperabilityAfterDataMove()
1300 bounded_queue_specific_test(queue, v); in TestQueueOperabilityAfterDataMove()
1378 … static void emplace( CQ& queue, Args&&... val ) { queue.emplace( std::forward<Args>( val )... ); } in emplace()
1384 static void emplace( CQ& queue, Args&&... val ) { in emplace()
1385 bool result = queue.try_emplace( std::forward<Args>( val )... ); in emplace()