Merge branch 'flat_combinig_add_stress_and_unint_tests' of https://github.com/mgalimu...
[libcds.git] / test / stress / queue / queue_type.h
index ca98c2ea79295d0d5c25e9f0ebf3c9dba381adb4..3a8af179cd7f3428bf22dfeddfe630a5aff61647 100644 (file)
@@ -1,7 +1,7 @@
 /*
     This file is a part of libcds - Concurrent Data Structures library
 
-    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
 
     Source code repo: http://github.com/khizmax/libcds/
     Download: http://sourceforge.net/projects/libcds/files/
@@ -46,7 +46,6 @@
 
 #include "std_queue.h"
 #include "lock/win32_lock.h"
-#include "framework/michael_alloc.h"
 
 #include <boost/container/deque.hpp>
 
@@ -188,15 +187,6 @@ namespace fc_details{
         typedef cds::container::MoirQueue<cds::gc::HP, Value > MoirQueue_HP;
         typedef cds::container::MoirQueue<cds::gc::DHP, Value > MoirQueue_DHP;
 
-        struct traits_MSQueue_michaelAlloc : public cds::container::msqueue::traits
-        {
-            typedef memory::MichaelAllocator<int>  allocator;
-        };
-        typedef cds::container::MSQueue<cds::gc::HP,  Value, traits_MSQueue_michaelAlloc > MSQueue_HP_michaelAlloc;
-        typedef cds::container::MSQueue<cds::gc::DHP, Value, traits_MSQueue_michaelAlloc > MSQueue_DHP_michaelAlloc;
-        typedef cds::container::MoirQueue<cds::gc::HP, Value, traits_MSQueue_michaelAlloc > MoirQueue_HP_michaelAlloc;
-        typedef cds::container::MoirQueue<cds::gc::DHP, Value, traits_MSQueue_michaelAlloc > MoirQueue_DHP_michaelAlloc;
-
         struct traits_MSQueue_seqcst : public
             cds::container::msqueue::make_traits <
                 cds::opt::memory_model < cds::opt::v::sequential_consistent >
@@ -234,13 +224,6 @@ namespace fc_details{
         typedef cds::container::OptimisticQueue< cds::gc::HP, Value > OptimisticQueue_HP;
         typedef cds::container::OptimisticQueue< cds::gc::DHP, Value > OptimisticQueue_DHP;
 
-        struct traits_OptimisticQueue_michaelAlloc : public cds::container::optimistic_queue::traits
-        {
-            typedef memory::MichaelAllocator<int> allocator;
-        };
-        typedef cds::container::OptimisticQueue< cds::gc::HP,  Value, traits_OptimisticQueue_michaelAlloc > OptimisticQueue_HP_michaelAlloc;
-        typedef cds::container::OptimisticQueue< cds::gc::DHP, Value, traits_OptimisticQueue_michaelAlloc > OptimisticQueue_DHP_michaelAlloc;
-
         struct traits_OptimisticQueue_seqcst : public cds::container::optimistic_queue::traits
         {
             typedef cds::opt::v::sequential_consistent memory_model;
@@ -287,28 +270,6 @@ namespace fc_details{
             }
         };
 
-        struct traits_VyukovMPMCCycleQueue_dyn_michaelAlloc : public cds::container::vyukov_queue::traits
-        {
-            typedef cds::opt::v::uninitialized_dynamic_buffer< int, memory::MichaelAllocator<int> > buffer;
-        };
-        class VyukovMPMCCycleQueue_dyn_michaelAlloc
-            : public cds::container::VyukovMPMCCycleQueue< Value, traits_VyukovMPMCCycleQueue_dyn_michaelAlloc >
-        {
-            typedef cds::container::VyukovMPMCCycleQueue< Value, traits_VyukovMPMCCycleQueue_dyn_michaelAlloc > base_class;
-        public:
-            VyukovMPMCCycleQueue_dyn_michaelAlloc()
-                : base_class( 1024 * 64 )
-            {}
-            VyukovMPMCCycleQueue_dyn_michaelAlloc( size_t nCapacity )
-                : base_class( nCapacity )
-            {}
-
-            cds::opt::none statistics() const
-            {
-                return cds::opt::none();
-            }
-        };
-
         struct traits_VyukovMPMCCycleQueue_dyn_ic : public traits_VyukovMPMCCycleQueue_dyn
         {
             typedef cds::atomicity::item_counter item_counter;
@@ -337,13 +298,6 @@ namespace fc_details{
         typedef cds::container::BasketQueue< cds::gc::HP , Value > BasketQueue_HP;
         typedef cds::container::BasketQueue< cds::gc::DHP, Value > BasketQueue_DHP;
 
-        struct traits_BasketQueue_michaelAlloc : public cds::container::basket_queue::traits
-        {
-            typedef memory::MichaelAllocator<int> allocator;
-        };
-        typedef cds::container::BasketQueue< cds::gc::HP,  Value, traits_BasketQueue_michaelAlloc > BasketQueue_HP_michaelAlloc;
-        typedef cds::container::BasketQueue< cds::gc::DHP, Value, traits_BasketQueue_michaelAlloc > BasketQueue_DHP_michaelAlloc;
-
         struct traits_BasketQueue_seqcst : public cds::container::basket_queue::traits
         {
             typedef cds::opt::v::sequential_consistent mamory_model;
@@ -645,48 +599,40 @@ namespace cds_test {
 
 #define CDSSTRESS_MSQueue( test_fixture ) \
     CDSSTRESS_Queue_F( test_fixture, MSQueue_HP,                0 ) \
-    CDSSTRESS_Queue_F( test_fixture, MSQueue_HP_michaelAlloc,   0 ) \
     CDSSTRESS_Queue_F( test_fixture, MSQueue_HP_seqcst,         2 ) \
     CDSSTRESS_Queue_F( test_fixture, MSQueue_HP_ic,             1 ) \
     CDSSTRESS_Queue_F( test_fixture, MSQueue_HP_stat,           0 ) \
     CDSSTRESS_Queue_F( test_fixture, MSQueue_DHP,               0 ) \
-    CDSSTRESS_Queue_F( test_fixture, MSQueue_DHP_michaelAlloc,  0 ) \
     CDSSTRESS_Queue_F( test_fixture, MSQueue_DHP_seqcst,        2 ) \
     CDSSTRESS_Queue_F( test_fixture, MSQueue_DHP_ic,            1 ) \
     CDSSTRESS_Queue_F( test_fixture, MSQueue_DHP_stat,          0 )
 
 #define CDSSTRESS_MoirQueue( test_fixture ) \
     CDSSTRESS_Queue_F( test_fixture, MoirQueue_HP,              0 ) \
-    CDSSTRESS_Queue_F( test_fixture, MoirQueue_HP_michaelAlloc, 0 ) \
     CDSSTRESS_Queue_F( test_fixture, MoirQueue_HP_seqcst,       2 ) \
     CDSSTRESS_Queue_F( test_fixture, MoirQueue_HP_ic,           1 ) \
     CDSSTRESS_Queue_F( test_fixture, MoirQueue_HP_stat,         0 ) \
     CDSSTRESS_Queue_F( test_fixture, MoirQueue_DHP,             0 ) \
-    CDSSTRESS_Queue_F( test_fixture, MoirQueue_DHP_michaelAlloc,0 ) \
     CDSSTRESS_Queue_F( test_fixture, MoirQueue_DHP_seqcst,      2 ) \
     CDSSTRESS_Queue_F( test_fixture, MoirQueue_DHP_ic,          1 ) \
     CDSSTRESS_Queue_F( test_fixture, MoirQueue_DHP_stat,        0 )
 
 #define CDSSTRESS_OptimsticQueue( test_fixture ) \
     CDSSTRESS_Queue_F( test_fixture, OptimisticQueue_HP,                0 ) \
-    CDSSTRESS_Queue_F( test_fixture, OptimisticQueue_HP_michaelAlloc,   0 ) \
     CDSSTRESS_Queue_F( test_fixture, OptimisticQueue_HP_seqcst,         2 ) \
     CDSSTRESS_Queue_F( test_fixture, OptimisticQueue_HP_ic,             1 ) \
     CDSSTRESS_Queue_F( test_fixture, OptimisticQueue_HP_stat,           0 ) \
     CDSSTRESS_Queue_F( test_fixture, OptimisticQueue_DHP,               0 ) \
-    CDSSTRESS_Queue_F( test_fixture, OptimisticQueue_DHP_michaelAlloc,  0 ) \
     CDSSTRESS_Queue_F( test_fixture, OptimisticQueue_DHP_seqcst,        2 ) \
     CDSSTRESS_Queue_F( test_fixture, OptimisticQueue_DHP_ic,            1 ) \
     CDSSTRESS_Queue_F( test_fixture, OptimisticQueue_DHP_stat,          0 )
 
 #define CDSSTRESS_BasketQueue( test_fixture ) \
     CDSSTRESS_Queue_F( test_fixture, BasketQueue_HP,                0 ) \
-    CDSSTRESS_Queue_F( test_fixture, BasketQueue_HP_michaelAlloc,   0 ) \
     CDSSTRESS_Queue_F( test_fixture, BasketQueue_HP_seqcst,         2 ) \
     CDSSTRESS_Queue_F( test_fixture, BasketQueue_HP_ic,             1 ) \
     CDSSTRESS_Queue_F( test_fixture, BasketQueue_HP_stat,           0 ) \
     CDSSTRESS_Queue_F( test_fixture, BasketQueue_DHP,               0 ) \
-    CDSSTRESS_Queue_F( test_fixture, BasketQueue_DHP_michaelAlloc,  0 ) \
     CDSSTRESS_Queue_F( test_fixture, BasketQueue_DHP_seqcst,        2 ) \
     CDSSTRESS_Queue_F( test_fixture, BasketQueue_DHP_ic,            1 ) \
     CDSSTRESS_Queue_F( test_fixture, BasketQueue_DHP_stat,          0 )
@@ -800,7 +746,6 @@ namespace cds_test {
 
 #define CDSSTRESS_VyukovQueue( test_fixture ) \
     CDSSTRESS_Queue_F( test_fixture, VyukovMPMCCycleQueue_dyn,              0 ) \
-    CDSSTRESS_Queue_F( test_fixture, VyukovMPMCCycleQueue_dyn_michaelAlloc, 0 ) \
     CDSSTRESS_Queue_F( test_fixture, VyukovMPMCCycleQueue_dyn_ic,           1 )
 
 #define CDSSTRESS_StdQueue( test_fixture ) \