File: stack_type.h

package info (click to toggle)
libcds 2.3.3-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,632 kB
  • sloc: cpp: 135,002; ansic: 7,234; perl: 243; sh: 237; makefile: 6
file content (544 lines) | stat: -rw-r--r-- 25,440 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
// Copyright (c) 2006-2018 Maxim Khizhinsky
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)

#ifndef CDSSTRESS_STACK_TYPES_H
#define CDSSTRESS_STACK_TYPES_H

#include <cds/container/treiber_stack.h>
#include <cds/container/fcstack.h>
#include <cds/container/fcdeque.h>

#include <cds/gc/hp.h>
#include <cds/gc/dhp.h>

#include <mutex>
#include <cds/sync/spinlock.h>
#include <stack>
#include <list>
#include <vector>

#include <cds_test/stress_test.h>
#include <cds_test/stat_flat_combining_out.h>

namespace stack {

    namespace details {

        template <typename T, typename Traits=cds::container::fcdeque::traits>
        class FCDequeL: public cds::container::FCDeque<T, std::deque<T>, Traits >
        {
            typedef cds::container::FCDeque<T, std::deque<T>, Traits > base_class;
        public:
            FCDequeL()
            {}

            FCDequeL(
                unsigned int nCompactFactor     ///< Flat combining: publication list compacting factor
                ,unsigned int nCombinePassCount ///< Flat combining: number of combining passes for combiner thread
                )
                : base_class( nCompactFactor, nCombinePassCount )
            {}

            bool push( T const& v )
            {
                return base_class::push_front( v );
            }

            bool pop( T& v )
            {
                return base_class::pop_front( v );
            }
        };

        template <typename T, typename Traits=cds::container::fcdeque::traits>
        class FCDequeR: public cds::container::FCDeque<T, std::deque<T>, Traits >
        {
            typedef cds::container::FCDeque<T, std::deque<T>, Traits > base_class;
        public:
            FCDequeR()
            {}

            FCDequeR(
                unsigned int nCompactFactor     ///< Flat combining: publication list compacting factor
                ,unsigned int nCombinePassCount ///< Flat combining: number of combining passes for combiner thread
                )
                : base_class( nCompactFactor, nCombinePassCount )
            {}

            bool push( T const& v )
            {
                return base_class::push_back( v );
            }

            bool pop( T& v )
            {
                return base_class::pop_back( v );
            }
        };

        template < typename T, typename Stack, typename Lock>
        class StdStack
        {
            Stack   m_Impl;
            mutable Lock    m_Lock;
            cds::container::treiber_stack::empty_stat m_stat;

            typedef std::unique_lock<Lock>  unique_lock;

        public:
            bool push( T const& v )
            {
                unique_lock l( m_Lock );
                m_Impl.push( v );
                return true;
            }

            bool pop( T& v )
            {
                unique_lock l( m_Lock );
                if ( !m_Impl.empty()) {
                    v = m_Impl.top();
                    m_Impl.pop();
                    return true;
                }
                return false;
            }

            bool empty() const
            {
                unique_lock l( m_Lock );
                return m_Impl.empty();
            }

            cds::container::treiber_stack::empty_stat const& statistics() const
            {
                return m_stat;
            }
        };
    }

    template <typename T>
    struct Types {

    // TreiberStack
        typedef cds::container::TreiberStack< cds::gc::HP,  T > Treiber_HP;
        typedef cds::container::TreiberStack< cds::gc::DHP, T > Treiber_DHP;

        struct traits_Treiber_seqcst: public
            cds::container::treiber_stack::make_traits<
                cds::opt::memory_model<cds::opt::v::sequential_consistent>
            >::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Treiber_seqcst > Treiber_HP_seqcst;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Treiber_seqcst > Treiber_DHP_seqcst;

