Only runs standard stack test cases
[libcds.git] / test / stress / queue / queue_type.h
1 /*
2     This file is a part of libcds - Concurrent Data Structures library
3
4     (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
5
6     Source code repo: http://github.com/khizmax/libcds/
7     Download: http://sourceforge.net/projects/libcds/files/
8
9     Redistribution and use in source and binary forms, with or without
10     modification, are permitted provided that the following conditions are met:
11
12     * Redistributions of source code must retain the above copyright notice, this
13       list of conditions and the following disclaimer.
14
15     * Redistributions in binary form must reproduce the above copyright notice,
16       this list of conditions and the following disclaimer in the documentation
17       and/or other materials provided with the distribution.
18
19     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22     DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23     FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24     DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25     SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26     CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27     OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef CDSSTRESS_QUEUE_TYPES_H
32 #define CDSSTRESS_QUEUE_TYPES_H
33
34 #include <cds/container/msqueue.h>
35 #include <cds/container/moir_queue.h>
36 #include <cds/container/rwqueue.h>
37 #include <cds/container/optimistic_queue.h>
38 #include <cds/container/vyukov_mpmc_cycle_queue.h>
39 #include <cds/container/basket_queue.h>
40 #include <cds/container/fcqueue.h>
41 #include <cds/container/fcdeque.h>
42 #include <cds/container/segmented_queue.h>
43 #include <cds/container/weak_ringbuffer.h>
44
45 #include <cds/gc/hp.h>
46 #include <cds/gc/dhp.h>
47
48 #include "std_queue.h"
49 #include "lock/win32_lock.h"
50
51 #include <boost/container/deque.hpp>
52
53 #include <cds_test/stress_test.h>
54 #include <cds_test/stat_flat_combining_out.h>
55 #include <cds_test/fc_hevy_value.h>
56
57 #include "print_stat.h"
58
59 namespace queue {
60
61     namespace details {
62         template <typename T, typename Traits=cds::container::fcdeque::traits, class Deque=std::deque<T> >
63         class FCDequeL: public cds::container::FCDeque<T, Deque, Traits >
64         {
65             typedef cds::container::FCDeque<T, Deque, Traits > base_class;
66         public:
67             FCDequeL()
68             {}
69
70             FCDequeL(
71                 unsigned int nCompactFactor     ///< Flat combining: publication list compacting factor
72                 ,unsigned int nCombinePassCount ///< Flat combining: number of combining passes for combiner thread
73                 )
74                 : base_class( nCompactFactor, nCombinePassCount )
75             {}
76
77             bool push( T const& v )
78             {
79                 return base_class::push_front( v );
80             }
81             bool enqueue( T const& v )
82             {
83                 return push( v );
84             }
85
86             bool pop( T& v )
87             {
88                 return base_class::pop_back( v );
89             }
90             bool deque( T& v )
91             {
92                 return pop(v);
93             }
94         };
95
96         template <typename T, typename Traits=cds::container::fcdeque::traits, class Deque = std::deque<T> >
97         class FCDequeR: public cds::container::FCDeque<T, Deque, Traits >
98         {
99             typedef cds::container::FCDeque<T, Deque, Traits > base_class;
100         public:
101             FCDequeR()
102             {}
103
104             FCDequeR(
105                 unsigned int nCompactFactor     ///< Flat combining: publication list compacting factor
106                 ,unsigned int nCombinePassCount ///< Flat combining: number of combining passes for combiner thread
107                 )
108                 : base_class( nCompactFactor, nCombinePassCount )
109             {}
110
111             bool push( T const& v )
112             {
113                 return base_class::push_back( v );
114             }
115             bool enqueue( T const& v )
116             {
117                 return push( v );
118             }
119
120             bool pop( T& v )
121             {
122                 return base_class::pop_front( v );
123             }
124             bool deque( T& v )
125             {
126                 return pop(v);
127             }
128         };
129
130     } // namespace details
131
132 namespace fc_details{
133 // FCDeque
134         struct traits_FCDeque_stat:
135             public cds::container::fcdeque::make_traits<
136                 cds::opt::stat< cds::container::fcdeque::stat<> >
137             >::type
138         {};
139         struct traits_FCDeque_elimination:
140             public cds::container::fcdeque::make_traits<
141                 cds::opt::enable_elimination< true >
142             >::type
143         {};
144         struct traits_FCDeque_elimination_stat:
145             public cds::container::fcdeque::make_traits<
146                 cds::opt::stat< cds::container::fcdeque::stat<> >,
147                 cds::opt::enable_elimination< true >
148             >::type
149         {};
150         struct traits_FCDeque_mutex:
151             public cds::container::fcdeque::make_traits<
152                 cds::opt::lock_type< std::mutex >
153             >::type
154         {};
155
156         struct traits_FCDeque_wait_ss: cds::container::fcdeque::traits
157         {
158             typedef cds::algo::flat_combining::wait_strategy::single_mutex_single_condvar<> wait_strategy;
159         };
160         struct traits_FCDeque_wait_ss_stat: traits_FCDeque_wait_ss
161         {
162             typedef cds::container::fcdeque::stat<> stat;
163         };
164         struct traits_FCDeque_wait_sm: cds::container::fcdeque::traits
165         {
166             typedef cds::algo::flat_combining::wait_strategy::single_mutex_multi_condvar<> wait_strategy;
167         };
168         struct traits_FCDeque_wait_sm_stat: traits_FCDeque_wait_sm
169         {
170             typedef cds::container::fcdeque::stat<> stat;
171         };
172         struct traits_FCDeque_wait_mm: cds::container::fcdeque::traits
173         {
174             typedef cds::algo::flat_combining::wait_strategy::multi_mutex_multi_condvar<> wait_strategy;
175         };
176         struct traits_FCDeque_wait_mm_stat: traits_FCDeque_wait_mm
177         {
178             typedef cds::container::fcdeque::stat<> stat;
179         };
180
181 }
182     template <typename Value>
183     struct Types {
184
185         // MSQueue
186         typedef cds::container::MSQueue<cds::gc::HP,  Value > MSQueue_HP;
187         typedef cds::container::MSQueue<cds::gc::DHP, Value > MSQueue_DHP;
188         typedef cds::container::MoirQueue<cds::gc::HP, Value > MoirQueue_HP;
189         typedef cds::container::MoirQueue<cds::gc::DHP, Value > MoirQueue_DHP;
190
191         struct traits_MSQueue_seqcst : public
192             cds::container::msqueue::make_traits <
193                 cds::opt::memory_model < cds::opt::v::sequential_consistent >
194             > ::type
195         {};
196         typedef cds::container::MSQueue< cds::gc::HP,  Value, traits_MSQueue_seqcst > MSQueue_HP_seqcst;
197         typedef cds::container::MSQueue< cds::gc::DHP, Value, traits_MSQueue_seqcst > MSQueue_DHP_seqcst;
198         typedef cds::container::MoirQueue< cds::gc::HP, Value, traits_MSQueue_seqcst > MoirQueue_HP_seqcst;
199         typedef cds::container::MoirQueue< cds::gc::DHP, Value, traits_MSQueue_seqcst > MoirQueue_DHP_seqcst;
200
201         // MSQueue + item counter
202         struct traits_MSQueue_ic : public
203             cds::container::msqueue::make_traits <
204                 cds::opt::item_counter < cds::atomicity::item_counter >
205             >::type
206         {};
207         typedef cds::container::MSQueue< cds::gc::HP,  Value, traits_MSQueue_ic > MSQueue_HP_ic;
208         typedef cds::container::MSQueue< cds::gc::DHP, Value, traits_MSQueue_ic > MSQueue_DHP_ic;
209         typedef cds::container::MoirQueue< cds::gc::HP, Value, traits_MSQueue_ic > MoirQueue_HP_ic;
210         typedef cds::container::MoirQueue< cds::gc::DHP, Value, traits_MSQueue_ic > MoirQueue_DHP_ic;
211
212         // MSQueue + stat
213         struct traits_MSQueue_stat: public
214             cds::container::msqueue::make_traits <
215                 cds::opt::stat< cds::container::msqueue::stat<> >
216             >::type
217         {};
218         typedef cds::container::MSQueue< cds::gc::HP,  Value, traits_MSQueue_stat > MSQueue_HP_stat;
219         typedef cds::container::MSQueue< cds::gc::DHP, Value, traits_MSQueue_stat > MSQueue_DHP_stat;
220         typedef cds::container::MoirQueue< cds::gc::HP, Value, traits_MSQueue_stat > MoirQueue_HP_stat;
221         typedef cds::container::MoirQueue< cds::gc::DHP, Value, traits_MSQueue_stat > MoirQueue_DHP_stat;
222
223
224         // OptimisticQueue
225         typedef cds::container::OptimisticQueue< cds::gc::HP, Value > OptimisticQueue_HP;
226         typedef cds::container::OptimisticQueue< cds::gc::DHP, Value > OptimisticQueue_DHP;
227
228         struct traits_OptimisticQueue_seqcst : public cds::container::optimistic_queue::traits
229         {
230             typedef cds::opt::v::sequential_consistent memory_model;
231         };
232         typedef cds::container::OptimisticQueue< cds::gc::HP,  Value, traits_OptimisticQueue_seqcst > OptimisticQueue_HP_seqcst;
233         typedef cds::container::OptimisticQueue< cds::gc::DHP, Value, traits_OptimisticQueue_seqcst > OptimisticQueue_DHP_seqcst;
234
235         struct traits_OptimisticQueue_ic : public cds::container::optimistic_queue::traits
236         {
237             typedef cds::atomicity::item_counter item_counter;
238         };
239         typedef cds::container::OptimisticQueue< cds::gc::HP,  Value, traits_OptimisticQueue_ic > OptimisticQueue_HP_ic;
240         typedef cds::container::OptimisticQueue< cds::gc::DHP, Value, traits_OptimisticQueue_ic > OptimisticQueue_DHP_ic;
241
242         struct traits_OptimisticQueue_stat : public
243             cds::container::optimistic_queue::make_traits <
244                 cds::opt::stat < cds::intrusive::optimistic_queue::stat<> >
245             > ::type
246         {};
247         typedef cds::container::OptimisticQueue< cds::gc::HP,  Value, traits_OptimisticQueue_stat > OptimisticQueue_HP_stat;
248         typedef cds::container::OptimisticQueue< cds::gc::DHP, Value, traits_OptimisticQueue_stat > OptimisticQueue_DHP_stat;
249
250
251         // VyukovMPMCCycleQueue
252         struct traits_VyukovMPMCCycleQueue_dyn : public cds::container::vyukov_queue::traits
253         {
254             typedef cds::opt::v::uninitialized_dynamic_buffer< int > buffer;
255         };
256         class VyukovMPMCCycleQueue_dyn
257             : public cds::container::VyukovMPMCCycleQueue< Value, traits_VyukovMPMCCycleQueue_dyn >
258         {
259             typedef cds::container::VyukovMPMCCycleQueue< Value, traits_VyukovMPMCCycleQueue_dyn > base_class;
260         public:
261             VyukovMPMCCycleQueue_dyn()
262                 : base_class( 1024 * 64 )
263             {}
264             VyukovMPMCCycleQueue_dyn( size_t nCapacity )
265                 : base_class( nCapacity )
266             {}
267
268             cds::opt::none statistics() const
269             {
270                 return cds::opt::none();
271             }
272         };
273
274         struct traits_VyukovMPMCCycleQueue_dyn_ic : public traits_VyukovMPMCCycleQueue_dyn
275         {
276             typedef cds::atomicity::item_counter item_counter;
277         };
278         class VyukovMPMCCycleQueue_dyn_ic
279             : public cds::container::VyukovMPMCCycleQueue< Value, traits_VyukovMPMCCycleQueue_dyn_ic >
280         {
281             typedef cds::container::VyukovMPMCCycleQueue< Value, traits_VyukovMPMCCycleQueue_dyn_ic > base_class;
282         public:
283             VyukovMPMCCycleQueue_dyn_ic()
284                 : base_class( 1024 * 64 )
285             {}
286             VyukovMPMCCycleQueue_dyn_ic( size_t nCapacity )
287                 : base_class( nCapacity )
288             {}
289
290             cds::opt::none statistics() const
291             {
292                 return cds::opt::none();
293             }
294         };
295
296         // singlre-consumer version
297         struct traits_VyukovMPSCCycleQueue_dyn: public traits_VyukovMPMCCycleQueue_dyn
298         {
299             static const bool single_consumer = true;
300         };
301         class VyukovMPSCCycleQueue_dyn
302             : public cds::container::VyukovMPMCCycleQueue< Value, traits_VyukovMPSCCycleQueue_dyn >
303         {
304             typedef cds::container::VyukovMPMCCycleQueue< Value, traits_VyukovMPSCCycleQueue_dyn > base_class;
305         public:
306             VyukovMPSCCycleQueue_dyn()
307                 : base_class( 1024 * 64 )
308             {}
309             VyukovMPSCCycleQueue_dyn( size_t nCapacity )
310                 : base_class( nCapacity )
311             {}
312
313             cds::opt::none statistics() const
314             {
315                 return cds::opt::none();
316             }
317         };
318
319         struct traits_VyukovMPSCCycleQueue_dyn_ic: public traits_VyukovMPMCCycleQueue_dyn
320         {
321             static const bool single_consumer = true;
322         };
323         class VyukovMPSCCycleQueue_dyn_ic
324             : public cds::container::VyukovMPMCCycleQueue< Value, traits_VyukovMPSCCycleQueue_dyn_ic >
325         {
326             typedef cds::container::VyukovMPMCCycleQueue< Value, traits_VyukovMPSCCycleQueue_dyn_ic > base_class;
327         public:
328             VyukovMPSCCycleQueue_dyn_ic()
329                 : base_class( 1024 * 64 )
330             {}
331             VyukovMPSCCycleQueue_dyn_ic( size_t nCapacity )
332                 : base_class( nCapacity )
333             {}
334
335             cds::opt::none statistics() const
336             {
337                 return cds::opt::none();
338             }
339         };
340
341
342         // WeakRingBuffer
343         struct traits_WeakRingBuffer_dyn: public cds::container::weak_ringbuffer::traits
344         {
345             typedef cds::opt::v::uninitialized_dynamic_buffer< int > buffer;
346         };
347         class WeakRingBuffer_dyn
348             : public cds::container::WeakRingBuffer< Value, traits_WeakRingBuffer_dyn >
349         {
350             typedef cds::container::WeakRingBuffer< Value, traits_WeakRingBuffer_dyn > base_class;
351         public:
352             WeakRingBuffer_dyn()
353                 : base_class( 1024 * 64 )
354             {}
355             WeakRingBuffer_dyn( size_t nCapacity )
356                 : base_class( nCapacity )
357             {}
358
359             cds::opt::none statistics() const
360             {
361                 return cds::opt::none();
362             }
363         };
364
365         class WeakRingBuffer_void_dyn
366             : public cds::container::WeakRingBuffer< void, traits_WeakRingBuffer_dyn >
367         {
368             typedef cds::container::WeakRingBuffer< void, traits_WeakRingBuffer_dyn > base_class;
369         public:
370             WeakRingBuffer_void_dyn()
371                 : base_class( 1024 * 64 )
372             {}
373             WeakRingBuffer_void_dyn( size_t nCapacity )
374                 : base_class( nCapacity )
375             {}
376
377             cds::opt::none statistics() const
378             {
379                 return cds::opt::none();
380             }
381         };
382
383         // BasketQueue
384
385         typedef cds::container::BasketQueue< cds::gc::HP , Value > BasketQueue_HP;
386         typedef cds::container::BasketQueue< cds::gc::DHP, Value > BasketQueue_DHP;
387
388         struct traits_BasketQueue_seqcst : public cds::container::basket_queue::traits
389         {
390             typedef cds::opt::v::sequential_consistent mamory_model;
391         };
392         typedef cds::container::BasketQueue< cds::gc::HP,  Value, traits_BasketQueue_seqcst > BasketQueue_HP_seqcst;
393         typedef cds::container::BasketQueue< cds::gc::DHP, Value, traits_BasketQueue_seqcst > BasketQueue_DHP_seqcst;
394
395         struct traits_BasketQueue_ic : public cds::container::basket_queue::traits
396         {
397             typedef cds::atomicity::item_counter item_counter;
398         };
399         typedef cds::container::BasketQueue< cds::gc::HP,  Value, traits_BasketQueue_ic >BasketQueue_HP_ic;
400         typedef cds::container::BasketQueue< cds::gc::DHP, Value, traits_BasketQueue_ic >BasketQueue_DHP_ic;
401
402         struct traits_BasketQueue_stat : public cds::container::basket_queue::traits
403         {
404             typedef cds::container::basket_queue::stat<> stat;
405         };
406         typedef cds::container::BasketQueue< cds::gc::HP,  Value, traits_BasketQueue_stat > BasketQueue_HP_stat;
407         typedef cds::container::BasketQueue< cds::gc::DHP, Value, traits_BasketQueue_stat > BasketQueue_DHP_stat;
408
409
410         // RWQueue
411         typedef cds::container::RWQueue< Value > RWQueue_Spin;
412
413         struct traits_RWQueue_Spin_ic : public cds::container::rwqueue::traits
414         {
415             typedef cds::atomicity::item_counter item_counter;
416         };
417         typedef cds::container::RWQueue< Value, traits_RWQueue_Spin_ic > RWQueue_Spin_ic;
418
419         struct traits_RWQueue_mutex : public
420             cds::container::rwqueue::make_traits<
421                 cds::opt::lock_type< std::mutex >
422             >::type
423         {};
424         typedef cds::container::RWQueue< Value, traits_RWQueue_mutex > RWQueue_mutex;
425
426         // FCQueue
427         struct traits_FCQueue_stat:
428             public cds::container::fcqueue::make_traits<
429                 cds::opt::stat< cds::container::fcqueue::stat<> >
430             >::type
431         {};
432         struct traits_FCQueue_single_mutex_single_condvar:
433             public cds::container::fcqueue::make_traits<
434                 cds::opt::wait_strategy< cds::algo::flat_combining::wait_strategy::single_mutex_single_condvar<>>
435             >::type
436         {};
437         struct traits_FCQueue_single_mutex_single_condvar_stat: traits_FCQueue_single_mutex_single_condvar
438         {
439             typedef cds::container::fcqueue::stat<> stat;
440         };
441         struct traits_FCQueue_single_mutex_multi_condvar:
442             public cds::container::fcqueue::make_traits<
443                 cds::opt::wait_strategy< cds::algo::flat_combining::wait_strategy::single_mutex_multi_condvar<>>
444             >::type
445         {};
446         struct traits_FCQueue_single_mutex_multi_condvar_stat: traits_FCQueue_single_mutex_multi_condvar
447         {
448             typedef cds::container::fcqueue::stat<> stat;
449         };
450         struct traits_FCQueue_multi_mutex_multi_condvar:
451             public cds::container::fcqueue::make_traits<
452                 cds::opt::wait_strategy< cds::algo::flat_combining::wait_strategy::multi_mutex_multi_condvar<>>
453             >::type
454         {};
455         struct traits_FCQueue_multi_mutex_multi_condvar_stat: traits_FCQueue_multi_mutex_multi_condvar
456         {
457             typedef cds::container::fcqueue::stat<> stat;
458         };
459         struct traits_FCQueue_elimination:
460             public cds::container::fcqueue::make_traits<
461                 cds::opt::enable_elimination< true >
462             >::type
463         {};
464         struct traits_FCQueue_elimination_stat:
465             public cds::container::fcqueue::make_traits<
466                 cds::opt::enable_elimination< true >
467                 ,cds::opt::stat< cds::container::fcqueue::stat<> >
468             >::type
469         {};
470
471         typedef cds::container::FCQueue< Value > FCQueue_deque;
472         typedef cds::container::FCQueue< Value, std::queue<Value>, traits_FCQueue_stat > FCQueue_deque_stat;
473         typedef cds::container::FCQueue< Value, std::queue<Value>, traits_FCQueue_single_mutex_single_condvar> FCQueue_deque_wait_ss;
474         typedef cds::container::FCQueue< Value, std::queue<Value>, traits_FCQueue_single_mutex_single_condvar_stat> FCQueue_deque_wait_ss_stat;
475         typedef cds::container::FCQueue< Value, std::queue<Value>, traits_FCQueue_single_mutex_multi_condvar> FCQueue_deque_wait_sm;
476         typedef cds::container::FCQueue< Value, std::queue<Value>, traits_FCQueue_single_mutex_multi_condvar_stat> FCQueue_deque_wait_sm_stat;
477         typedef cds::container::FCQueue< Value, std::queue<Value>, traits_FCQueue_multi_mutex_multi_condvar> FCQueue_deque_wait_mm;
478         typedef cds::container::FCQueue< Value, std::queue<Value>, traits_FCQueue_multi_mutex_multi_condvar_stat> FCQueue_deque_wait_mm_stat;
479
480         typedef cds::container::FCQueue< Value, std::queue<Value>, traits_FCQueue_elimination > FCQueue_deque_elimination;
481         typedef cds::container::FCQueue< Value, std::queue<Value>, traits_FCQueue_elimination_stat > FCQueue_deque_elimination_stat;
482
483         typedef cds::container::FCQueue< Value, std::queue<Value, std::list<Value>>> FCQueue_list;
484         typedef cds::container::FCQueue< Value, std::queue<Value, std::list<Value>>, traits_FCQueue_stat> FCQueue_list_stat;
485         typedef cds::container::FCQueue< Value, std::queue<Value, std::list<Value>>, traits_FCQueue_single_mutex_single_condvar> FCQueue_list_wait_ss;
486         typedef cds::container::FCQueue< Value, std::queue<Value, std::list<Value>>, traits_FCQueue_single_mutex_single_condvar_stat> FCQueue_list_wait_ss_stat;
487         typedef cds::container::FCQueue< Value, std::queue<Value, std::list<Value>>, traits_FCQueue_single_mutex_multi_condvar> FCQueue_list_wait_sm;
488         typedef cds::container::FCQueue< Value, std::queue<Value, std::list<Value>>, traits_FCQueue_single_mutex_multi_condvar_stat> FCQueue_list_wait_sm_stat;
489         typedef cds::container::FCQueue< Value, std::queue<Value, std::list<Value>>, traits_FCQueue_multi_mutex_multi_condvar> FCQueue_list_wait_mm;
490         typedef cds::container::FCQueue< Value, std::queue<Value, std::list<Value>>, traits_FCQueue_multi_mutex_multi_condvar_stat> FCQueue_list_wait_mm_stat;
491
492         typedef cds::container::FCQueue< Value, std::queue<Value, std::list<Value> >, traits_FCQueue_elimination > FCQueue_list_elimination;
493         typedef cds::container::FCQueue< Value, std::queue<Value, std::list<Value> >, traits_FCQueue_elimination_stat > FCQueue_list_elimination_stat;
494
495
496
497         typedef details::FCDequeL< Value > FCDequeL_default;
498         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_mutex > FCDequeL_mutex;
499         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_stat > FCDequeL_stat;
500         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_wait_ss > FCDequeL_wait_ss;
501         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_wait_ss_stat > FCDequeL_wait_ss_stat;
502         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_wait_sm > FCDequeL_wait_sm;
503         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_wait_sm_stat > FCDequeL_wait_sm_stat;
504         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_wait_mm > FCDequeL_wait_mm;
505         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_wait_mm_stat > FCDequeL_wait_mm_stat;
506         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_elimination > FCDequeL_elimination;
507         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_elimination_stat > FCDequeL_elimination_stat;
508
509         typedef details::FCDequeL< Value, cds::container::fcdeque::traits, boost::container::deque<Value> > FCDequeL_boost;
510         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_stat, boost::container::deque<Value> > FCDequeL_boost_stat;
511         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_elimination, boost::container::deque<Value> > FCDequeL_boost_elimination;
512         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_elimination_stat, boost::container::deque<Value> > FCDequeL_boost_elimination_stat;
513
514         typedef details::FCDequeR< Value > FCDequeR_default;
515         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_mutex > FCDequeR_mutex;
516         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_stat > FCDequeR_stat;
517         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_wait_ss > FCDequeR_wait_ss;
518         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_wait_ss_stat > FCDequeR_wait_ss_stat;
519         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_wait_sm > FCDequeR_wait_sm;
520         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_wait_sm_stat > FCDequeR_wait_sm_stat;
521         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_wait_mm > FCDequeR_wait_mm;
522         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_wait_mm_stat > FCDequeR_wait_mm_stat;
523         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_elimination > FCDequeR_elimination;
524         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_elimination_stat > FCDequeR_elimination_stat;
525
526         typedef details::FCDequeR< Value, cds::container::fcdeque::traits, boost::container::deque<Value> > FCDequeR_boost;
527         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_stat, boost::container::deque<Value> > FCDequeR_boost_stat;
528         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_elimination, boost::container::deque<Value> > FCDequeR_boost_elimination;
529         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_elimination_stat, boost::container::deque<Value> > FCDequeR_boost_elimination_stat;
530
531         // STL
532         typedef StdQueue_deque<Value>               StdQueue_deque_Spinlock;
533         typedef StdQueue_list<Value>                StdQueue_list_Spinlock;
534         typedef StdQueue_deque<Value, std::mutex>   StdQueue_deque_Mutex;
535         typedef StdQueue_list<Value, std::mutex>    StdQueue_list_Mutex;
536 #ifdef UNIT_LOCK_WIN_CS
537         typedef StdQueue_deque<Value, lock::win::CS>    StdQueue_deque_WinCS;
538         typedef StdQueue_list<Value, lock::win::CS>     StdQueue_list_WinCS;
539         typedef StdQueue_deque<Value, lock::win::Mutex> StdQueue_deque_WinMutex;
540         typedef StdQueue_list<Value, lock::win::Mutex>  StdQueue_list_WinMutex;
541 #endif
542
543         // SegmentedQueue
544         class traits_SegmentedQueue_spin_stat:
545             public cds::container::segmented_queue::make_traits<
546                 cds::opt::stat< cds::intrusive::segmented_queue::stat<> >
547             >::type
548         {};
549         class traits_SegmentedQueue_spin_padding:
550             public cds::container::segmented_queue::make_traits<
551                 cds::opt::padding< cds::opt::cache_line_padding >
552             >::type
553         {};
554         class traits_SegmentedQueue_mutex_stat:
555             public cds::container::segmented_queue::make_traits<
556                 cds::opt::stat< cds::intrusive::segmented_queue::stat<> >
557                 ,cds::opt::lock_type< std::mutex >
558             >::type
559         {};
560         class traits_SegmentedQueue_mutex:
561             public cds::container::segmented_queue::make_traits<
562                 cds::opt::lock_type< std::mutex >
563             >::type
564         {};
565         class traits_SegmentedQueue_mutex_padding:
566             public cds::container::segmented_queue::make_traits<
567                 cds::opt::lock_type< std::mutex >
568                 , cds::opt::padding< cds::opt::cache_line_padding >
569             >::type
570         {};
571
572         typedef cds::container::SegmentedQueue< cds::gc::HP, Value >  SegmentedQueue_HP_spin;
573         typedef cds::container::SegmentedQueue< cds::gc::HP, Value, traits_SegmentedQueue_spin_padding >  SegmentedQueue_HP_spin_padding;
574         typedef cds::container::SegmentedQueue< cds::gc::HP, Value, traits_SegmentedQueue_spin_stat >  SegmentedQueue_HP_spin_stat;
575         typedef cds::container::SegmentedQueue< cds::gc::HP, Value, traits_SegmentedQueue_mutex >  SegmentedQueue_HP_mutex;
576         typedef cds::container::SegmentedQueue< cds::gc::HP, Value, traits_SegmentedQueue_mutex_padding >  SegmentedQueue_HP_mutex_padding;
577         typedef cds::container::SegmentedQueue< cds::gc::HP, Value, traits_SegmentedQueue_mutex_stat >  SegmentedQueue_HP_mutex_stat;
578
579         typedef cds::container::SegmentedQueue< cds::gc::DHP, Value >  SegmentedQueue_DHP_spin;
580         typedef cds::container::SegmentedQueue< cds::gc::DHP, Value, traits_SegmentedQueue_spin_padding >  SegmentedQueue_DHP_spin_padding;
581         typedef cds::container::SegmentedQueue< cds::gc::DHP, Value, traits_SegmentedQueue_spin_stat >  SegmentedQueue_DHP_spin_stat;
582         typedef cds::container::SegmentedQueue< cds::gc::DHP, Value, traits_SegmentedQueue_mutex >  SegmentedQueue_DHP_mutex;
583         typedef cds::container::SegmentedQueue< cds::gc::DHP, Value, traits_SegmentedQueue_mutex_padding >  SegmentedQueue_DHP_mutex_padding;
584         typedef cds::container::SegmentedQueue< cds::gc::DHP, Value, traits_SegmentedQueue_mutex_stat >  SegmentedQueue_DHP_mutex_stat;
585     };
586
587     template <typename Value>
588     struct TypesFCHeavyValue {
589         typedef details::FCDequeL< Value > FCDequeL_HeavyValue_default;
590         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_mutex > FCDequeL_HeavyValue_mutex;
591         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_stat > FCDequeL_HeavyValue_stat;
592         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_wait_ss > FCDequeL_HeavyValue_wait_ss;
593         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_wait_ss_stat > FCDequeL_HeavyValue_wait_ss_stat;
594         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_wait_sm > FCDequeL_HeavyValue_wait_sm;
595         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_wait_sm_stat > FCDequeL_HeavyValue_wait_sm_stat;
596         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_wait_mm > FCDequeL_HeavyValue_wait_mm;
597         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_wait_mm_stat > FCDequeL_HeavyValue_wait_mm_stat;
598         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_elimination > FCDequeL_HeavyValue_elimination;
599         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_elimination_stat > FCDequeL_HeavyValue_elimination_stat;
600
601         typedef details::FCDequeL< Value, cds::container::fcdeque::traits, boost::container::deque<Value> > FCDequeL_HeavyValue_boost;
602         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_stat, boost::container::deque<Value> > FCDequeL_HeavyValue_boost_stat;
603         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_elimination, boost::container::deque<Value> > FCDequeL_HeavyValue_boost_elimination;
604         typedef details::FCDequeL< Value, fc_details::traits_FCDeque_elimination_stat, boost::container::deque<Value> > FCDequeL_HeavyValue_boost_elimination_stat;
605
606         typedef details::FCDequeR< Value > FCDequeR_HeavyValue_default;
607         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_mutex > FCDequeR_HeavyValue_mutex;
608         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_stat > FCDequeR_HeavyValue_stat;
609         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_wait_ss > FCDequeR_HeavyValue_wait_ss;
610         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_wait_ss_stat > FCDequeR_HeavyValue_wait_ss_stat;
611         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_wait_sm > FCDequeR_HeavyValue_wait_sm;
612         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_wait_sm_stat > FCDequeR_HeavyValue_wait_sm_stat;
613         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_wait_mm > FCDequeR_HeavyValue_wait_mm;
614         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_wait_mm_stat > FCDequeR_HeavyValue_wait_mm_stat;
615         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_elimination > FCDequeR_HeavyValue_elimination;
616         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_elimination_stat > FCDequeR_HeavyValue_elimination_stat;
617
618         typedef details::FCDequeR< Value, cds::container::fcdeque::traits, boost::container::deque<Value> > FCDequeR_HeavyValue_boost;
619         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_stat, boost::container::deque<Value> > FCDequeR_HeavyValue_boost_stat;
620         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_elimination, boost::container::deque<Value> > FCDequeR_HeavyValue_boost_elimination;
621         typedef details::FCDequeR< Value, fc_details::traits_FCDeque_elimination_stat, boost::container::deque<Value> > FCDequeR_HeavyValue_boost_elimination_stat;
622     };
623 }
624
625
626 // *********************************************
627 // Queue statistics
628 namespace cds_test {
629
630     template <typename Counter>
631     static inline property_stream& operator <<( property_stream& o, cds::container::fcqueue::stat<Counter> const& s )
632     {
633             return o
634                 << CDSSTRESS_STAT_OUT( s, m_nEnqueue )
635                 << CDSSTRESS_STAT_OUT( s, m_nEnqMove )
636                 << CDSSTRESS_STAT_OUT( s, m_nDequeue )
637                 << CDSSTRESS_STAT_OUT( s, m_nFailedDeq )
638                 << CDSSTRESS_STAT_OUT( s, m_nCollided )
639                 << static_cast<cds::algo::flat_combining::stat<> const&>(s);
640     }
641
642     static inline property_stream& operator <<( property_stream& o, cds::container::fcqueue::empty_stat const& /*s*/ )
643     {
644         return o;
645     }
646
647     static inline property_stream& operator <<( property_stream& o, cds::container::fcdeque::empty_stat const& /*s*/ )
648     {
649         return o;
650     }
651
652     static inline property_stream& operator <<( property_stream& o, cds::container::fcdeque::stat<> const& s )
653     {
654         return o
655             << CDSSTRESS_STAT_OUT( s, m_nPushFront )
656             << CDSSTRESS_STAT_OUT( s, m_nPushFrontMove )
657             << CDSSTRESS_STAT_OUT( s, m_nPushBack )
658             << CDSSTRESS_STAT_OUT( s, m_nPushBackMove )
659             << CDSSTRESS_STAT_OUT( s, m_nPopFront )
660             << CDSSTRESS_STAT_OUT( s, m_nFailedPopFront )
661             << CDSSTRESS_STAT_OUT( s, m_nPopBack )
662             << CDSSTRESS_STAT_OUT( s, m_nFailedPopBack )
663             << CDSSTRESS_STAT_OUT( s, m_nCollided )
664             << static_cast<cds::algo::flat_combining::stat<> const&>(s);
665     }
666
667 } // namespace cds_test
668
669 #define CDSSTRESS_Queue_F( test_fixture, type_name ) \
670     TEST_F( test_fixture, type_name ) \
671     { \
672         typedef queue::Types< value_type >::type_name queue_type; \
673         queue_type queue; \
674         test( queue ); \
675     }
676
677 #define CDSSTRESS_FCQueue_F( test_fixture, type_name ) \
678     TEST_F( test_fixture, type_name ) \
679     { \
680         typedef queue::TypesFCHeavyValue< value_type >::type_name queue_type; \
681         queue_type queue; \
682         test( queue ); \
683     }
684
685 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL > 0
686 #   define CDSSTRESS_MSQueue_1( test_fixture ) \
687         CDSSTRESS_Queue_F( test_fixture, MSQueue_HP_seqcst  ) \
688         CDSSTRESS_Queue_F( test_fixture, MSQueue_HP_ic      ) \
689         CDSSTRESS_Queue_F( test_fixture, MSQueue_DHP_seqcst ) \
690         CDSSTRESS_Queue_F( test_fixture, MSQueue_DHP_ic     ) \
691
692 #   define CDSSTRESS_MoirQueue_1( test_fixture ) \
693         CDSSTRESS_Queue_F( test_fixture, MoirQueue_HP_seqcst    ) \
694         CDSSTRESS_Queue_F( test_fixture, MoirQueue_HP_ic        ) \
695         CDSSTRESS_Queue_F( test_fixture, MoirQueue_DHP_seqcst   ) \
696         CDSSTRESS_Queue_F( test_fixture, MoirQueue_DHP_ic       ) \
697
698 #   define CDSSTRESS_OptimsticQueue_1( test_fixture ) \
699         CDSSTRESS_Queue_F( test_fixture, OptimisticQueue_HP_seqcst  ) \
700         CDSSTRESS_Queue_F( test_fixture, OptimisticQueue_HP_ic      ) \
701         CDSSTRESS_Queue_F( test_fixture, OptimisticQueue_DHP_seqcst ) \
702         CDSSTRESS_Queue_F( test_fixture, OptimisticQueue_DHP_ic     ) \
703
704 #   define CDSSTRESS_BasketQueue_1( test_fixture ) \
705         CDSSTRESS_Queue_F( test_fixture, BasketQueue_HP_seqcst  ) \
706         CDSSTRESS_Queue_F( test_fixture, BasketQueue_HP_ic      ) \
707         CDSSTRESS_Queue_F( test_fixture, BasketQueue_DHP_seqcst ) \
708         CDSSTRESS_Queue_F( test_fixture, BasketQueue_DHP_ic     ) \
709
710 #   define CDSSTRESS_FCQueue_1( test_fixture ) \
711         CDSSTRESS_Queue_F( test_fixture, FCQueue_deque_wait_ss      ) \
712         CDSSTRESS_Queue_F( test_fixture, FCQueue_deque_wait_sm      ) \
713         CDSSTRESS_Queue_F( test_fixture, FCQueue_deque_wait_mm      ) \
714         CDSSTRESS_Queue_F( test_fixture, FCQueue_deque_elimination  ) \
715         CDSSTRESS_Queue_F( test_fixture, FCQueue_list_wait_ss       ) \
716         CDSSTRESS_Queue_F( test_fixture, FCQueue_list_wait_sm       ) \
717         CDSSTRESS_Queue_F( test_fixture, FCQueue_list_wait_mm       ) \
718         CDSSTRESS_Queue_F( test_fixture, FCQueue_list_elimination   ) \
719
720 #   define CDSSTRESS_FCDeque_1( test_fixture ) \
721         CDSSTRESS_Queue_F( test_fixture, FCDequeL_mutex             ) \
722         CDSSTRESS_Queue_F( test_fixture, FCDequeL_stat              ) \
723         CDSSTRESS_Queue_F( test_fixture, FCDequeL_wait_ss           )\
724         CDSSTRESS_Queue_F( test_fixture, FCDequeL_wait_sm           ) \
725         CDSSTRESS_Queue_F( test_fixture, FCDequeL_wait_mm           ) \
726         CDSSTRESS_Queue_F( test_fixture, FCDequeL_elimination       ) \
727         CDSSTRESS_Queue_F( test_fixture, FCDequeL_boost             ) \
728         CDSSTRESS_Queue_F( test_fixture, FCDequeL_boost_elimination ) \
729         CDSSTRESS_Queue_F( test_fixture, FCDequeL_boost_elimination_stat ) \
730         CDSSTRESS_Queue_F( test_fixture, FCDequeR_wait_ss           ) \
731         CDSSTRESS_Queue_F( test_fixture, FCDequeR_wait_sm           ) \
732         CDSSTRESS_Queue_F( test_fixture, FCDequeR_wait_mm           ) \
733         CDSSTRESS_Queue_F( test_fixture, FCDequeR_elimination       ) \
734         CDSSTRESS_Queue_F( test_fixture, FCDequeR_boost             ) \
735         CDSSTRESS_Queue_F( test_fixture, FCDequeR_boost_elimination ) \
736         CDSSTRESS_Queue_F( test_fixture, FCDequeR_boost_elimination_stat ) \
737
738 #   define CDSSTRESS_FCDeque_HeavyValue_1( test_fixture ) \
739         CDSSTRESS_FCQueue_F( test_fixture, FCDequeL_HeavyValue_wait_ss          ) \
740         CDSSTRESS_FCQueue_F( test_fixture, FCDequeL_HeavyValue_wait_ss_stat     ) \
741         CDSSTRESS_FCQueue_F( test_fixture, FCDequeL_HeavyValue_wait_sm          ) \
742         CDSSTRESS_FCQueue_F( test_fixture, FCDequeL_HeavyValue_wait_sm_stat     ) \
743         CDSSTRESS_FCQueue_F( test_fixture, FCDequeL_HeavyValue_wait_mm          ) \
744         CDSSTRESS_FCQueue_F( test_fixture, FCDequeL_HeavyValue_wait_mm_stat     ) \
745         CDSSTRESS_FCQueue_F( test_fixture, FCDequeL_HeavyValue_elimination      ) \
746         CDSSTRESS_FCQueue_F( test_fixture, FCDequeL_HeavyValue_elimination_stat ) \
747         CDSSTRESS_FCQueue_F( test_fixture, FCDequeL_HeavyValue_boost            ) \
748         CDSSTRESS_FCQueue_F( test_fixture, FCDequeL_HeavyValue_boost_stat       ) \
749         CDSSTRESS_FCQueue_F( test_fixture, FCDequeL_HeavyValue_boost_elimination) \
750         CDSSTRESS_FCQueue_F( test_fixture, FCDequeL_HeavyValue_boost_elimination_stat ) \
751         CDSSTRESS_FCQueue_F( test_fixture, FCDequeR_HeavyValue_default          ) \
752         CDSSTRESS_FCQueue_F( test_fixture, FCDequeR_HeavyValue_mutex            ) \
753         CDSSTRESS_FCQueue_F( test_fixture, FCDequeR_HeavyValue_stat             ) \
754         CDSSTRESS_FCQueue_F( test_fixture, FCDequeR_HeavyValue_wait_ss          ) \
755         CDSSTRESS_FCQueue_F( test_fixture, FCDequeR_HeavyValue_wait_ss_stat     ) \
756         CDSSTRESS_FCQueue_F( test_fixture, FCDequeR_HeavyValue_wait_sm          ) \
757         CDSSTRESS_FCQueue_F( test_fixture, FCDequeR_HeavyValue_wait_sm_stat     ) \
758         CDSSTRESS_FCQueue_F( test_fixture, FCDequeR_HeavyValue_wait_mm          ) \
759         CDSSTRESS_FCQueue_F( test_fixture, FCDequeR_HeavyValue_wait_mm_stat     ) \
760         CDSSTRESS_FCQueue_F( test_fixture, FCDequeR_HeavyValue_elimination      ) \
761         CDSSTRESS_FCQueue_F( test_fixture, FCDequeR_HeavyValue_elimination_stat ) \
762         CDSSTRESS_FCQueue_F( test_fixture, FCDequeR_HeavyValue_boost            ) \
763         CDSSTRESS_FCQueue_F( test_fixture, FCDequeR_HeavyValue_boost_stat       ) \
764         CDSSTRESS_FCQueue_F( test_fixture, FCDequeR_HeavyValue_boost_elimination) \
765         CDSSTRESS_FCQueue_F( test_fixture, FCDequeR_HeavyValue_boost_elimination_stat ) \
766
767 #   define CDSSTRESS_RWQueue_1( test_fixture ) \
768         CDSSTRESS_Queue_F( test_fixture, RWQueue_Spin_ic ) \
769
770 #   define CDSSTRESS_SegmentedQueue_1( test_fixture ) \
771         CDSSTRESS_Queue_F( test_fixture, SegmentedQueue_HP_mutex_padding    ) \
772         CDSSTRESS_Queue_F( test_fixture, SegmentedQueue_DHP_spin_padding    ) \
773         CDSSTRESS_Queue_F( test_fixture, SegmentedQueue_DHP_mutex_padding   ) \
774
775 #   define CDSSTRESS_StdQueue_1( test_fixture ) \
776         CDSSTRESS_Queue_F( test_fixture, StdQueue_deque_Mutex   ) \
777         CDSSTRESS_Queue_F( test_fixture, StdQueue_list_Mutex    ) \
778
779 #else
780 #   define CDSSTRESS_MSQueue_1( test_fixture )
781 #   define CDSSTRESS_MoirQueue_1( test_fixture )
782 #   define CDSSTRESS_OptimsticQueue_1( test_fixture )
783 #   define CDSSTRESS_BasketQueue_1( test_fixture )
784 #   define CDSSTRESS_FCQueue_1( test_fixture )
785 #   define CDSSTRESS_FCDeque_1( test_fixture )
786 #   define CDSSTRESS_FCDeque_HeavyValue_1( test_fixture )
787 #   define CDSSTRESS_RWQueue_1( test_fixture )
788 #   define CDSSTRESS_SegmentedQueue_1( test_fixture )
789 #   define CDSSTRESS_StdQueue_1( test_fixture )
790 #endif
791
792 #define CDSSTRESS_MSQueue( test_fixture ) \
793     CDSSTRESS_Queue_F( test_fixture, MSQueue_HP         ) \
794     CDSSTRESS_Queue_F( test_fixture, MSQueue_HP_stat    ) \
795     CDSSTRESS_Queue_F( test_fixture, MSQueue_DHP        ) \
796     CDSSTRESS_Queue_F( test_fixture, MSQueue_DHP_stat   ) \
797     CDSSTRESS_MSQueue_1( test_fixture )
798
799 #define CDSSTRESS_MoirQueue( test_fixture ) \
800     CDSSTRESS_Queue_F( test_fixture, MoirQueue_HP       ) \
801     CDSSTRESS_Queue_F( test_fixture, MoirQueue_HP_stat  ) \
802     CDSSTRESS_Queue_F( test_fixture, MoirQueue_DHP      ) \
803     CDSSTRESS_Queue_F( test_fixture, MoirQueue_DHP_stat ) \
804     CDSSTRESS_MoirQueue_1( test_fixture )
805
806 #define CDSSTRESS_OptimsticQueue( test_fixture ) \
807     CDSSTRESS_Queue_F( test_fixture, OptimisticQueue_HP         ) \
808     CDSSTRESS_Queue_F( test_fixture, OptimisticQueue_HP_stat    ) \
809     CDSSTRESS_Queue_F( test_fixture, OptimisticQueue_DHP        ) \
810     CDSSTRESS_Queue_F( test_fixture, OptimisticQueue_DHP_stat   ) \
811     CDSSTRESS_OptimsticQueue_1( test_fixture )
812
813 #define CDSSTRESS_BasketQueue( test_fixture ) \
814     CDSSTRESS_Queue_F( test_fixture, BasketQueue_HP         ) \
815     CDSSTRESS_Queue_F( test_fixture, BasketQueue_HP_stat    ) \
816     CDSSTRESS_Queue_F( test_fixture, BasketQueue_DHP        ) \
817     CDSSTRESS_Queue_F( test_fixture, BasketQueue_DHP_stat   ) \
818     CDSSTRESS_BasketQueue_1( test_fixture )
819
820 #define CDSSTRESS_FCQueue( test_fixture ) \
821     CDSSTRESS_Queue_F( test_fixture, FCQueue_deque              ) \
822     CDSSTRESS_Queue_F( test_fixture, FCQueue_deque_stat         ) \
823     CDSSTRESS_Queue_F( test_fixture, FCQueue_deque_wait_ss_stat ) \
824     CDSSTRESS_Queue_F( test_fixture, FCQueue_deque_wait_sm_stat ) \
825     CDSSTRESS_Queue_F( test_fixture, FCQueue_deque_wait_mm_stat ) \
826     CDSSTRESS_Queue_F( test_fixture, FCQueue_deque_elimination_stat ) \
827     CDSSTRESS_Queue_F( test_fixture, FCQueue_list               ) \
828     CDSSTRESS_Queue_F( test_fixture, FCQueue_list_stat          ) \
829     CDSSTRESS_Queue_F( test_fixture, FCQueue_list_wait_ss_stat  ) \
830     CDSSTRESS_Queue_F( test_fixture, FCQueue_list_wait_sm_stat  ) \
831     CDSSTRESS_Queue_F( test_fixture, FCQueue_list_wait_mm_stat  ) \
832     CDSSTRESS_Queue_F( test_fixture, FCQueue_list_elimination_stat ) \
833     CDSSTRESS_FCQueue_1( test_fixture )
834
835
836 #define CDSSTRESS_FCDeque( test_fixture ) \
837     CDSSTRESS_Queue_F( test_fixture, FCDequeL_default           ) \
838     CDSSTRESS_Queue_F( test_fixture, FCDequeL_wait_ss_stat      ) \
839     CDSSTRESS_Queue_F( test_fixture, FCDequeL_wait_sm_stat      ) \
840     CDSSTRESS_Queue_F( test_fixture, FCDequeL_wait_mm_stat      ) \
841     CDSSTRESS_Queue_F( test_fixture, FCDequeL_elimination_stat  ) \
842     CDSSTRESS_Queue_F( test_fixture, FCDequeL_boost_stat        ) \
843     CDSSTRESS_Queue_F( test_fixture, FCDequeR_default           ) \
844     CDSSTRESS_Queue_F( test_fixture, FCDequeR_mutex             ) \
845     CDSSTRESS_Queue_F( test_fixture, FCDequeR_stat              ) \
846     CDSSTRESS_Queue_F( test_fixture, FCDequeR_wait_ss_stat      ) \
847     CDSSTRESS_Queue_F( test_fixture, FCDequeR_wait_sm_stat      ) \
848     CDSSTRESS_Queue_F( test_fixture, FCDequeR_wait_mm_stat      ) \
849     CDSSTRESS_Queue_F( test_fixture, FCDequeR_elimination_stat  ) \
850     CDSSTRESS_Queue_F( test_fixture, FCDequeR_boost_stat        ) \
851     CDSSTRESS_FCDeque_1( test_fixture )
852
853 #define CDSSTRESS_FCDeque_HeavyValue( test_fixture ) \
854     CDSSTRESS_FCQueue_F( test_fixture, FCDequeL_HeavyValue_default  ) \
855     CDSSTRESS_FCQueue_F( test_fixture, FCDequeL_HeavyValue_mutex    ) \
856     CDSSTRESS_FCQueue_F( test_fixture, FCDequeL_HeavyValue_stat     ) \
857     CDSSTRESS_FCDeque_HeavyValue_1( test_fixture )
858
859 #define CDSSTRESS_RWQueue( test_fixture ) \
860     CDSSTRESS_Queue_F( test_fixture, RWQueue_Spin   ) \
861     CDSSTRESS_Queue_F( test_fixture, RWQueue_mutex  ) \
862     CDSSTRESS_RWQueue_1( test_fixture )
863
864 #define CDSSTRESS_SegmentedQueue( test_fixture ) \
865     CDSSTRESS_Queue_F( test_fixture, SegmentedQueue_HP_spin         ) \
866     CDSSTRESS_Queue_F( test_fixture, SegmentedQueue_HP_spin_padding ) \
867     CDSSTRESS_Queue_F( test_fixture, SegmentedQueue_HP_spin_stat    ) \
868     CDSSTRESS_Queue_F( test_fixture, SegmentedQueue_HP_mutex        ) \
869     CDSSTRESS_Queue_F( test_fixture, SegmentedQueue_HP_mutex_stat   ) \
870     CDSSTRESS_Queue_F( test_fixture, SegmentedQueue_DHP_spin        ) \
871     CDSSTRESS_Queue_F( test_fixture, SegmentedQueue_DHP_spin_stat   ) \
872     CDSSTRESS_Queue_F( test_fixture, SegmentedQueue_DHP_mutex       ) \
873     CDSSTRESS_Queue_F( test_fixture, SegmentedQueue_DHP_mutex_stat  ) \
874     CDSSTRESS_SegmentedQueue_1( test_fixture )
875
876 #define CDSSTRESS_VyukovQueue( test_fixture ) \
877     CDSSTRESS_Queue_F( test_fixture, VyukovMPMCCycleQueue_dyn       ) \
878     CDSSTRESS_Queue_F( test_fixture, VyukovMPMCCycleQueue_dyn_ic    )
879
880 #define CDSSTRESS_VyukovSingleConsumerQueue( test_fixture ) \
881     CDSSTRESS_Queue_F( test_fixture, VyukovMPSCCycleQueue_dyn       ) \
882     CDSSTRESS_Queue_F( test_fixture, VyukovMPSCCycleQueue_dyn_ic    )
883
884 #define CDSSTRESS_WeakRingBuffer( test_fixture ) \
885     CDSSTRESS_Queue_F( test_fixture, WeakRingBuffer_dyn       )
886
887 #define CDSSTRESS_WeakRingBuffer_void( test_fixture ) \
888     CDSSTRESS_Queue_F( test_fixture, WeakRingBuffer_void_dyn       )
889
890 #define CDSSTRESS_StdQueue( test_fixture ) \
891     CDSSTRESS_Queue_F( test_fixture, StdQueue_deque_Spinlock ) \
892     CDSSTRESS_Queue_F( test_fixture, StdQueue_list_Spinlock  ) \
893     CDSSTRESS_StdQueue_1( test_fixture ) \
894
895 #endif // #ifndef CDSSTRESS_QUEUE_TYPES_H