projects
/
libcds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ffaea50
)
Uses different pass count for elimination stack
author
Peizhao Ou
<peizhaoo@uci.edu>
Thu, 22 Feb 2018 19:36:52 +0000
(11:36 -0800)
committer
Peizhao Ou
<peizhaoo@uci.edu>
Thu, 22 Feb 2018 19:36:52 +0000
(11:36 -0800)
test/stress/stack/push_pop.cpp
patch
|
blob
|
history
diff --git
a/test/stress/stack/push_pop.cpp
b/test/stress/stack/push_pop.cpp
index
a571e3e
..
5691792
100644
(file)
--- a/
test/stress/stack/push_pop.cpp
+++ b/
test/stress/stack/push_pop.cpp
@@
-36,6
+36,7
@@
namespace {
static size_t s_nPushThreadCount = 4;
static size_t s_nPopThreadCount = 4;
static size_t s_nStackSize = 1000000;
static size_t s_nPushThreadCount = 4;
static size_t s_nPopThreadCount = 4;
static size_t s_nStackSize = 1000000;
+ static size_t s_nEliminationStackSize = 500000;
static size_t s_nEliminationSize = 4;
static atomics::atomic<size_t> s_nWorkingProducers( 0 );
static size_t s_nEliminationSize = 4;
static atomics::atomic<size_t> s_nWorkingProducers( 0 );
@@
-175,6
+176,8
@@
namespace {
s_nPushThreadCount = cfg.get_size_t( "PushThreadCount", s_nPushThreadCount );
s_nPopThreadCount = cfg.get_size_t( "PopThreadCount", s_nPopThreadCount );
s_nStackSize = cfg.get_size_t( "StackSize", s_nStackSize );
s_nPushThreadCount = cfg.get_size_t( "PushThreadCount", s_nPushThreadCount );
s_nPopThreadCount = cfg.get_size_t( "PopThreadCount", s_nPopThreadCount );
s_nStackSize = cfg.get_size_t( "StackSize", s_nStackSize );
+ s_nEliminationStackSize =
+ cfg.get_size_t("EliminationStackSize", s_nEliminationStackSize);
s_nEliminationSize = cfg.get_size_t( "EliminationSize", s_nEliminationSize );
if ( s_nPushThreadCount == 0 )
s_nEliminationSize = cfg.get_size_t( "EliminationSize", s_nEliminationSize );
if ( s_nPushThreadCount == 0 )
@@
-279,6
+282,18
@@
namespace {
};
CDSSTRESS_TreiberStack( stack_push_pop )
};
CDSSTRESS_TreiberStack( stack_push_pop )
+
+ #undef CDSSTRESS_EliminationStack_F
+
+ #define CDSSTRESS_EliminationStack_F( test_fixture, type_name ) \
+ TEST_F( test_fixture, type_name ) \
+ { \
+ typedef stack::Types< value_type >::type_name stack_type; \
+ s_nStackSize = s_nEliminationStackSize; \
+ stack_type stack( s_nEliminationSize ); \
+ test_elimination( stack ); \
+ }
+
CDSSTRESS_EliminationStack( stack_push_pop )
//CDSSTRESS_FCStack( stack_push_pop )
//CDSSTRESS_FCDeque( stack_push_pop )
CDSSTRESS_EliminationStack( stack_push_pop )
//CDSSTRESS_FCStack( stack_push_pop )
//CDSSTRESS_FCDeque( stack_push_pop )