        struct traits_Treiber_stat: public
            cds::container::treiber_stack::make_traits<
                cds::opt::stat<cds::intrusive::treiber_stack::stat<> >
            >::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP, T, traits_Treiber_stat > Treiber_HP_stat;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Treiber_stat > Treiber_DHP_stat;

        struct traits_Treiber_yield: public
            cds::container::treiber_stack::make_traits<
                cds::opt::back_off<cds::backoff::yield>
                , cds::opt::memory_model<cds::opt::v::relaxed_ordering>
            >::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Treiber_yield > Treiber_HP_yield;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Treiber_yield > Treiber_DHP_yield;

        struct traits_Treiber_pause: public
            cds::container::treiber_stack::make_traits<
                cds::opt::back_off<cds::backoff::pause>
            >::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Treiber_pause > Treiber_HP_pause;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Treiber_pause > Treiber_DHP_pause;

        struct traits_Treiber_exp: public
            cds::container::treiber_stack::make_traits<
                cds::opt::back_off<
                    cds::backoff::make_exponential_t<cds::backoff::pause, cds::backoff::yield >
                >
            >::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Treiber_exp > Treiber_HP_exp;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Treiber_exp > Treiber_DHP_exp;


    // Elimination stack
        struct traits_Elimination_on : public
            cds::container::treiber_stack::make_traits <
                cds::opt::enable_elimination<true>
            > ::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_on > Elimination_HP;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_on > Elimination_DHP;

        struct traits_Elimination_stat : public
            cds::container::treiber_stack::make_traits <
                cds::opt::enable_elimination<true>
                ,cds::opt::stat<cds::intrusive::treiber_stack::stat<> >
            > ::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_stat > Elimination_HP_stat;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_stat > Elimination_DHP_stat;

        struct traits_Elimination_2ms: public
            cds::container::treiber_stack::make_traits <
                cds::opt::enable_elimination<true>
                ,cds::opt::elimination_backoff< cds::backoff::delay_of<2> >
            > ::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_2ms >  Elimination_HP_2ms;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_2ms >  Elimination_DHP_2ms;

        struct traits_Elimination_2ms_stat : public
            cds::container::treiber_stack::make_traits <
                cds::opt::enable_elimination<true>
                , cds::opt::elimination_backoff< cds::backoff::delay_of<2> >
                , cds::opt::stat<cds::intrusive::treiber_stack::stat<> >
            > ::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_2ms_stat > Elimination_HP_2ms_stat;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_2ms_stat > Elimination_DHP_2ms_stat;

        struct traits_Elimination_5ms : public
            cds::container::treiber_stack::make_traits <
                cds::opt::enable_elimination<true>
                , cds::opt::elimination_backoff< cds::backoff::delay_of<5> >
            > ::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_5ms > Elimination_HP_5ms;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_5ms > Elimination_DHP_5ms;

        struct traits_Elimination_5ms_stat : public
            cds::container::treiber_stack::make_traits <
                cds::opt::enable_elimination<true>
                , cds::opt::elimination_backoff< cds::backoff::delay_of<5> >
                , cds::opt::stat<cds::intrusive::treiber_stack::stat<> >
            > ::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_5ms_stat > Elimination_HP_5ms_stat;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_5ms_stat > Elimination_DHP_5ms_stat;

        struct traits_Elimination_10ms : public
            cds::container::treiber_stack::make_traits <
                cds::opt::enable_elimination<true>
                , cds::opt::elimination_backoff< cds::backoff::delay_of<10> >
            > ::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_10ms > Elimination_HP_10ms;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_10ms > Elimination_DHP_10ms;

        struct traits_Elimination_10ms_stat : public
            cds::container::treiber_stack::make_traits <
                cds::opt::enable_elimination<true>
                , cds::opt::elimination_backoff< cds::backoff::delay_of<10> >
                , cds::opt::stat<cds::intrusive::treiber_stack::stat<> >
            > ::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_10ms_stat > Elimination_HP_10ms_stat;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_10ms_stat > Elimination_DHP_10ms_stat;

