From bc63bc2102be026b8f3f7d6bba88161df64c57c4 Mon Sep 17 00:00:00 2001 From: khizmax Date: Sun, 21 Aug 2016 09:17:33 +0300 Subject: [PATCH] Fixed iteration set stress test under 32bit architecture Added missing header Docfix --- cds/details/defs.h | 2 +- cds/gc/details/hp_alloc.h | 1 + projects/Win/vc14/cds.sln | 4 ++++ test/stress/set/iteration/set_iteration.h | 8 ++++++++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/cds/details/defs.h b/cds/details/defs.h index 30bbf4c3..1727dfbe 100644 --- a/cds/details/defs.h +++ b/cds/details/defs.h @@ -166,7 +166,7 @@ The test projects depends on the following static library from \p boost: - \p boost.thread - - \p boost.date_time + - \p boost.system \par Windows build diff --git a/cds/gc/details/hp_alloc.h b/cds/gc/details/hp_alloc.h index d6d42a57..f0c562b7 100644 --- a/cds/gc/details/hp_alloc.h +++ b/cds/gc/details/hp_alloc.h @@ -34,6 +34,7 @@ #include #include #include +#include // memset //@cond namespace cds { diff --git a/projects/Win/vc14/cds.sln b/projects/Win/vc14/cds.sln index deb30067..8fbe3138 100644 --- a/projects/Win/vc14/cds.sln +++ b/projects/Win/vc14/cds.sln @@ -227,6 +227,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stress-map-insfind-int", "s EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stress-set-iteration", "stress-set-iteration.vcxproj", "{31952FA8-A303-4A0B-94C4-ABA5A8A6DBCE}" + ProjectSection(ProjectDependencies) = postProject + {A34CED07-A442-4FA1-81C4-F8B9CD3C832B} = {A34CED07-A442-4FA1-81C4-F8B9CD3C832B} + {408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239} + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/test/stress/set/iteration/set_iteration.h b/test/stress/set/iteration/set_iteration.h index 5cb8d1e8..7757b874 100644 --- a/test/stress/set/iteration/set_iteration.h +++ b/test/stress/set/iteration/set_iteration.h @@ -409,7 +409,11 @@ namespace set { typename Set::iterator itEnd; itEnd = rSet.end(); for ( it = rSet.begin(); it != itEnd; ++it ) { +#if CDS_BUILD_BITS == 64 it->val.hash = CityHash64( it->key.c_str(), it->key.length()); +#else + it->val.hash = std::hash()( it->key ); +#endif ++m_nVisitCount; } } @@ -453,7 +457,11 @@ namespace set { ++m_nPassCount; typename Set::rcu_lock l; for ( auto it = rSet.begin(); it != rSet.end(); ++it ) { +#if CDS_BUILD_BITS == 64 it->val.hash = CityHash64( it->key.c_str(), it->key.length() ); +#else + it->val.hash = std::hash()(it->key); +#endif ++m_nVisitCount; } } -- 2.34.1