Lines Matching refs:q

42 void spin_try_get( tbb::flow::priority_queue_node<T> &q, T &value ) {  in spin_try_get()  argument
43 while ( q.try_get(value) != true ) ; in spin_try_get()
57 parallel_puts( tbb::flow::priority_queue_node<T> &q ) : my_q(q) {} in parallel_puts()
69 parallel_gets( tbb::flow::priority_queue_node<T> &q) : my_q(q) {} in parallel_gets()
84 parallel_put_get( tbb::flow::priority_queue_node<T> &q ) : my_q(q) {} in parallel_put_get()
111 tbb::flow::priority_queue_node<T> q(g); in test_reservation() local
117 q.try_put(T(1)); in test_reservation()
118 q.try_put(T(2)); in test_reservation()
119 q.try_put(T(3)); in test_reservation()
123 CHECK_MESSAGE( q.try_reserve(v) == true, "" ); in test_reservation()
125 CHECK_MESSAGE( q.try_release() == true, "" ); in test_reservation()
128 CHECK_MESSAGE( q.try_reserve(v) == true, "" ); in test_reservation()
130 CHECK_MESSAGE( q.try_consume() == true, "" ); in test_reservation()
134 CHECK_MESSAGE( q.try_get(v) == true, "" ); in test_reservation()
139 CHECK_MESSAGE( q.try_reserve(v) == true, "" ); in test_reservation()
141 CHECK_MESSAGE( q.try_reserve(w) == false, "" ); in test_reservation()
143 CHECK_MESSAGE( q.try_get(w) == false, "" ); in test_reservation()
145 CHECK_MESSAGE( q.try_release() == true, "" ); in test_reservation()
148 CHECK_MESSAGE( q.try_reserve(v) == true, "" ); in test_reservation()
150 CHECK_MESSAGE( q.try_consume() == true, "" ); in test_reservation()
153 CHECK_MESSAGE( q.try_get(v) == false, "" ); in test_reservation()
169 tbb::flow::priority_queue_node<T> q(g); in test_parallel() local
175 NativeParallelFor( num_threads, parallel_puts<T>(q) ); in test_parallel()
177 spin_try_get( q, j ); in test_parallel()
182 CHECK_MESSAGE( q.try_get( j ) == false, "" ); in test_parallel()
185 NativeParallelFor( num_threads, parallel_puts<T>(q) ); in test_parallel()
187 NativeParallelFor( num_threads, parallel_gets<T>(q) ); in test_parallel()
190 CHECK_MESSAGE( q.try_get( j ) == false, "" ); in test_parallel()
193 NativeParallelFor( num_threads, parallel_put_get<T>(q) ); in test_parallel()
196 CHECK_MESSAGE( q.try_get( j ) == false, "" ); in test_parallel()
199 tbb::flow::make_edge( q, q2 ); in test_parallel()
201 NativeParallelFor( num_threads, parallel_puts<T>(q) ); in test_parallel()
206 CHECK_MESSAGE( q.try_get( j ) == false, "" ); in test_parallel()
214 CHECK_MESSAGE( remove_successor(q, q2) == true, "" ); in test_parallel()
215 NativeParallelFor( num_threads, parallel_puts<T>(q) ); in test_parallel()
216 tbb::flow::priority_queue_node<T> q_copy(q); in test_parallel()
220 CHECK_MESSAGE( register_successor(q, q_copy) == true, "" ); in test_parallel()
227 CHECK_MESSAGE( q.try_get( j ) == false, "" ); in test_parallel()
249 tbb::flow::priority_queue_node<T> q(g); in test_serial() local
257 CHECK_MESSAGE( register_predecessor(q, q2) == false, "" ); in test_serial()
258 CHECK_MESSAGE( remove_predecessor(q, q2) == false, "" ); in test_serial()
259 CHECK_MESSAGE( q.try_get( j ) == false, "" ); in test_serial()
267 CHECK_MESSAGE( q.try_put( T(i) ), "" ); in test_serial()
270 spin_try_get( q, j ); in test_serial()
275 CHECK_MESSAGE( q.try_get( j ) == false, "" ); in test_serial()
278 tbb::flow::make_edge( q, q2 ); in test_serial()
281 CHECK_MESSAGE( q.try_put( T(i) ), "" ); in test_serial()
290 CHECK_MESSAGE( q.try_get( j ) == false, "" ); in test_serial()
295 tbb::flow::remove_edge( q, q2 ); in test_serial()
296 CHECK_MESSAGE( q.try_put( 1 ) == true, "" ); in test_serial()
301 CHECK_MESSAGE( q.try_get( j ) == true, "" ); in test_serial()
305 tbb::flow::make_edge( q, q2 ); in test_serial()
309 CHECK_MESSAGE( q.try_put( T(i) ), "" ); in test_serial()
318 CHECK_MESSAGE( q.try_get( j ) == false, "" ); in test_serial()
325 tbb::flow::remove_edge( q, q2 ); in test_serial()
326 CHECK_MESSAGE( q.try_put( 1 ) == true, "" ); in test_serial()
334 CHECK_MESSAGE( q.try_get( j ) == true, "" ); in test_serial()