        struct traits_Elimination_dyn: public
            cds::container::treiber_stack::make_traits <
                cds::opt::enable_elimination<true>
                , cds::opt::buffer< cds::opt::v::initialized_dynamic_buffer<int> >
            > ::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_dyn > Elimination_HP_dyn;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_dyn > Elimination_DHP_dyn;

        struct traits_Elimination_seqcst: public
            cds::container::treiber_stack::make_traits <
                cds::opt::enable_elimination<true>
                , cds::opt::memory_model<cds::opt::v::sequential_consistent>
            > ::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_seqcst > Elimination_HP_seqcst;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_seqcst > Elimination_DHP_seqcst;

        struct traits_Elimination_dyn_stat: public
            cds::container::treiber_stack::make_traits <
                cds::opt::enable_elimination<true>
                , cds::opt::stat<cds::intrusive::treiber_stack::stat<> >
                , cds::opt::buffer< cds::opt::v::initialized_dynamic_buffer<int> >
            > ::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_dyn_stat > Elimination_HP_dyn_stat;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_dyn_stat > Elimination_DHP_dyn_stat;

        struct traits_Elimination_yield: public
            cds::container::treiber_stack::make_traits <
                cds::opt::enable_elimination<true>
                , cds::opt::back_off<cds::backoff::yield>
                , cds::opt::memory_model<cds::opt::v::relaxed_ordering>
            > ::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_yield > Elimination_HP_yield;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_yield > Elimination_DHP_yield;

        struct traits_Elimination_pause: public
            cds::container::treiber_stack::make_traits <
                cds::opt::enable_elimination<true>
                , cds::opt::back_off<cds::backoff::pause>
            > ::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_pause > Elimination_HP_pause;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_pause > Elimination_DHP_pause;

        struct traits_Elimination_exp: public
            cds::container::treiber_stack::make_traits <
                cds::opt::enable_elimination<true>
                ,cds::opt::back_off<
                    cds::backoff::make_exponential_t< cds::backoff::pause, cds::backoff::yield >
                >
            > ::type
        {};
        typedef cds::container::TreiberStack< cds::gc::HP,  T, traits_Elimination_exp > Elimination_HP_exp;
        typedef cds::container::TreiberStack< cds::gc::DHP, T, traits_Elimination_exp > Elimination_DHP_exp;


    // FCStack
        typedef cds::container::FCStack< T > FCStack_deque;

        struct traits_FCStack_stat:
            public cds::container::fcstack::make_traits<
                cds::opt::stat< cds::container::fcstack::stat<> >
            >::type
        {};
        struct traits_FCStack_elimination:
            public cds::container::fcstack::make_traits<
            cds::opt::enable_elimination< true >
            >::type
        {};
        struct traits_FCStack_elimination_stat:
            public cds::container::fcstack::make_traits<
                cds::opt::stat< cds::container::fcstack::stat<> >,
                cds::opt::enable_elimination< true >
            >::type
        {};
        struct traits_FCStack_mutex:
            public cds::container::fcstack::make_traits<
                cds::opt::lock_type< std::mutex >
            >::type
        {};

