std::pair<bool, bool> ret = base_class::update_at( &refHead, *pNode,
[&pItemFound](bool, node_type& item, node_type&){ pItemFound = &item; },
bAllowInsert );
- assert( pItemFound != nullptr );
- if ( ret.first && ret.second )
+ if ( ret.second )
pNode.release();
return std::make_pair( pItemFound, ret.second );
std::pair<bool, bool> ret = base_class::update_at( refHead, *pNode,
[&pItemFound](bool, node_type& item, node_type&) { pItemFound = &item; },
bAllowInsert );
- assert( pItemFound != nullptr );
- if ( ret.first && ret.second )
+ if ( ret.second )
pNode.release();
return std::make_pair( pItemFound, ret.second );
}
MinimumVisualStudioVersion = 10.0.40219.1\r
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cds", "cds.vcxproj", "{408FE9BC-44F0-4E6A-89FA-D6F952584239}"\r
EndProject\r
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unit-test", "unit-test", "{B30CA283-1796-4763-92C3-2E4848D443F7}"\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "multi-threaded test", "multi-threaded test", "{B30CA283-1796-4763-92C3-2E4848D443F7}"\r
ProjectSection(SolutionItems) = preProject\r
..\..\..\tests\unit\print_bronsonavltree_stat.h = ..\..\..\tests\unit\print_bronsonavltree_stat.h\r
..\..\..\tests\unit\print_cuckoo_stat.h = ..\..\..\tests\unit\print_cuckoo_stat.h\r
{408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239}\r
EndProjectSection\r
EndProject\r
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "hdr-test", "hdr-test", "{B8C24D26-A3BF-4DA6-B64C-142CBA4BFE75}"\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "single-threaded test", "single-threaded test", "{B8C24D26-A3BF-4DA6-B64C-142CBA4BFE75}"\r
ProjectSection(SolutionItems) = preProject\r
..\..\..\tests\test-hdr\size_check.h = ..\..\..\tests\test-hdr\size_check.h\r
EndProjectSection\r
<ClInclude Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_set.h" />\r
<ClInclude Include="..\..\..\tests\test-hdr\set\hdr_striped_set.h" />\r
<ClInclude Include="..\..\..\tests\test-hdr\set\intrusive_cuckoo_set_common.h" />\r
- <ClInclude Include="..\..\..\tests\test-hdr\size_check.h" />\r
</ItemGroup>\r
<PropertyGroup Label="Globals">\r
<ProjectGuid>{A38E5597-6916-4480-A343-C9846EF544E4}</ProjectGuid>\r
<ClInclude Include="..\..\..\tests\test-hdr\set\hdr_striped_set.h">\r
<Filter>container\striped</Filter>\r
</ClInclude>\r
- <ClInclude Include="..\..\..\tests\test-hdr\size_check.h" />\r
</ItemGroup>\r
</Project>
\ No newline at end of file
MinimumVisualStudioVersion = 10.0.40219.1\r
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cds", "cds.vcxproj", "{408FE9BC-44F0-4E6A-89FA-D6F952584239}"\r
EndProject\r
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unit-test", "unit-test", "{B30CA283-1796-4763-92C3-2E4848D443F7}"\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "multi-threaded test", "multi-threaded test", "{B30CA283-1796-4763-92C3-2E4848D443F7}"\r
ProjectSection(SolutionItems) = preProject\r
..\..\..\tests\unit\print_bronsonavltree_stat.h = ..\..\..\tests\unit\print_bronsonavltree_stat.h\r
..\..\..\tests\unit\print_cuckoo_stat.h = ..\..\..\tests\unit\print_cuckoo_stat.h\r
{408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239}\r
EndProjectSection\r
EndProject\r
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "hdr-test", "hdr-test", "{B8C24D26-A3BF-4DA6-B64C-142CBA4BFE75}"\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "single-threaded test", "single-threaded test", "{B8C24D26-A3BF-4DA6-B64C-142CBA4BFE75}"\r
ProjectSection(SolutionItems) = preProject\r
..\..\..\tests\test-hdr\size_check.h = ..\..\..\tests\test-hdr\size_check.h\r
EndProjectSection\r
<ClInclude Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_set.h" />\r
<ClInclude Include="..\..\..\tests\test-hdr\set\hdr_striped_set.h" />\r
<ClInclude Include="..\..\..\tests\test-hdr\set\intrusive_cuckoo_set_common.h" />\r
- <ClInclude Include="..\..\..\tests\test-hdr\size_check.h" />\r
</ItemGroup>\r
<PropertyGroup Label="Globals">\r
<ProjectGuid>{A38E5597-6916-4480-A343-C9846EF544E4}</ProjectGuid>\r
<ClInclude Include="..\..\..\tests\test-hdr\set\hdr_striped_set.h">\r
<Filter>container\striped</Filter>\r
</ClInclude>\r
- <ClInclude Include="..\..\..\tests\test-hdr\size_check.h" />\r
</ItemGroup>\r
</Project>
\ No newline at end of file
tests/unit/map2/map_insdel_item_string_cuckoo.cpp \
tests/unit/map2/map_insdel_item_string_ellentree.cpp \
tests/unit/map2/map_insdel_item_string_michael.cpp \
+ tests/unit/map2/map_insdel_item_string_multilevelhashmap.cpp \
tests/unit/map2/map_insdel_item_string_skip.cpp \
tests/unit/map2/map_insdel_item_string_split.cpp \
tests/unit/map2/map_insdel_item_string_striped.cpp \
tests/unit/map2/map_insdel_string_cuckoo.cpp \
tests/unit/map2/map_insdel_string_ellentree.cpp \
tests/unit/map2/map_insdel_string_michael.cpp \
+ tests/unit/map2/map_insdel_string_multilevelhashmap.cpp \
tests/unit/map2/map_insdel_string_skip.cpp \
tests/unit/map2/map_insdel_string_split.cpp \
tests/unit/map2/map_insdel_string_striped.cpp \
CPPUNIT_ASSERT( ret.first );
CPPUNIT_ASSERT( !ret.second );
CPPUNIT_ASSERT( v1.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v1.nUpdateCount == 1 );
+ CPPUNIT_ASSERT( v1.nUpdateCount == 2 );
CPPUNIT_ASSERT( check_size( s, 3 ));
ret = s.update( v2, f );
CPPUNIT_ASSERT( ret.first );
CPPUNIT_ASSERT( !ret.second );
CPPUNIT_ASSERT( v1.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v1.nUpdateCount == 1 );
+ CPPUNIT_ASSERT( v1.nUpdateCount == 2 );
CPPUNIT_ASSERT( check_size( s, 3 ));
ret = s.update( v2, f );
CPPUNIT_ASSERT( ret.first );
CPPUNIT_ASSERT( !ret.second );
CPPUNIT_ASSERT( v1.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v1.nUpdateCount == 1 );
+ CPPUNIT_ASSERT( v1.nUpdateCount == 2 );
CPPUNIT_ASSERT( check_size( s, 3 ));
ret = s.update( v2, f );
map_insdel_item_string_cuckoo.cpp
map_insdel_item_string_ellentree.cpp
map_insdel_item_string_michael.cpp
+ map_insdel_item_string_multilevelhashmap.cpp
map_insdel_item_string_skip.cpp
map_insdel_item_string_split.cpp
map_insdel_item_string_striped.cpp
map_insdel_string_cuckoo.cpp
map_insdel_string_ellentree.cpp
map_insdel_string_michael.cpp
+ map_insdel_string_multilevelhashmap.cpp
map_insdel_string_skip.cpp
map_insdel_string_split.cpp
map_insdel_string_striped.cpp
std::vector<size_t> m_arrRemove;
protected:
- typedef CppUnitMini::TestCase Base;
-
typedef key_thread key_type;
typedef size_t value_type;
typedef std::pair<key_type const, value_type> pair_type;
//$$CDS-header$$
-// defines concurrent access to map::nonconcurrent_iterator::Sequence::TValue::nAccess field
-
#include "map2/map_find_int.h"
// find int test in map<int> in mutithreaded mode
size_t c_nLoadFactor; // current load factor
private:
- typedef CppUnitMini::TestCase Base;
typedef size_t key_type;
struct value_type {
key_type nKey ; // key
size_t c_nLoadFactor; // current load factor
private:
- typedef CppUnitMini::TestCase Base;
typedef std::string key_type;
struct value_type {
std::string const * pKey;
}
}
- template <class Map>
- void test_nolf()
- {
- initTestSequence();
-
- Map testMap;
- find_string_test( testMap );
- if ( c_bPrintGCState )
- print_gc_state();
- }
-
void setUpParams( const CppUnitMini::TestCfg& cfg );
# include "map2/map_defs.h"
}
}
- typedef CppUnitMini::TestCase Base;
void setUpParams( const CppUnitMini::TestCfg& cfg );
# include "map2/map_defs.h"
size_t c_nLoadFactor; // current load factor
private:
- typedef CppUnitMini::TestCase Base;
typedef size_t key_type;
typedef size_t value_type;
size_t c_nLoadFactor = 2; // current load factor
private:
- typedef CppUnitMini::TestCase Base;
typedef size_t key_type;
typedef size_t value_type;
size_t c_nLoadFactor = 2; // current load factor
private:
- typedef CppUnitMini::TestCase Base;
typedef std::string key_type;
typedef size_t value_type;
size_t c_nLoadFactor; // current load factor
private:
- typedef CppUnitMini::TestCase Base;
typedef std::string key_type;
typedef size_t value_type;
actions m_arrShuffle[c_nShuffleSize];
protected:
- typedef CppUnitMini::TestCase Base;
typedef size_t key_type;
typedef size_t value_type;
size_t c_nLoadFactor = 2; // current load factor
private:
- typedef CppUnitMini::TestCase Base;
typedef size_t key_type;
typedef size_t value_type;
namespace map2 {
- template <class GC, typename Key, typename T, typename Traits = cc::split_list::traits >
+ template <class GC, typename Key, typename T, typename Traits = cc::skip_list::traits >
class SkipListMap : public cc::SkipListMap< GC, Key, T, Traits >
{
typedef cc::SkipListMap< GC, Key, T, Traits > base_class;
std::vector<size_t> m_arrData;
protected:
- typedef CppUnitMini::TestCase Base;
typedef key_thread key_type;
typedef size_t value_type;
size_t c_nLoadFactor = 2;
private:
- typedef CppUnitMini::TestCase Base;
typedef std::string key_type;
typedef size_t value_type;
actions m_arrShuffle[c_nShuffleSize];
protected:
- typedef CppUnitMini::TestCase Base;
typedef size_t key_type;
typedef size_t value_type;