Fixed iteration set stress test under 32bit architecture
authorkhizmax <libcds.dev@gmail.com>
Sun, 21 Aug 2016 06:17:33 +0000 (09:17 +0300)
committerkhizmax <libcds.dev@gmail.com>
Sun, 21 Aug 2016 06:17:33 +0000 (09:17 +0300)
Added missing header
Docfix

cds/details/defs.h
cds/gc/details/hp_alloc.h
projects/Win/vc14/cds.sln
test/stress/set/iteration/set_iteration.h

index 30bbf4c33b11a67dfd0c18d2603c8e101bdc65f2..1727dfbe0602b7ed7047ad933453e6e05cb117aa 100644 (file)
 
    The test projects depends on the following static library from \p boost:
    - \p boost.thread
 
    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
 
 
    \par Windows build
 
index d6d42a575ab346b15c36fea9ea9406461ed21a32..f0c562b79e21048c16f2d575fa7d200bbfb33d9c 100644 (file)
@@ -34,6 +34,7 @@
 #include <cds/algo/atomic.h>
 #include <cds/details/allocator.h>
 #include <cds/gc/details/hp_type.h>
 #include <cds/algo/atomic.h>
 #include <cds/details/allocator.h>
 #include <cds/gc/details/hp_type.h>
+#include <string.h> // memset
 
 //@cond
 namespace cds {
 
 //@cond
 namespace cds {
index deb30067a96954a90ced94ef8a014786e8e34012..8fbe31381f00aef454414b398a2949954c42dd33 100644 (file)
@@ -227,6 +227,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stress-map-insfind-int", "s
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stress-set-iteration", "stress-set-iteration.vcxproj", "{31952FA8-A303-4A0B-94C4-ABA5A8A6DBCE}"\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stress-set-iteration", "stress-set-iteration.vcxproj", "{31952FA8-A303-4A0B-94C4-ABA5A8A6DBCE}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {A34CED07-A442-4FA1-81C4-F8B9CD3C832B} = {A34CED07-A442-4FA1-81C4-F8B9CD3C832B}\r
+               {408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239}\r
+       EndProjectSection\r
 EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
 EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
index 5cb8d1e86301a5f81f8bb63437923eb97a3e88dc..7757b874e55c56ff67068a831644fe266343b129 100644 (file)
@@ -409,7 +409,11 @@ namespace set {
                     typename Set::iterator itEnd;
                     itEnd = rSet.end();
                     for ( it = rSet.begin(); it != itEnd; ++it ) {
                     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());
                         it->val.hash = CityHash64( it->key.c_str(), it->key.length());
+#else
+                        it->val.hash = std::hash<std::string>()( it->key );
+#endif
                         ++m_nVisitCount;
                     }
                 }
                         ++m_nVisitCount;
                     }
                 }
@@ -453,7 +457,11 @@ namespace set {
                     ++m_nPassCount;
                     typename Set::rcu_lock l;
                     for ( auto it = rSet.begin(); it != rSet.end(); ++it ) {
                     ++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() );
                         it->val.hash = CityHash64( it->key.c_str(), it->key.length() );
+#else
+                        it->val.hash = std::hash<std::string>()(it->key);
+#endif
                         ++m_nVisitCount;
                     }
                 }
                         ++m_nVisitCount;
                     }
                 }