        typedef cds::container::FCStack< T, std::stack<T, std::deque<T> >, traits_FCStack_mutex > FCStack_deque_mutex;
        typedef cds::container::FCStack< T, std::stack<T, std::deque<T> >, traits_FCStack_stat > FCStack_deque_stat;
        typedef cds::container::FCStack< T, std::stack<T, std::deque<T> >, traits_FCStack_elimination > FCStack_deque_elimination;
        typedef cds::container::FCStack< T, std::stack<T, std::deque<T> >, traits_FCStack_elimination_stat > FCStack_deque_elimination_stat;
        typedef cds::container::FCStack< T, std::stack<T, std::vector<T> > > FCStack_vector;
        typedef cds::container::FCStack< T, std::stack<T, std::vector<T> >, traits_FCStack_mutex > FCStack_vector_mutex;
        typedef cds::container::FCStack< T, std::stack<T, std::vector<T> >, traits_FCStack_stat > FCStack_vector_stat;
        typedef cds::container::FCStack< T, std::stack<T, std::vector<T> >, traits_FCStack_elimination > FCStack_vector_elimination;
        typedef cds::container::FCStack< T, std::stack<T, std::vector<T> >, traits_FCStack_elimination_stat > FCStack_vector_elimination_stat;
        typedef cds::container::FCStack< T, std::stack<T, std::list<T> > > FCStack_list;
        typedef cds::container::FCStack< T, std::stack<T, std::list<T> >, traits_FCStack_mutex > FCStack_list_mutex;
        typedef cds::container::FCStack< T, std::stack<T, std::list<T> >, traits_FCStack_stat > FCStack_list_stat;
        typedef cds::container::FCStack< T, std::stack<T, std::list<T> >, traits_FCStack_elimination > FCStack_list_elimination;
        typedef cds::container::FCStack< T, std::stack<T, std::list<T> >, traits_FCStack_elimination_stat > FCStack_list_elimination_stat;

   // FCDeque
        struct traits_FCDeque_stat:
            public cds::container::fcdeque::make_traits<
                cds::opt::stat< cds::container::fcdeque::stat<> >
            >::type
        {};
        struct traits_FCDeque_elimination:
            public cds::container::fcdeque::make_traits<
                cds::opt::enable_elimination< true >
            >::type
        {};
        struct traits_FCDeque_elimination_stat:
            public cds::container::fcdeque::make_traits<
                cds::opt::stat< cds::container::fcdeque::stat<> >,
                cds::opt::enable_elimination< true >
            >::type
        {};
        struct traits_FCDeque_mutex:
            public cds::container::fcdeque::make_traits<
                cds::opt::lock_type< std::mutex >
            >::type
        {};


        typedef details::FCDequeL< T > FCDequeL_default;
        typedef details::FCDequeL< T, traits_FCDeque_mutex > FCDequeL_mutex;
        typedef details::FCDequeL< T, traits_FCDeque_stat > FCDequeL_stat;
        typedef details::FCDequeL< T, traits_FCDeque_elimination > FCDequeL_elimination;
        typedef details::FCDequeL< T, traits_FCDeque_elimination_stat > FCDequeL_elimination_stat;

        typedef details::FCDequeR< T > FCDequeR_default;
        typedef details::FCDequeR< T, traits_FCDeque_mutex > FCDequeR_mutex;
        typedef details::FCDequeR< T, traits_FCDeque_stat > FCDequeR_stat;
        typedef details::FCDequeR< T, traits_FCDeque_elimination > FCDequeR_elimination;
        typedef details::FCDequeR< T, traits_FCDeque_elimination_stat > FCDequeR_elimination_stat;


        // std::stack
        typedef details::StdStack< T, std::stack< T >, std::mutex >  StdStack_Deque_Mutex;
        typedef details::StdStack< T, std::stack< T >, cds::sync::spin > StdStack_Deque_Spin;
        typedef details::StdStack< T, std::stack< T, std::vector<T> >, std::mutex >  StdStack_Vector_Mutex;
        typedef details::StdStack< T, std::stack< T, std::vector<T> >, cds::sync::spin > StdStack_Vector_Spin;
        typedef details::StdStack< T, std::stack< T, std::list<T> >, std::mutex >  StdStack_List_Mutex;
        typedef details::StdStack< T, std::stack< T, std::list<T> >, cds::sync::spin > StdStack_List_Spin;

    };
} // namespace stack

namespace cds_test {
    static inline property_stream& operator <<( property_stream& o, cds::container::treiber_stack::empty_stat const& )
    {
        return o;
    }

