Uses different pass count for different parallel queue test cases
[libcds.git] / test / stress / stack / stack_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_STACK_TYPES_H
32 #define CDSSTRESS_STACK_TYPES_H
33
34 #include <cds/container/treiber_stack.h>
35 #include <cds/container/fcstack.h>
36 #include <cds/container/fcdeque.h>
37
38 #include <cds/gc/hp.h>
39 #include <cds/gc/dhp.h>
40
41 #include <mutex>
42 #include <cds/sync/spinlock.h>
43 #include <stack>
44 #include <list>
45 #include <vector>
46
47 #include <cds_test/stress_test.h>
48 #include <cds_test/stat_flat_combining_out.h>
49
50 namespace stack {
51
52     namespace details {
53
54         template <typename T, typename Traits=cds::container::fcdeque::traits>
55         class FCDequeL: public cds::container::FCDeque<T, std::deque<T>, Traits >
56         {
57             typedef cds::container::FCDeque<T, std::deque<T>, Traits > base_class;
58         public:
59             FCDequeL()
60             {}
61
62             FCDequeL(
63                 unsigned int nCompactFactor     ///< Flat combining: publication list compacting factor
64                 ,unsigned int nCombinePassCount ///< Flat combining: number of combining passes for combiner thread
65                 )
66                 : base_class( nCompactFactor, nCombinePassCount )
67             {}
68
69             bool push( T const& v )
70             {
71                 return base_class::push_front( v );
72             }
73
74             bool pop( T& v )
75             {
76                 return base_class::pop_front( v );
77             }
78         };
79
80         template <typename T, typename Traits=cds::container::fcdeque::traits>
81         class FCDequeR: public cds::container::FCDeque<T, std::deque<T>, Traits >
82         {
83             typedef cds::container::FCDeque<T, std::deque<T>, Traits > base_class;
84         public:
85             FCDequeR()
86             {}
87
88             FCDequeR(
89                 unsigned int nCompactFactor     ///< Flat combining: publication list compacting factor
90                 ,unsigned int nCombinePassCount ///< Flat combining: number of combining passes for combiner thread
91                 )
92                 : base_class( nCompactFactor, nCombinePassCount )
93             {}
94
95             bool push( T const& v )
96             {
97                 return base_class::push_back( v );
98             }
99
100             bool pop( T& v )
101             {
102                 return base_class::pop_back( v );
103             }
104         };
105
106         template < typename T, typename Stack, typename Lock>
107         class StdStack
108         {
109             Stack   m_Impl;
110             mutable Lock    m_Lock;
111             cds::container::treiber_stack::empty_stat m_stat;
112
113             typedef std::unique_lock<Lock>  unique_lock;
114
115         public:
116             bool push( T const& v )
117             {
118                 unique_lock l( m_Lock );
119                 m_Impl.push( v );
120                 return true;
121             }
122
123             bool pop( T& v )
124             {
125                 unique_lock l( m_Lock );
126                 if ( !m_Impl.empty()) {
127                     v = m_Impl.top();
128                     m_Impl.pop();
129                     return true;
130                 }
131                 return false;
132             }
133
134             bool empty() const
135             {
136                 unique_lock l( m_Lock );
137                 return m_Impl.empty();
138             }
139
140             cds::container::treiber_stack::empty_stat const& statistics() const
141             {
142                 return m_stat;
143             }
144         };
145     }
146
147     template <typename T>
148     struct Types {
149
150     // TreiberStack
151         typedef cds::container::TreiberStack< cds::gc::HP,  T > Treiber_HP;
152         typedef cds::container::TreiberStack< cds::gc::DHP, T > Treiber_DHP;
153
154         struct traits_Treiber_seqcst: public
155             cds::container::treiber_stack::make_traits<
156                 cds::opt::memory_model<cds::opt::v::sequential_consistent>
157             >::type
158         {};
159         typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Treiber_seqcst > Treiber_HP_seqcst;
160         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Treiber_seqcst > Treiber_DHP_seqcst;
161
162         struct traits_Treiber_stat: public
163             cds::container::treiber_stack::make_traits<
164                 cds::opt::stat<cds::intrusive::treiber_stack::stat<> >
165             >::type
166         {};
167         typedef cds::container::TreiberStack< cds::gc::HP, T, traits_Treiber_stat > Treiber_HP_stat;
168         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Treiber_stat > Treiber_DHP_stat;
169
170         struct traits_Treiber_yield: public
171             cds::container::treiber_stack::make_traits<
172                 cds::opt::back_off<cds::backoff::yield>
173                 , cds::opt::memory_model<cds::opt::v::relaxed_ordering>
174             >::type
175         {};
176         typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Treiber_yield > Treiber_HP_yield;
177         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Treiber_yield > Treiber_DHP_yield;
178
179         struct traits_Treiber_pause: public
180             cds::container::treiber_stack::make_traits<
181                 cds::opt::back_off<cds::backoff::pause>
182             >::type
183         {};
184         typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Treiber_pause > Treiber_HP_pause;
185         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Treiber_pause > Treiber_DHP_pause;
186
187         struct traits_Treiber_exp: public
188             cds::container::treiber_stack::make_traits<
189                 cds::opt::back_off<
190                     cds::backoff::make_exponential_t<cds::backoff::pause, cds::backoff::yield >
191                 >
192             >::type
193         {};
194         typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Treiber_exp > Treiber_HP_exp;
195         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Treiber_exp > Treiber_DHP_exp;
196
197
198     // Elimination stack
199         struct traits_Elimination_on : public
200             cds::container::treiber_stack::make_traits <
201                 cds::opt::enable_elimination<true>
202             > ::type
203         {};
204         typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_on > Elimination_HP;
205         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_on > Elimination_DHP;
206
207         struct traits_Elimination_stat : public
208             cds::container::treiber_stack::make_traits <
209                 cds::opt::enable_elimination<true>
210                 ,cds::opt::stat<cds::intrusive::treiber_stack::stat<> >
211             > ::type
212         {};
213         typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_stat > Elimination_HP_stat;
214         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_stat > Elimination_DHP_stat;
215
216         struct traits_Elimination_2ms: public
217             cds::container::treiber_stack::make_traits <
218                 cds::opt::enable_elimination<true>
219                 ,cds::opt::elimination_backoff< cds::backoff::delay_of<2> >
220             > ::type
221         {};
222         typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_2ms >  Elimination_HP_2ms;
223         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_2ms >  Elimination_DHP_2ms;
224
225         struct traits_Elimination_2ms_stat : public
226             cds::container::treiber_stack::make_traits <
227                 cds::opt::enable_elimination<true>
228                 , cds::opt::elimination_backoff< cds::backoff::delay_of<2> >
229                 , cds::opt::stat<cds::intrusive::treiber_stack::stat<> >
230             > ::type
231         {};
232         typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_2ms_stat > Elimination_HP_2ms_stat;
233         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_2ms_stat > Elimination_DHP_2ms_stat;
234
235         struct traits_Elimination_5ms : public
236             cds::container::treiber_stack::make_traits <
237                 cds::opt::enable_elimination<true>
238                 , cds::opt::elimination_backoff< cds::backoff::delay_of<5> >
239             > ::type
240         {};
241         typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_5ms > Elimination_HP_5ms;
242         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_5ms > Elimination_DHP_5ms;
243
244         struct traits_Elimination_5ms_stat : public
245             cds::container::treiber_stack::make_traits <
246                 cds::opt::enable_elimination<true>
247                 , cds::opt::elimination_backoff< cds::backoff::delay_of<5> >
248                 , cds::opt::stat<cds::intrusive::treiber_stack::stat<> >
249             > ::type
250         {};
251         typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_5ms_stat > Elimination_HP_5ms_stat;
252         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_5ms_stat > Elimination_DHP_5ms_stat;
253
254         struct traits_Elimination_10ms : public
255             cds::container::treiber_stack::make_traits <
256                 cds::opt::enable_elimination<true>
257                 , cds::opt::elimination_backoff< cds::backoff::delay_of<10> >
258             > ::type
259         {};
260         typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_10ms > Elimination_HP_10ms;
261         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_10ms > Elimination_DHP_10ms;
262
263         struct traits_Elimination_10ms_stat : public
264             cds::container::treiber_stack::make_traits <
265                 cds::opt::enable_elimination<true>
266                 , cds::opt::elimination_backoff< cds::backoff::delay_of<10> >
267                 , cds::opt::stat<cds::intrusive::treiber_stack::stat<> >
268             > ::type
269         {};
270         typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_10ms_stat > Elimination_HP_10ms_stat;
271         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_10ms_stat > Elimination_DHP_10ms_stat;
272
273         struct traits_Elimination_dyn: public
274             cds::container::treiber_stack::make_traits <
275                 cds::opt::enable_elimination<true>
276                 , cds::opt::buffer< cds::opt::v::initialized_dynamic_buffer<int> >
277             > ::type
278         {};
279         typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_dyn > Elimination_HP_dyn;
280         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_dyn > Elimination_DHP_dyn;
281
282         struct traits_Elimination_seqcst: public
283             cds::container::treiber_stack::make_traits <
284                 cds::opt::enable_elimination<true>
285                 , cds::opt::memory_model<cds::opt::v::sequential_consistent>
286             > ::type
287         {};
288         typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_seqcst > Elimination_HP_seqcst;
289         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_seqcst > Elimination_DHP_seqcst;
290
291         struct traits_Elimination_dyn_stat: public
292             cds::container::treiber_stack::make_traits <
293                 cds::opt::enable_elimination<true>
294                 , cds::opt::stat<cds::intrusive::treiber_stack::stat<> >
295                 , cds::opt::buffer< cds::opt::v::initialized_dynamic_buffer<int> >
296             > ::type
297         {};
298         typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_dyn_stat > Elimination_HP_dyn_stat;
299         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_dyn_stat > Elimination_DHP_dyn_stat;
300
301         struct traits_Elimination_yield: public
302             cds::container::treiber_stack::make_traits <
303                 cds::opt::enable_elimination<true>
304                 , cds::opt::back_off<cds::backoff::yield>
305                 , cds::opt::memory_model<cds::opt::v::relaxed_ordering>
306             > ::type
307         {};
308         typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_yield > Elimination_HP_yield;
309         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_yield > Elimination_DHP_yield;
310
311         struct traits_Elimination_pause: public
312             cds::container::treiber_stack::make_traits <
313                 cds::opt::enable_elimination<true>
314                 , cds::opt::back_off<cds::backoff::pause>
315             > ::type
316         {};
317         typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_pause > Elimination_HP_pause;
318         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_pause > Elimination_DHP_pause;
319
320         struct traits_Elimination_exp: public
321             cds::container::treiber_stack::make_traits <
322                 cds::opt::enable_elimination<true>
323                 ,cds::opt::back_off<
324                     cds::backoff::make_exponential_t< cds::backoff::pause, cds::backoff::yield >
325                 >
326             > ::type
327         {};
328         typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_exp > Elimination_HP_exp;
329         typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_exp > Elimination_DHP_exp;
330
331
332     // FCStack
333         typedef cds::container::FCStack< T > FCStack_deque;
334
335         struct traits_FCStack_stat:
336             public cds::container::fcstack::make_traits<
337                 cds::opt::stat< cds::container::fcstack::stat<> >
338             >::type
339         {};
340         struct traits_FCStack_elimination:
341             public cds::container::fcstack::make_traits<
342             cds::opt::enable_elimination< true >
343             >::type
344         {};
345         struct traits_FCStack_elimination_stat:
346             public cds::container::fcstack::make_traits<
347                 cds::opt::stat< cds::container::fcstack::stat<> >,
348                 cds::opt::enable_elimination< true >
349             >::type
350         {};
351         struct traits_FCStack_mutex:
352             public cds::container::fcstack::make_traits<
353                 cds::opt::lock_type< std::mutex >
354             >::type
355         {};
356
357         typedef cds::container::FCStack< T, std::stack<T, std::deque<T> >, traits_FCStack_mutex > FCStack_deque_mutex;
358         typedef cds::container::FCStack< T, std::stack<T, std::deque<T> >, traits_FCStack_stat > FCStack_deque_stat;
359         typedef cds::container::FCStack< T, std::stack<T, std::deque<T> >, traits_FCStack_elimination > FCStack_deque_elimination;
360         typedef cds::container::FCStack< T, std::stack<T, std::deque<T> >, traits_FCStack_elimination_stat > FCStack_deque_elimination_stat;
361         typedef cds::container::FCStack< T, std::stack<T, std::vector<T> > > FCStack_vector;
362         typedef cds::container::FCStack< T, std::stack<T, std::vector<T> >, traits_FCStack_mutex > FCStack_vector_mutex;
363         typedef cds::container::FCStack< T, std::stack<T, std::vector<T> >, traits_FCStack_stat > FCStack_vector_stat;
364         typedef cds::container::FCStack< T, std::stack<T, std::vector<T> >, traits_FCStack_elimination > FCStack_vector_elimination;
365         typedef cds::container::FCStack< T, std::stack<T, std::vector<T> >, traits_FCStack_elimination_stat > FCStack_vector_elimination_stat;
366         typedef cds::container::FCStack< T, std::stack<T, std::list<T> > > FCStack_list;
367         typedef cds::container::FCStack< T, std::stack<T, std::list<T> >, traits_FCStack_mutex > FCStack_list_mutex;
368         typedef cds::container::FCStack< T, std::stack<T, std::list<T> >, traits_FCStack_stat > FCStack_list_stat;
369         typedef cds::container::FCStack< T, std::stack<T, std::list<T> >, traits_FCStack_elimination > FCStack_list_elimination;
370         typedef cds::container::FCStack< T, std::stack<T, std::list<T> >, traits_FCStack_elimination_stat > FCStack_list_elimination_stat;
371
372    // FCDeque
373         struct traits_FCDeque_stat:
374             public cds::container::fcdeque::make_traits<
375                 cds::opt::stat< cds::container::fcdeque::stat<> >
376             >::type
377         {};
378         struct traits_FCDeque_elimination:
379             public cds::container::fcdeque::make_traits<
380                 cds::opt::enable_elimination< true >
381             >::type
382         {};
383         struct traits_FCDeque_elimination_stat:
384             public cds::container::fcdeque::make_traits<
385                 cds::opt::stat< cds::container::fcdeque::stat<> >,
386                 cds::opt::enable_elimination< true >
387             >::type
388         {};
389         struct traits_FCDeque_mutex:
390             public cds::container::fcdeque::make_traits<
391                 cds::opt::lock_type< std::mutex >
392             >::type
393         {};
394
395
396         typedef details::FCDequeL< T > FCDequeL_default;
397         typedef details::FCDequeL< T, traits_FCDeque_mutex > FCDequeL_mutex;
398         typedef details::FCDequeL< T, traits_FCDeque_stat > FCDequeL_stat;
399         typedef details::FCDequeL< T, traits_FCDeque_elimination > FCDequeL_elimination;
400         typedef details::FCDequeL< T, traits_FCDeque_elimination_stat > FCDequeL_elimination_stat;
401
402         typedef details::FCDequeR< T > FCDequeR_default;
403         typedef details::FCDequeR< T, traits_FCDeque_mutex > FCDequeR_mutex;
404         typedef details::FCDequeR< T, traits_FCDeque_stat > FCDequeR_stat;
405         typedef details::FCDequeR< T, traits_FCDeque_elimination > FCDequeR_elimination;
406         typedef details::FCDequeR< T, traits_FCDeque_elimination_stat > FCDequeR_elimination_stat;
407
408
409         // std::stack
410         typedef details::StdStack< T, std::stack< T >, std::mutex >  StdStack_Deque_Mutex;
411         typedef details::StdStack< T, std::stack< T >, cds::sync::spin > StdStack_Deque_Spin;
412         typedef details::StdStack< T, std::stack< T, std::vector<T> >, std::mutex >  StdStack_Vector_Mutex;
413         typedef details::StdStack< T, std::stack< T, std::vector<T> >, cds::sync::spin > StdStack_Vector_Spin;
414         typedef details::StdStack< T, std::stack< T, std::list<T> >, std::mutex >  StdStack_List_Mutex;
415         typedef details::StdStack< T, std::stack< T, std::list<T> >, cds::sync::spin > StdStack_List_Spin;
416
417     };
418 } // namespace stack
419
420 namespace cds_test {
421     static inline property_stream& operator <<( property_stream& o, cds::container::treiber_stack::empty_stat const& )
422     {
423         return o;
424     }
425
426     static inline property_stream& operator <<( property_stream& o, cds::container::treiber_stack::stat<> const& s )
427     {
428         return o
429             << CDSSTRESS_STAT_OUT( s, m_PushCount )
430             << CDSSTRESS_STAT_OUT( s, m_PopCount  )
431             << CDSSTRESS_STAT_OUT( s, m_PushRace  )
432             << CDSSTRESS_STAT_OUT( s, m_PopRace   )
433             << CDSSTRESS_STAT_OUT( s, m_ActivePushCollision  )
434             << CDSSTRESS_STAT_OUT( s, m_PassivePopCollision  )
435             << CDSSTRESS_STAT_OUT( s, m_ActivePopCollision   )
436             << CDSSTRESS_STAT_OUT( s, m_PassivePushCollision )
437             << CDSSTRESS_STAT_OUT( s, m_EliminationFailed    );
438     }
439
440     static inline property_stream& operator <<( property_stream& o, cds::container::fcstack::empty_stat const& /*s*/ )
441     {
442         return o;
443     }
444
445     static inline property_stream& operator <<( property_stream& o, cds::container::fcstack::stat<> const& s )
446     {
447         return o
448             << CDSSTRESS_STAT_OUT( s, m_nPush )
449             << CDSSTRESS_STAT_OUT( s, m_nPushMove )
450             << CDSSTRESS_STAT_OUT( s, m_nPop )
451             << CDSSTRESS_STAT_OUT( s, m_nFailedPop )
452             << CDSSTRESS_STAT_OUT( s, m_nCollided )
453             << static_cast<cds::algo::flat_combining::stat<> const&>( s );
454     }
455
456     static inline property_stream& operator <<( property_stream& o, cds::container::fcdeque::empty_stat const& /*s*/ )
457     {
458         return o;
459     }
460
461     static inline property_stream& operator <<( property_stream& o, cds::container::fcdeque::stat<> const& s )
462     {
463         return o
464             << CDSSTRESS_STAT_OUT( s, m_nPushFront )
465             << CDSSTRESS_STAT_OUT( s, m_nPushFrontMove )
466             << CDSSTRESS_STAT_OUT( s, m_nPushBack )
467             << CDSSTRESS_STAT_OUT( s, m_nPushBackMove )
468             << CDSSTRESS_STAT_OUT( s, m_nPopFront )
469             << CDSSTRESS_STAT_OUT( s, m_nFailedPopFront )
470             << CDSSTRESS_STAT_OUT( s, m_nPopBack )
471             << CDSSTRESS_STAT_OUT( s, m_nFailedPopBack )
472             << CDSSTRESS_STAT_OUT( s, m_nCollided )
473             << static_cast<cds::algo::flat_combining::stat<> const&>(s);
474     }
475 } // namespace cds_test
476
477 #define CDSSTRESS_Stack_F( test_fixture, type_name ) \
478     TEST_F( test_fixture, type_name ) \
479     { \
480         typedef stack::Types< value_type >::type_name stack_type; \
481         stack_type stack; \
482         test( stack ); \
483     }
484
485 #define CDSSTRESS_EliminationStack_F( test_fixture, type_name ) \
486     TEST_F( test_fixture, type_name ) \
487     { \
488         typedef stack::Types< value_type >::type_name stack_type; \
489         stack_type stack( s_nEliminationSize ); \
490         test_elimination( stack ); \
491     }
492
493 #define CDSSTRESS_TreiberStack( test_fixture ) \
494     CDSSTRESS_Stack_F( test_fixture, Treiber_HP )        \
495     CDSSTRESS_Stack_F( test_fixture, Treiber_HP_pause )  \
496     CDSSTRESS_Stack_F( test_fixture, Treiber_HP_exp )    \
497     CDSSTRESS_Stack_F( test_fixture, Treiber_DHP       ) \
498     CDSSTRESS_Stack_F( test_fixture, Treiber_DHP_pause ) \
499     CDSSTRESS_Stack_F( test_fixture, Treiber_DHP_exp   )
500
501 #define CDSSTRESS_EliminationStack( test_fixture ) \
502     CDSSTRESS_EliminationStack_F( test_fixture, Elimination_HP        ) \
503     CDSSTRESS_EliminationStack_F( test_fixture, Elimination_HP_pause  ) \
504     CDSSTRESS_EliminationStack_F( test_fixture, Elimination_HP_exp    ) \
505     CDSSTRESS_EliminationStack_F( test_fixture, Elimination_HP_dyn    ) \
506     CDSSTRESS_EliminationStack_F( test_fixture, Elimination_DHP       ) \
507     CDSSTRESS_EliminationStack_F( test_fixture, Elimination_DHP_pause ) \
508     CDSSTRESS_EliminationStack_F( test_fixture, Elimination_DHP_exp   ) \
509     CDSSTRESS_EliminationStack_F( test_fixture, Elimination_DHP_dyn   )
510
511 #define CDSSTRESS_FCStack( test_fixture ) \
512     CDSSTRESS_Stack_F( test_fixture, FCStack_deque ) \
513     CDSSTRESS_Stack_F( test_fixture, FCStack_deque_mutex ) \
514     CDSSTRESS_Stack_F( test_fixture, FCStack_deque_elimination ) \
515     CDSSTRESS_Stack_F( test_fixture, FCStack_vector ) \
516     CDSSTRESS_Stack_F( test_fixture, FCStack_vector_mutex ) \
517     CDSSTRESS_Stack_F( test_fixture, FCStack_vector_elimination ) \
518     CDSSTRESS_Stack_F( test_fixture, FCStack_list ) \
519     CDSSTRESS_Stack_F( test_fixture, FCStack_list_mutex ) \
520     CDSSTRESS_Stack_F( test_fixture, FCStack_list_elimination )
521
522 #define CDSSTRESS_FCDeque( test_fixture ) \
523     CDSSTRESS_Stack_F( test_fixture, FCDequeL_default ) \
524     CDSSTRESS_Stack_F( test_fixture, FCDequeL_mutex ) \
525     CDSSTRESS_Stack_F( test_fixture, FCDequeL_elimination ) \
526     CDSSTRESS_Stack_F( test_fixture, FCDequeR_default ) \
527     CDSSTRESS_Stack_F( test_fixture, FCDequeR_mutex ) \
528     CDSSTRESS_Stack_F( test_fixture, FCDequeR_elimination )
529
530 #define CDSSTRESS_StdStack( test_fixture ) \
531     CDSSTRESS_Stack_F( test_fixture, StdStack_Deque_Mutex  ) \
532     CDSSTRESS_Stack_F( test_fixture, StdStack_Deque_Spin   ) \
533     CDSSTRESS_Stack_F( test_fixture, StdStack_Vector_Mutex ) \
534     CDSSTRESS_Stack_F( test_fixture, StdStack_Vector_Spin  ) \
535     CDSSTRESS_Stack_F( test_fixture, StdStack_List_Mutex   ) \
536     CDSSTRESS_Stack_F( test_fixture, StdStack_List_Spin    )
537
538
539 #endif // #ifndef CDSSTRESS_STACK_TYPES_H