    static inline property_stream& operator <<( property_stream& o, cds::container::treiber_stack::stat<> const& s )
    {
        return o
            << CDSSTRESS_STAT_OUT( s, m_PushCount )
            << CDSSTRESS_STAT_OUT( s, m_PopCount  )
            << CDSSTRESS_STAT_OUT( s, m_PushRace  )
            << CDSSTRESS_STAT_OUT( s, m_PopRace   )
            << CDSSTRESS_STAT_OUT( s, m_ActivePushCollision  )
            << CDSSTRESS_STAT_OUT( s, m_PassivePopCollision  )
            << CDSSTRESS_STAT_OUT( s, m_ActivePopCollision   )
            << CDSSTRESS_STAT_OUT( s, m_PassivePushCollision )
            << CDSSTRESS_STAT_OUT( s, m_EliminationFailed    );
    }

    static inline property_stream& operator <<( property_stream& o, cds::container::fcstack::empty_stat const& /*s*/ )
    {
        return o;
    }

    static inline property_stream& operator <<( property_stream& o, cds::container::fcstack::stat<> const& s )
    {
        return o
            << CDSSTRESS_STAT_OUT( s, m_nPush )
            << CDSSTRESS_STAT_OUT( s, m_nPushMove )
            << CDSSTRESS_STAT_OUT( s, m_nPop )
            << CDSSTRESS_STAT_OUT( s, m_nFailedPop )
            << CDSSTRESS_STAT_OUT( s, m_nCollided )
            << static_cast<cds::algo::flat_combining::stat<> const&>( s );
    }

    static inline property_stream& operator <<( property_stream& o, cds::container::fcdeque::empty_stat const& /*s*/ )
    {
        return o;
    }

    static inline property_stream& operator <<( property_stream& o, cds::container::fcdeque::stat<> const& s )
    {
        return o
            << CDSSTRESS_STAT_OUT( s, m_nPushFront )
            << CDSSTRESS_STAT_OUT( s, m_nPushFrontMove )
            << CDSSTRESS_STAT_OUT( s, m_nPushBack )
            << CDSSTRESS_STAT_OUT( s, m_nPushBackMove )
            << CDSSTRESS_STAT_OUT( s, m_nPopFront )
            << CDSSTRESS_STAT_OUT( s, m_nFailedPopFront )
            << CDSSTRESS_STAT_OUT( s, m_nPopBack )
            << CDSSTRESS_STAT_OUT( s, m_nFailedPopBack )
            << CDSSTRESS_STAT_OUT( s, m_nCollided )
            << static_cast<cds::algo::flat_combining::stat<> const&>(s);
    }
} // namespace cds_test

#define CDSSTRESS_Stack_F( test_fixture, type_name ) \
    TEST_F( test_fixture, type_name ) \
    { \
        typedef stack::Types< value_type >::type_name stack_type; \
        stack_type stack; \
        test( stack ); \
    }

#define CDSSTRESS_EliminationStack_F( test_fixture, type_name ) \
    TEST_F( test_fixture, type_name ) \
    { \
        typedef stack::Types< value_type >::type_name stack_type; \
        stack_type stack( s_nEliminationSize ); \
        test_elimination( stack ); \
    }

#define CDSSTRESS_TreiberStack( test_fixture ) \
    CDSSTRESS_Stack_F( test_fixture, Treiber_HP )        \
    CDSSTRESS_Stack_F( test_fixture, Treiber_HP_seqcst ) \
    CDSSTRESS_Stack_F( test_fixture, Treiber_HP_pause )  \
    CDSSTRESS_Stack_F( test_fixture, Treiber_HP_exp )    \
    CDSSTRESS_Stack_F( test_fixture, Treiber_HP_stat   ) \
    CDSSTRESS_Stack_F( test_fixture, Treiber_DHP       ) \
    CDSSTRESS_Stack_F( test_fixture, Treiber_DHP_pause ) \
    CDSSTRESS_Stack_F( test_fixture, Treiber_DHP_exp   ) \
    CDSSTRESS_Stack_F( test_fixture, Treiber_DHP_stat  ) \

#define CDSSTRESS_EliminationStack( test_fixture ) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_HP        ) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_HP_2ms    ) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_HP_2ms_stat) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_HP_5ms    ) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_HP_5ms_stat) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_HP_10ms    ) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_HP_10ms_stat) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_HP_seqcst ) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_HP_pause  ) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_HP_exp    ) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_HP_stat   ) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_HP_dyn    ) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_HP_dyn_stat) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_DHP       ) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_DHP_2ms    ) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_DHP_2ms_stat) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_DHP_5ms    ) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_DHP_5ms_stat) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_DHP_10ms    ) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_DHP_10ms_stat) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_DHP_pause ) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_DHP_exp   ) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_DHP_stat  ) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_DHP_dyn   ) \
    CDSSTRESS_EliminationStack_F( test_fixture, Elimination_DHP_dyn_stat)

#define CDSSTRESS_FCStack( test_fixture ) \
    CDSSTRESS_Stack_F( test_fixture, FCStack_deque ) \
    CDSSTRESS_Stack_F( test_fixture, FCStack_deque_mutex ) \
    CDSSTRESS_Stack_F( test_fixture, FCStack_deque_stat ) \
    CDSSTRESS_Stack_F( test_fixture, FCStack_deque_elimination ) \
    CDSSTRESS_Stack_F( test_fixture, FCStack_deque_elimination_stat ) \
    CDSSTRESS_Stack_F( test_fixture, FCStack_vector ) \
    CDSSTRESS_Stack_F( test_fixture, FCStack_vector_mutex ) \
    CDSSTRESS_Stack_F( test_fixture, FCStack_vector_stat ) \
    CDSSTRESS_Stack_F( test_fixture, FCStack_vector_elimination ) \
    CDSSTRESS_Stack_F( test_fixture, FCStack_vector_elimination_stat ) \
    CDSSTRESS_Stack_F( test_fixture, FCStack_list ) \
    CDSSTRESS_Stack_F( test_fixture, FCStack_list_mutex ) \
    CDSSTRESS_Stack_F( test_fixture, FCStack_list_stat ) \
    CDSSTRESS_Stack_F( test_fixture, FCStack_list_elimination ) \
    CDSSTRESS_Stack_F( test_fixture, FCStack_list_elimination_stat )

#define CDSSTRESS_FCDeque( test_fixture ) \
    CDSSTRESS_Stack_F( test_fixture, FCDequeL_default ) \
    CDSSTRESS_Stack_F( test_fixture, FCDequeL_mutex ) \
    CDSSTRESS_Stack_F( test_fixture, FCDequeL_stat ) \
    CDSSTRESS_Stack_F( test_fixture, FCDequeL_elimination ) \
    CDSSTRESS_Stack_F( test_fixture, FCDequeL_elimination_stat ) \
    CDSSTRESS_Stack_F( test_fixture, FCDequeR_default ) \
    CDSSTRESS_Stack_F( test_fixture, FCDequeR_mutex ) \
    CDSSTRESS_Stack_F( test_fixture, FCDequeR_stat ) \
    CDSSTRESS_Stack_F( test_fixture, FCDequeR_elimination ) \
    CDSSTRESS_Stack_F( test_fixture, FCDequeR_elimination_stat )

#define CDSSTRESS_StdStack( test_fixture ) \
    CDSSTRESS_Stack_F( test_fixture, StdStack_Deque_Mutex  ) \
    CDSSTRESS_Stack_F( test_fixture, StdStack_Deque_Spin   ) \
    CDSSTRESS_Stack_F( test_fixture, StdStack_Vector_Mutex ) \
    CDSSTRESS_Stack_F( test_fixture, StdStack_Vector_Spin  ) \
    CDSSTRESS_Stack_F( test_fixture, StdStack_List_Mutex   ) \
    CDSSTRESS_Stack_F( test_fixture, StdStack_List_Spin    )


#endif // #ifndef CDSSTRESS_STACK_TYPES_H