From cc36eb6fd0970a8ea7c8bfa3ebdf6b6dbd7739ac Mon Sep 17 00:00:00 2001 From: khizmax Date: Sat, 26 Mar 2016 17:40:47 +0300 Subject: [PATCH] Removed old set unit tests --- projects/Win/vc14/cds.sln | 38 - projects/Win/vc14/hdr-test-set.vcxproj | 449 ---- .../Win/vc14/hdr-test-set.vcxproj.filters | 369 --- .../Win/vc14/hdr-test-striped-set.vcxproj | 386 ---- .../vc14/hdr-test-striped-set.vcxproj.filters | 168 -- projects/source.test-hdr.mk | 104 - projects/source.test-hdr.offsetof.mk | 46 - tests/test-hdr/CMakeLists.txt | 150 -- tests/test-hdr/set/hdr_cuckoo_set.cpp | 658 ------ tests/test-hdr/set/hdr_cuckoo_set.h | 636 ----- tests/test-hdr/set/hdr_feldman_hashset.h | 871 ------- .../test-hdr/set/hdr_feldman_hashset_dhp.cpp | 327 --- tests/test-hdr/set/hdr_feldman_hashset_hp.cpp | 329 --- .../set/hdr_feldman_hashset_rcu_gpb.cpp | 328 --- .../set/hdr_feldman_hashset_rcu_gpi.cpp | 328 --- .../set/hdr_feldman_hashset_rcu_gpt.cpp | 328 --- .../set/hdr_feldman_hashset_rcu_shb.cpp | 352 --- .../set/hdr_feldman_hashset_rcu_sht.cpp | 352 --- .../hdr_intrusive_cuckoo_refinable_set.cpp | 674 ------ .../test-hdr/set/hdr_intrusive_cuckoo_set.cpp | 639 ------ tests/test-hdr/set/hdr_intrusive_cuckoo_set.h | 687 ------ .../set/hdr_intrusive_feldman_hashset.h | 817 ------- .../set/hdr_intrusive_feldman_hashset_dhp.cpp | 350 --- .../set/hdr_intrusive_feldman_hashset_hp.cpp | 352 --- .../hdr_intrusive_feldman_hashset_rcu_gpb.cpp | 351 --- .../hdr_intrusive_feldman_hashset_rcu_gpi.cpp | 351 --- .../hdr_intrusive_feldman_hashset_rcu_gpt.cpp | 351 --- .../hdr_intrusive_feldman_hashset_rcu_shb.cpp | 377 --- .../hdr_intrusive_feldman_hashset_rcu_sht.cpp | 377 --- .../set/hdr_intrusive_michael_set_dhp.cpp | 177 -- .../hdr_intrusive_michael_set_dhp_lazy.cpp | 177 -- .../set/hdr_intrusive_michael_set_hp.cpp | 177 -- .../set/hdr_intrusive_michael_set_hp_lazy.cpp | 178 -- .../set/hdr_intrusive_michael_set_nogc.cpp | 175 -- .../hdr_intrusive_michael_set_nogc_lazy.cpp | 175 -- .../set/hdr_intrusive_michael_set_rcu_gpb.cpp | 182 -- ...hdr_intrusive_michael_set_rcu_gpb_lazy.cpp | 182 -- .../set/hdr_intrusive_michael_set_rcu_gpi.cpp | 182 -- ...hdr_intrusive_michael_set_rcu_gpi_lazy.cpp | 183 -- .../set/hdr_intrusive_michael_set_rcu_gpt.cpp | 182 -- ...hdr_intrusive_michael_set_rcu_gpt_lazy.cpp | 182 -- .../set/hdr_intrusive_michael_set_rcu_shb.cpp | 196 -- ...hdr_intrusive_michael_set_rcu_shb_lazy.cpp | 196 -- .../set/hdr_intrusive_michael_set_rcu_sht.cpp | 196 -- ...hdr_intrusive_michael_set_rcu_sht_lazy.cpp | 195 -- ...hdr_intrusive_refinable_hashset_avlset.cpp | 158 -- .../hdr_intrusive_refinable_hashset_list.cpp | 224 -- .../hdr_intrusive_refinable_hashset_set.cpp | 158 -- .../hdr_intrusive_refinable_hashset_sgset.cpp | 158 -- .../hdr_intrusive_refinable_hashset_slist.cpp | 224 -- ...r_intrusive_refinable_hashset_splayset.cpp | 166 -- ...r_intrusive_refinable_hashset_treapset.cpp | 176 -- .../hdr_intrusive_refinable_hashset_uset.cpp | 211 -- tests/test-hdr/set/hdr_intrusive_set.h | 2043 ----------------- .../set/hdr_intrusive_skiplist_dhp.cpp | 355 --- .../set/hdr_intrusive_skiplist_dhp_member.cpp | 353 --- .../set/hdr_intrusive_skiplist_hp.cpp | 356 --- .../set/hdr_intrusive_skiplist_hp_member.cpp | 353 --- .../set/hdr_intrusive_skiplist_nogc.cpp | 337 --- .../hdr_intrusive_skiplist_nogc_member.cpp | 337 --- .../set/hdr_intrusive_skiplist_rcu_gpb.cpp | 361 --- .../hdr_intrusive_skiplist_rcu_gpb_member.cpp | 358 --- .../set/hdr_intrusive_skiplist_rcu_gpi.cpp | 359 --- .../hdr_intrusive_skiplist_rcu_gpi_member.cpp | 358 --- .../set/hdr_intrusive_skiplist_rcu_gpt.cpp | 359 --- .../hdr_intrusive_skiplist_rcu_gpt_member.cpp | 358 --- .../set/hdr_intrusive_skiplist_rcu_shb.cpp | 400 ---- .../hdr_intrusive_skiplist_rcu_shb_member.cpp | 396 ---- .../set/hdr_intrusive_skiplist_rcu_sht.cpp | 397 ---- .../hdr_intrusive_skiplist_rcu_sht_member.cpp | 396 ---- .../test-hdr/set/hdr_intrusive_skiplist_set.h | 796 ------- .../set/hdr_intrusive_skiplist_set_rcu.h | 824 ------- .../set/hdr_intrusive_splitlist_set_dhp.cpp | 452 ---- .../hdr_intrusive_splitlist_set_dhp_lazy.cpp | 449 ---- .../set/hdr_intrusive_splitlist_set_hp.cpp | 451 ---- .../hdr_intrusive_splitlist_set_hp_lazy.cpp | 456 ---- .../set/hdr_intrusive_splitlist_set_nogc.cpp | 441 ---- .../hdr_intrusive_splitlist_set_nogc_lazy.cpp | 442 ---- .../hdr_intrusive_splitlist_set_rcu_gpb.cpp | 457 ---- ...r_intrusive_splitlist_set_rcu_gpb_lazy.cpp | 456 ---- .../hdr_intrusive_splitlist_set_rcu_gpi.cpp | 460 ---- ...r_intrusive_splitlist_set_rcu_gpi_lazy.cpp | 459 ---- .../hdr_intrusive_splitlist_set_rcu_gpt.cpp | 460 ---- ...r_intrusive_splitlist_set_rcu_gpt_lazy.cpp | 458 ---- .../hdr_intrusive_splitlist_set_rcu_shb.cpp | 493 ---- ...r_intrusive_splitlist_set_rcu_shb_lazy.cpp | 492 ---- .../hdr_intrusive_splitlist_set_rcu_sht.cpp | 494 ---- ...r_intrusive_splitlist_set_rcu_sht_lazy.cpp | 491 ---- .../hdr_intrusive_striped_hashset_avlset.cpp | 153 -- .../hdr_intrusive_striped_hashset_list.cpp | 215 -- .../set/hdr_intrusive_striped_hashset_set.cpp | 154 -- .../hdr_intrusive_striped_hashset_sgset.cpp | 154 -- .../hdr_intrusive_striped_hashset_slist.cpp | 215 -- ...hdr_intrusive_striped_hashset_splayset.cpp | 163 -- ...hdr_intrusive_striped_hashset_treapset.cpp | 171 -- .../hdr_intrusive_striped_hashset_uset.cpp | 206 -- .../set/hdr_intrusive_striped_set.cpp | 31 - .../test-hdr/set/hdr_intrusive_striped_set.h | 823 ------- tests/test-hdr/set/hdr_michael_set_dhp.cpp | 116 - tests/test-hdr/set/hdr_michael_set_hp.cpp | 119 - .../test-hdr/set/hdr_michael_set_lazy_dhp.cpp | 116 - .../test-hdr/set/hdr_michael_set_lazy_hp.cpp | 117 - .../set/hdr_michael_set_lazy_nogc.cpp | 140 -- .../set/hdr_michael_set_lazy_rcu_gpb.cpp | 119 - .../set/hdr_michael_set_lazy_rcu_gpi.cpp | 119 - .../set/hdr_michael_set_lazy_rcu_gpt.cpp | 119 - .../set/hdr_michael_set_lazy_rcu_shb.cpp | 126 - .../set/hdr_michael_set_lazy_rcu_sht.cpp | 126 - tests/test-hdr/set/hdr_michael_set_nogc.cpp | 116 - .../test-hdr/set/hdr_michael_set_rcu_gpb.cpp | 119 - .../test-hdr/set/hdr_michael_set_rcu_gpi.cpp | 119 - .../test-hdr/set/hdr_michael_set_rcu_gpt.cpp | 119 - .../test-hdr/set/hdr_michael_set_rcu_shb.cpp | 126 - .../test-hdr/set/hdr_michael_set_rcu_sht.cpp | 126 - .../hdr_refinable_hashset_boost_flat_set.cpp | 197 -- .../set/hdr_refinable_hashset_boost_list.cpp | 193 -- .../set/hdr_refinable_hashset_boost_set.cpp | 195 -- ..._refinable_hashset_boost_stable_vector.cpp | 194 -- ..._refinable_hashset_boost_unordered_set.cpp | 182 -- .../hdr_refinable_hashset_boost_vector.cpp | 195 -- .../set/hdr_refinable_hashset_hashset_std.cpp | 181 -- .../set/hdr_refinable_hashset_list.cpp | 170 -- .../set/hdr_refinable_hashset_set.cpp | 172 -- .../set/hdr_refinable_hashset_slist.cpp | 193 -- .../set/hdr_refinable_hashset_vector.cpp | 170 -- tests/test-hdr/set/hdr_set.h | 1432 ------------ tests/test-hdr/set/hdr_skiplist_set.h | 614 ----- tests/test-hdr/set/hdr_skiplist_set_dhp.cpp | 340 --- tests/test-hdr/set/hdr_skiplist_set_hp.cpp | 341 --- tests/test-hdr/set/hdr_skiplist_set_nogc.cpp | 339 --- tests/test-hdr/set/hdr_skiplist_set_rcu.h | 544 ----- .../test-hdr/set/hdr_skiplist_set_rcu_gpb.cpp | 345 --- .../test-hdr/set/hdr_skiplist_set_rcu_gpi.cpp | 347 --- .../test-hdr/set/hdr_skiplist_set_rcu_gpt.cpp | 345 --- .../test-hdr/set/hdr_skiplist_set_rcu_shb.cpp | 396 ---- .../test-hdr/set/hdr_skiplist_set_rcu_sht.cpp | 396 ---- tests/test-hdr/set/hdr_splitlist_set_dhp.cpp | 185 -- tests/test-hdr/set/hdr_splitlist_set_hp.cpp | 184 -- .../set/hdr_splitlist_set_lazy_dhp.cpp | 184 -- .../set/hdr_splitlist_set_lazy_hp.cpp | 184 -- .../set/hdr_splitlist_set_lazy_nogc.cpp | 184 -- .../set/hdr_splitlist_set_lazy_rcu_gpb.cpp | 187 -- .../set/hdr_splitlist_set_lazy_rcu_gpi.cpp | 188 -- .../set/hdr_splitlist_set_lazy_rcu_gpt.cpp | 187 -- .../set/hdr_splitlist_set_lazy_rcu_shb.cpp | 198 -- .../set/hdr_splitlist_set_lazy_rcu_sht.cpp | 196 -- tests/test-hdr/set/hdr_splitlist_set_nogc.cpp | 184 -- .../set/hdr_splitlist_set_rcu_gpb.cpp | 188 -- .../set/hdr_splitlist_set_rcu_gpi.cpp | 187 -- .../set/hdr_splitlist_set_rcu_gpt.cpp | 188 -- .../set/hdr_splitlist_set_rcu_shb.cpp | 196 -- .../set/hdr_splitlist_set_rcu_sht.cpp | 196 -- .../hdr_striped_hashset_boost_flat_set.cpp | 199 -- .../set/hdr_striped_hashset_boost_list.cpp | 181 -- .../set/hdr_striped_hashset_boost_set.cpp | 187 -- ...dr_striped_hashset_boost_stable_vector.cpp | 184 -- ...dr_striped_hashset_boost_unordered_set.cpp | 173 -- .../set/hdr_striped_hashset_boost_vector.cpp | 184 -- .../set/hdr_striped_hashset_hashset_std.cpp | 174 -- .../test-hdr/set/hdr_striped_hashset_list.cpp | 162 -- .../test-hdr/set/hdr_striped_hashset_set.cpp | 165 -- .../set/hdr_striped_hashset_slist.cpp | 186 -- .../set/hdr_striped_hashset_vector.cpp | 163 -- tests/test-hdr/set/hdr_striped_set.h | 784 ------- .../set/intrusive_cuckoo_set_common.h | 84 - 165 files changed, 50412 deletions(-) delete mode 100644 projects/Win/vc14/hdr-test-set.vcxproj delete mode 100644 projects/Win/vc14/hdr-test-set.vcxproj.filters delete mode 100644 projects/Win/vc14/hdr-test-striped-set.vcxproj delete mode 100644 projects/Win/vc14/hdr-test-striped-set.vcxproj.filters delete mode 100644 tests/test-hdr/set/hdr_cuckoo_set.cpp delete mode 100644 tests/test-hdr/set/hdr_cuckoo_set.h delete mode 100644 tests/test-hdr/set/hdr_feldman_hashset.h delete mode 100644 tests/test-hdr/set/hdr_feldman_hashset_dhp.cpp delete mode 100644 tests/test-hdr/set/hdr_feldman_hashset_hp.cpp delete mode 100644 tests/test-hdr/set/hdr_feldman_hashset_rcu_gpb.cpp delete mode 100644 tests/test-hdr/set/hdr_feldman_hashset_rcu_gpi.cpp delete mode 100644 tests/test-hdr/set/hdr_feldman_hashset_rcu_gpt.cpp delete mode 100644 tests/test-hdr/set/hdr_feldman_hashset_rcu_shb.cpp delete mode 100644 tests/test-hdr/set/hdr_feldman_hashset_rcu_sht.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_cuckoo_refinable_set.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_cuckoo_set.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_cuckoo_set.h delete mode 100644 tests/test-hdr/set/hdr_intrusive_feldman_hashset.h delete mode 100644 tests/test-hdr/set/hdr_intrusive_feldman_hashset_dhp.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_feldman_hashset_hp.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_gpb.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_gpi.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_gpt.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_shb.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_sht.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_michael_set_dhp.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_michael_set_dhp_lazy.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_michael_set_hp.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_michael_set_hp_lazy.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_michael_set_nogc.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_michael_set_nogc_lazy.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpb.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpb_lazy.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpi.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpi_lazy.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpt.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpt_lazy.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_michael_set_rcu_shb.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_michael_set_rcu_shb_lazy.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_michael_set_rcu_sht.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_michael_set_rcu_sht_lazy.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_refinable_hashset_avlset.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_refinable_hashset_list.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_refinable_hashset_set.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_refinable_hashset_sgset.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_refinable_hashset_slist.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_refinable_hashset_splayset.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_refinable_hashset_treapset.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_refinable_hashset_uset.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_set.h delete mode 100644 tests/test-hdr/set/hdr_intrusive_skiplist_dhp.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_skiplist_dhp_member.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_skiplist_hp.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_skiplist_hp_member.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_skiplist_nogc.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_skiplist_nogc_member.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpb.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpb_member.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpi.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpi_member.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpt.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpt_member.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_skiplist_rcu_shb.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_skiplist_rcu_shb_member.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_skiplist_rcu_sht.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_skiplist_rcu_sht_member.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_skiplist_set.h delete mode 100644 tests/test-hdr/set/hdr_intrusive_skiplist_set_rcu.h delete mode 100644 tests/test-hdr/set/hdr_intrusive_splitlist_set_dhp.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_splitlist_set_dhp_lazy.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_splitlist_set_hp.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_splitlist_set_hp_lazy.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_splitlist_set_nogc.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_splitlist_set_nogc_lazy.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb_lazy.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi_lazy.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt_lazy.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb_lazy.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht_lazy.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_striped_hashset_avlset.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_striped_hashset_list.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_striped_hashset_set.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_striped_hashset_sgset.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_striped_hashset_slist.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_striped_hashset_splayset.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_striped_hashset_treapset.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_striped_hashset_uset.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_striped_set.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_striped_set.h delete mode 100644 tests/test-hdr/set/hdr_michael_set_dhp.cpp delete mode 100644 tests/test-hdr/set/hdr_michael_set_hp.cpp delete mode 100644 tests/test-hdr/set/hdr_michael_set_lazy_dhp.cpp delete mode 100644 tests/test-hdr/set/hdr_michael_set_lazy_hp.cpp delete mode 100644 tests/test-hdr/set/hdr_michael_set_lazy_nogc.cpp delete mode 100644 tests/test-hdr/set/hdr_michael_set_lazy_rcu_gpb.cpp delete mode 100644 tests/test-hdr/set/hdr_michael_set_lazy_rcu_gpi.cpp delete mode 100644 tests/test-hdr/set/hdr_michael_set_lazy_rcu_gpt.cpp delete mode 100644 tests/test-hdr/set/hdr_michael_set_lazy_rcu_shb.cpp delete mode 100644 tests/test-hdr/set/hdr_michael_set_lazy_rcu_sht.cpp delete mode 100644 tests/test-hdr/set/hdr_michael_set_nogc.cpp delete mode 100644 tests/test-hdr/set/hdr_michael_set_rcu_gpb.cpp delete mode 100644 tests/test-hdr/set/hdr_michael_set_rcu_gpi.cpp delete mode 100644 tests/test-hdr/set/hdr_michael_set_rcu_gpt.cpp delete mode 100644 tests/test-hdr/set/hdr_michael_set_rcu_shb.cpp delete mode 100644 tests/test-hdr/set/hdr_michael_set_rcu_sht.cpp delete mode 100644 tests/test-hdr/set/hdr_refinable_hashset_boost_flat_set.cpp delete mode 100644 tests/test-hdr/set/hdr_refinable_hashset_boost_list.cpp delete mode 100644 tests/test-hdr/set/hdr_refinable_hashset_boost_set.cpp delete mode 100644 tests/test-hdr/set/hdr_refinable_hashset_boost_stable_vector.cpp delete mode 100644 tests/test-hdr/set/hdr_refinable_hashset_boost_unordered_set.cpp delete mode 100644 tests/test-hdr/set/hdr_refinable_hashset_boost_vector.cpp delete mode 100644 tests/test-hdr/set/hdr_refinable_hashset_hashset_std.cpp delete mode 100644 tests/test-hdr/set/hdr_refinable_hashset_list.cpp delete mode 100644 tests/test-hdr/set/hdr_refinable_hashset_set.cpp delete mode 100644 tests/test-hdr/set/hdr_refinable_hashset_slist.cpp delete mode 100644 tests/test-hdr/set/hdr_refinable_hashset_vector.cpp delete mode 100644 tests/test-hdr/set/hdr_set.h delete mode 100644 tests/test-hdr/set/hdr_skiplist_set.h delete mode 100644 tests/test-hdr/set/hdr_skiplist_set_dhp.cpp delete mode 100644 tests/test-hdr/set/hdr_skiplist_set_hp.cpp delete mode 100644 tests/test-hdr/set/hdr_skiplist_set_nogc.cpp delete mode 100644 tests/test-hdr/set/hdr_skiplist_set_rcu.h delete mode 100644 tests/test-hdr/set/hdr_skiplist_set_rcu_gpb.cpp delete mode 100644 tests/test-hdr/set/hdr_skiplist_set_rcu_gpi.cpp delete mode 100644 tests/test-hdr/set/hdr_skiplist_set_rcu_gpt.cpp delete mode 100644 tests/test-hdr/set/hdr_skiplist_set_rcu_shb.cpp delete mode 100644 tests/test-hdr/set/hdr_skiplist_set_rcu_sht.cpp delete mode 100644 tests/test-hdr/set/hdr_splitlist_set_dhp.cpp delete mode 100644 tests/test-hdr/set/hdr_splitlist_set_hp.cpp delete mode 100644 tests/test-hdr/set/hdr_splitlist_set_lazy_dhp.cpp delete mode 100644 tests/test-hdr/set/hdr_splitlist_set_lazy_hp.cpp delete mode 100644 tests/test-hdr/set/hdr_splitlist_set_lazy_nogc.cpp delete mode 100644 tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpb.cpp delete mode 100644 tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpi.cpp delete mode 100644 tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpt.cpp delete mode 100644 tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_shb.cpp delete mode 100644 tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_sht.cpp delete mode 100644 tests/test-hdr/set/hdr_splitlist_set_nogc.cpp delete mode 100644 tests/test-hdr/set/hdr_splitlist_set_rcu_gpb.cpp delete mode 100644 tests/test-hdr/set/hdr_splitlist_set_rcu_gpi.cpp delete mode 100644 tests/test-hdr/set/hdr_splitlist_set_rcu_gpt.cpp delete mode 100644 tests/test-hdr/set/hdr_splitlist_set_rcu_shb.cpp delete mode 100644 tests/test-hdr/set/hdr_splitlist_set_rcu_sht.cpp delete mode 100644 tests/test-hdr/set/hdr_striped_hashset_boost_flat_set.cpp delete mode 100644 tests/test-hdr/set/hdr_striped_hashset_boost_list.cpp delete mode 100644 tests/test-hdr/set/hdr_striped_hashset_boost_set.cpp delete mode 100644 tests/test-hdr/set/hdr_striped_hashset_boost_stable_vector.cpp delete mode 100644 tests/test-hdr/set/hdr_striped_hashset_boost_unordered_set.cpp delete mode 100644 tests/test-hdr/set/hdr_striped_hashset_boost_vector.cpp delete mode 100644 tests/test-hdr/set/hdr_striped_hashset_hashset_std.cpp delete mode 100644 tests/test-hdr/set/hdr_striped_hashset_list.cpp delete mode 100644 tests/test-hdr/set/hdr_striped_hashset_set.cpp delete mode 100644 tests/test-hdr/set/hdr_striped_hashset_slist.cpp delete mode 100644 tests/test-hdr/set/hdr_striped_hashset_vector.cpp delete mode 100644 tests/test-hdr/set/hdr_striped_set.h delete mode 100644 tests/test-hdr/set/intrusive_cuckoo_set_common.h diff --git a/projects/Win/vc14/cds.sln b/projects/Win/vc14/cds.sln index ea0d622e..315add17 100644 --- a/projects/Win/vc14/cds.sln +++ b/projects/Win/vc14/cds.sln @@ -111,18 +111,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unit-set-insdel", "unit-set {408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdr-test-set", "hdr-test-set.vcxproj", "{E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}" - ProjectSection(ProjectDependencies) = postProject - {61179F2F-07E1-490D-B64D-D85A90B6EF81} = {61179F2F-07E1-490D-B64D-D85A90B6EF81} - {408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdr-test-striped-set", "hdr-test-striped-set.vcxproj", "{A38E5597-6916-4480-A343-C9846EF544E4}" - ProjectSection(ProjectDependencies) = postProject - {61179F2F-07E1-490D-B64D-D85A90B6EF81} = {61179F2F-07E1-490D-B64D-D85A90B6EF81} - {408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdr-test-tree", "hdr-test-tree.vcxproj", "{6F834EAD-7B94-4979-A0F1-A662E3D30145}" ProjectSection(ProjectDependencies) = postProject {61179F2F-07E1-490D-B64D-D85A90B6EF81} = {61179F2F-07E1-490D-B64D-D85A90B6EF81} @@ -347,30 +335,6 @@ Global {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.Release|Win32.Build.0 = Release|Win32 {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.Release|x64.ActiveCfg = Release|x64 {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.Release|x64.Build.0 = Release|x64 - {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.Debug|Win32.ActiveCfg = Debug|Win32 - {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.Debug|Win32.Build.0 = Debug|Win32 - {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.Debug|x64.ActiveCfg = Debug|x64 - {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.Debug|x64.Build.0 = Debug|x64 - {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.DebugVLD|Win32.ActiveCfg = DebugVLD|Win32 - {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.DebugVLD|Win32.Build.0 = DebugVLD|Win32 - {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.DebugVLD|x64.ActiveCfg = DebugVLD|x64 - {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.DebugVLD|x64.Build.0 = DebugVLD|x64 - {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.Release|Win32.ActiveCfg = Release|Win32 - {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.Release|Win32.Build.0 = Release|Win32 - {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.Release|x64.ActiveCfg = Release|x64 - {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.Release|x64.Build.0 = Release|x64 - {A38E5597-6916-4480-A343-C9846EF544E4}.Debug|Win32.ActiveCfg = Debug|Win32 - {A38E5597-6916-4480-A343-C9846EF544E4}.Debug|Win32.Build.0 = Debug|Win32 - {A38E5597-6916-4480-A343-C9846EF544E4}.Debug|x64.ActiveCfg = Debug|x64 - {A38E5597-6916-4480-A343-C9846EF544E4}.Debug|x64.Build.0 = Debug|x64 - {A38E5597-6916-4480-A343-C9846EF544E4}.DebugVLD|Win32.ActiveCfg = DebugVLD|Win32 - {A38E5597-6916-4480-A343-C9846EF544E4}.DebugVLD|Win32.Build.0 = DebugVLD|Win32 - {A38E5597-6916-4480-A343-C9846EF544E4}.DebugVLD|x64.ActiveCfg = DebugVLD|x64 - {A38E5597-6916-4480-A343-C9846EF544E4}.DebugVLD|x64.Build.0 = DebugVLD|x64 - {A38E5597-6916-4480-A343-C9846EF544E4}.Release|Win32.ActiveCfg = Release|Win32 - {A38E5597-6916-4480-A343-C9846EF544E4}.Release|Win32.Build.0 = Release|Win32 - {A38E5597-6916-4480-A343-C9846EF544E4}.Release|x64.ActiveCfg = Release|x64 - {A38E5597-6916-4480-A343-C9846EF544E4}.Release|x64.Build.0 = Release|x64 {6F834EAD-7B94-4979-A0F1-A662E3D30145}.Debug|Win32.ActiveCfg = Debug|Win32 {6F834EAD-7B94-4979-A0F1-A662E3D30145}.Debug|Win32.Build.0 = Debug|Win32 {6F834EAD-7B94-4979-A0F1-A662E3D30145}.Debug|x64.ActiveCfg = Debug|x64 @@ -579,8 +543,6 @@ Global {CA25BDBF-B354-4597-B6D2-220ABBB0D2F4} = {6BB7A27F-FC59-4267-B6FA-D034176D1459} {AF7B2253-2E6D-4992-94D9-4B3699C54929} = {A64449B7-90FB-4E2B-A686-9EFC0E298644} {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1} = {A64449B7-90FB-4E2B-A686-9EFC0E298644} - {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7} = {B8C24D26-A3BF-4DA6-B64C-142CBA4BFE75} - {A38E5597-6916-4480-A343-C9846EF544E4} = {B8C24D26-A3BF-4DA6-B64C-142CBA4BFE75} {6F834EAD-7B94-4979-A0F1-A662E3D30145} = {B8C24D26-A3BF-4DA6-B64C-142CBA4BFE75} {7521DD92-56FF-4ECA-93E5-CCE50862354B} = {6BB7A27F-FC59-4267-B6FA-D034176D1459} {CA6F0834-0628-4CD7-8800-AEABCD636360} = {6BB7A27F-FC59-4267-B6FA-D034176D1459} diff --git a/projects/Win/vc14/hdr-test-set.vcxproj b/projects/Win/vc14/hdr-test-set.vcxproj deleted file mode 100644 index 979373bf..00000000 --- a/projects/Win/vc14/hdr-test-set.vcxproj +++ /dev/null @@ -1,449 +0,0 @@ - - - - - DebugVLD - Win32 - - - DebugVLD - x64 - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7} - hdrtestset - Win32Proj - 8.1 - - - - Application - MultiByte - v140 - - - Application - MultiByte - true - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - true - v140 - - - Application - MultiByte - v140 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-release\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-release\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - $(ProjectName)_d - $(ProjectName)_d - $(ProjectName)_d - $(ProjectName)_d - - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - Cdecl - 4520 - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - MultiplyDefinedSymbolOnly - - - - - X64 - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - Cdecl - 4520 - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - MultiplyDefinedSymbolOnly - - - - - /bigobj /Zc:inline %(AdditionalOptions) - Full - AnySuitable - true - Speed - false - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions) - true - MultiThreadedDLL - StreamingSIMDExtensions2 - - - Level3 - ProgramDatabase - Cdecl - false - 4520 - - - unit-prerequisites.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - true - MultiplyDefinedSymbolOnly - - - - - X64 - - - /bigobj /Zc:inline %(AdditionalOptions) - Full - AnySuitable - true - Speed - false - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) - true - MultiThreadedDLL - - - Level3 - ProgramDatabase - Cdecl - false - 4520 - - - unit-prerequisites.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - true - true - UseLinkTimeCodeGeneration - false - - - MachineX64 - true - MultiplyDefinedSymbolOnly - - - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - Cdecl - 4520 - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - MultiplyDefinedSymbolOnly - - - - - X64 - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - Cdecl - 4520 - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - MultiplyDefinedSymbolOnly - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/projects/Win/vc14/hdr-test-set.vcxproj.filters b/projects/Win/vc14/hdr-test-set.vcxproj.filters deleted file mode 100644 index 4b6cd72a..00000000 --- a/projects/Win/vc14/hdr-test-set.vcxproj.filters +++ /dev/null @@ -1,369 +0,0 @@ - - - - - intrusive - - - container - - - intrusive\skip_list - - - intrusive\skip_list - - - container\skip_list - - - container\skip_list - - - intrusive\feldman_hashset - - - container\feldman_hashset - - - - - {83622d26-addb-4c52-98b3-eaa62a1047b6} - - - {c0375a89-d67a-480a-83d2-d1cdd8d467e9} - - - {4719fe70-337c-4740-931e-548d21a39466} - - - {7786d807-8092-4310-9109-945854d26048} - - - {5b8a3b8a-27ad-49e7-9714-1859a842fd7f} - - - {dc053424-ec8d-46a7-9236-6a75f4dc0ad5} - - - {c1d0709e-ede1-4125-b4b8-eb3177ce05d2} - - - {61f94a40-c964-4233-af67-66a1be1e0aab} - - - {a878aed0-83c9-4ca7-95bb-74f10aad8bde} - - - {5268f225-1474-413e-a1cb-5f00b8df5e1e} - - - - - intrusive\michael_set - - - intrusive\michael_set - - - intrusive\michael_set - - - intrusive\michael_set - - - intrusive\michael_set - - - intrusive\michael_set - - - intrusive\michael_set - - - intrusive\michael_set - - - intrusive\michael_set - - - intrusive\michael_set - - - intrusive\skip_list - - - intrusive\skip_list - - - intrusive\split_list - - - intrusive\split_list - - - intrusive\split_list - - - intrusive\split_list - - - intrusive\split_list - - - intrusive\split_list - - - intrusive\split_list - - - intrusive\split_list - - - intrusive\split_list - - - intrusive\split_list - - - container\michael_set - - - container\michael_set - - - container\michael_set - - - container\michael_set - - - container\michael_set - - - container\michael_set - - - container\michael_set - - - container\michael_set - - - container\michael_set - - - container\skip_list - - - container\split_list - - - container\split_list - - - container\split_list - - - container\split_list - - - intrusive\skip_list - - - intrusive\skip_list - - - intrusive\skip_list - - - intrusive\skip_list - - - intrusive\skip_list - - - intrusive\skip_list - - - container\skip_list - - - container\skip_list - - - container\skip_list - - - intrusive\skip_list - - - intrusive\skip_list - - - container\skip_list - - - intrusive\michael_set - - - intrusive\michael_set - - - intrusive\michael_set - - - intrusive\michael_set - - - intrusive\skip_list - - - intrusive\skip_list - - - intrusive\skip_list - - - intrusive\skip_list - - - intrusive\split_list - - - intrusive\split_list - - - intrusive\split_list - - - intrusive\split_list - - - container\michael_set - - - container\michael_set - - - container\michael_set - - - container\michael_set - - - container\skip_list - - - container\skip_list - - - container\split_list - - - container\split_list - - - container\split_list - - - container\split_list - - - intrusive\michael_set - - - intrusive\michael_set - - - container\michael_set - - - container\michael_set - - - container\michael_set - - - container\split_list - - - container\split_list - - - intrusive\split_list - - - intrusive\split_list - - - container\split_list - - - container\split_list - - - container\split_list - - - container\split_list - - - container\split_list - - - container\split_list - - - intrusive\skip_list - - - intrusive\skip_list - - - container\skip_list - - - intrusive\feldman_hashset - - - intrusive\feldman_hashset - - - container\feldman_hashset - - - container\feldman_hashset - - - intrusive\feldman_hashset - - - intrusive\feldman_hashset - - - intrusive\feldman_hashset - - - intrusive\feldman_hashset - - - intrusive\feldman_hashset - - - container\feldman_hashset - - - container\feldman_hashset - - - container\feldman_hashset - - - container\feldman_hashset - - - container\feldman_hashset - - - \ No newline at end of file diff --git a/projects/Win/vc14/hdr-test-striped-set.vcxproj b/projects/Win/vc14/hdr-test-striped-set.vcxproj deleted file mode 100644 index 9b0e1270..00000000 --- a/projects/Win/vc14/hdr-test-striped-set.vcxproj +++ /dev/null @@ -1,386 +0,0 @@ - - - - - DebugVLD - Win32 - - - DebugVLD - x64 - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {A38E5597-6916-4480-A343-C9846EF544E4} - hdrteststripedset - Win32Proj - 8.1 - - - - Application - MultiByte - v140 - - - Application - MultiByte - true - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - true - v140 - - - Application - MultiByte - v140 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-release\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-release\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - $(ProjectName)_d - $(ProjectName)_d - $(ProjectName)_d - $(ProjectName)_d - - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions);_SCL_SECURE_NO_WARNINGS - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - Cdecl - 4520 - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - MultiplyDefinedSymbolOnly - - - - - X64 - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions);_SCL_SECURE_NO_WARNINGS - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - Cdecl - 4520 - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - MultiplyDefinedSymbolOnly - - - - - /bigobj /Zc:inline %(AdditionalOptions) - Full - AnySuitable - true - Speed - false - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions) - true - MultiThreadedDLL - StreamingSIMDExtensions2 - - - Level3 - ProgramDatabase - Cdecl - false - 4520 - - - unit-prerequisites.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - true - MultiplyDefinedSymbolOnly - - - - - X64 - - - /bigobj /Zc:inline %(AdditionalOptions) - Full - AnySuitable - true - Speed - false - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) - true - MultiThreadedDLL - - - Level3 - ProgramDatabase - Cdecl - false - 4520 - - - unit-prerequisites.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - true - true - UseLinkTimeCodeGeneration - false - - - MachineX64 - true - MultiplyDefinedSymbolOnly - - - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions);_SCL_SECURE_NO_WARNINGS - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - Cdecl - 4520 - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - MultiplyDefinedSymbolOnly - - - - - X64 - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions);_SCL_SECURE_NO_WARNINGS - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - Cdecl - 4520 - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - MultiplyDefinedSymbolOnly - - - - - - \ No newline at end of file diff --git a/projects/Win/vc14/hdr-test-striped-set.vcxproj.filters b/projects/Win/vc14/hdr-test-striped-set.vcxproj.filters deleted file mode 100644 index 80351d37..00000000 --- a/projects/Win/vc14/hdr-test-striped-set.vcxproj.filters +++ /dev/null @@ -1,168 +0,0 @@ - - - - - {4061d7f1-7ab8-4624-adb0-b4533e05a932} - - - {718f3de0-3b1c-4245-944c-0a56f288c6f7} - - - {db3df5e9-9ef5-407f-821d-e25b9cc70082} - - - {0147ba57-0ecc-4674-8d7b-7492054d3a48} - - - {ee3a372b-70df-47e6-bade-e7c4d1de7ec3} - - - {4c811e47-74dd-436d-93f7-686f35980069} - - - - - intrusive\cuckoo - - - intrusive\cuckoo - - - intrusive\striped - - - intrusive\striped - - - intrusive\striped - - - intrusive\striped - - - intrusive\striped - - - intrusive\striped - - - intrusive\striped - - - intrusive\striped - - - intrusive\striped - - - intrusive\striped - - - intrusive\striped - - - intrusive\striped - - - intrusive\striped - - - intrusive\striped - - - intrusive\striped - - - intrusive\striped - - - intrusive\striped - - - container\cuckoo - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - container\striped - - - - - intrusive\cuckoo - - - intrusive\cuckoo - - - intrusive\striped - - - container\cuckoo - - - container\striped - - - \ No newline at end of file diff --git a/projects/source.test-hdr.mk b/projects/source.test-hdr.mk index e593b1ed..981138d5 100644 --- a/projects/source.test-hdr.mk +++ b/projects/source.test-hdr.mk @@ -64,109 +64,6 @@ CDS_TESTHDR_MAP := \ tests/test-hdr/map/hdr_striped_hashmap_slist.cpp \ tests/test-hdr/map/hdr_striped_map_reg.cpp -CDS_TESTHDR_SET := \ - tests/test-hdr/set/hdr_intrusive_feldman_hashset_hp.cpp \ - tests/test-hdr/set/hdr_intrusive_feldman_hashset_dhp.cpp \ - tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_gpi.cpp \ - tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_gpb.cpp \ - tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_gpt.cpp \ - tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_shb.cpp \ - tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_sht.cpp \ - tests/test-hdr/set/hdr_intrusive_refinable_hashset_avlset.cpp \ - tests/test-hdr/set/hdr_intrusive_refinable_hashset_list.cpp \ - tests/test-hdr/set/hdr_intrusive_refinable_hashset_set.cpp \ - tests/test-hdr/set/hdr_intrusive_refinable_hashset_sgset.cpp \ - tests/test-hdr/set/hdr_intrusive_refinable_hashset_slist.cpp \ - tests/test-hdr/set/hdr_intrusive_refinable_hashset_splayset.cpp \ - tests/test-hdr/set/hdr_intrusive_refinable_hashset_treapset.cpp \ - tests/test-hdr/set/hdr_intrusive_refinable_hashset_uset.cpp \ - tests/test-hdr/set/hdr_intrusive_skiplist_hp.cpp \ - tests/test-hdr/set/hdr_intrusive_skiplist_dhp.cpp \ - tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpb.cpp \ - tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpi.cpp \ - tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpt.cpp \ - tests/test-hdr/set/hdr_intrusive_skiplist_rcu_shb.cpp \ - tests/test-hdr/set/hdr_intrusive_skiplist_rcu_sht.cpp \ - tests/test-hdr/set/hdr_intrusive_skiplist_nogc.cpp \ - tests/test-hdr/set/hdr_intrusive_striped_hashset_avlset.cpp \ - tests/test-hdr/set/hdr_intrusive_striped_hashset_list.cpp \ - tests/test-hdr/set/hdr_intrusive_striped_hashset_set.cpp \ - tests/test-hdr/set/hdr_intrusive_striped_hashset_sgset.cpp \ - tests/test-hdr/set/hdr_intrusive_striped_hashset_slist.cpp \ - tests/test-hdr/set/hdr_intrusive_striped_hashset_splayset.cpp \ - tests/test-hdr/set/hdr_intrusive_striped_hashset_treapset.cpp \ - tests/test-hdr/set/hdr_intrusive_striped_hashset_uset.cpp \ - tests/test-hdr/set/hdr_intrusive_striped_set.cpp \ - tests/test-hdr/set/hdr_michael_set_hp.cpp \ - tests/test-hdr/set/hdr_michael_set_dhp.cpp \ - tests/test-hdr/set/hdr_michael_set_rcu_gpi.cpp \ - tests/test-hdr/set/hdr_michael_set_rcu_gpb.cpp \ - tests/test-hdr/set/hdr_michael_set_rcu_gpt.cpp \ - tests/test-hdr/set/hdr_michael_set_rcu_shb.cpp \ - tests/test-hdr/set/hdr_michael_set_rcu_sht.cpp \ - tests/test-hdr/set/hdr_michael_set_nogc.cpp \ - tests/test-hdr/set/hdr_michael_set_lazy_hp.cpp \ - tests/test-hdr/set/hdr_michael_set_lazy_dhp.cpp \ - tests/test-hdr/set/hdr_michael_set_lazy_rcu_gpi.cpp \ - tests/test-hdr/set/hdr_michael_set_lazy_rcu_gpb.cpp \ - tests/test-hdr/set/hdr_michael_set_lazy_rcu_gpt.cpp \ - tests/test-hdr/set/hdr_michael_set_lazy_rcu_shb.cpp \ - tests/test-hdr/set/hdr_michael_set_lazy_rcu_sht.cpp \ - tests/test-hdr/set/hdr_michael_set_lazy_nogc.cpp \ - tests/test-hdr/set/hdr_feldman_hashset_hp.cpp \ - tests/test-hdr/set/hdr_feldman_hashset_dhp.cpp \ - tests/test-hdr/set/hdr_feldman_hashset_rcu_gpb.cpp \ - tests/test-hdr/set/hdr_feldman_hashset_rcu_gpi.cpp \ - tests/test-hdr/set/hdr_feldman_hashset_rcu_gpt.cpp \ - tests/test-hdr/set/hdr_feldman_hashset_rcu_shb.cpp \ - tests/test-hdr/set/hdr_feldman_hashset_rcu_sht.cpp \ - tests/test-hdr/set/hdr_refinable_hashset_hashset_std.cpp \ - tests/test-hdr/set/hdr_refinable_hashset_boost_flat_set.cpp \ - tests/test-hdr/set/hdr_refinable_hashset_boost_list.cpp \ - tests/test-hdr/set/hdr_refinable_hashset_boost_set.cpp \ - tests/test-hdr/set/hdr_refinable_hashset_boost_stable_vector.cpp \ - tests/test-hdr/set/hdr_refinable_hashset_boost_unordered_set.cpp \ - tests/test-hdr/set/hdr_refinable_hashset_boost_vector.cpp \ - tests/test-hdr/set/hdr_refinable_hashset_list.cpp \ - tests/test-hdr/set/hdr_refinable_hashset_set.cpp \ - tests/test-hdr/set/hdr_refinable_hashset_slist.cpp \ - tests/test-hdr/set/hdr_refinable_hashset_vector.cpp \ - tests/test-hdr/set/hdr_skiplist_set_hp.cpp \ - tests/test-hdr/set/hdr_skiplist_set_dhp.cpp \ - tests/test-hdr/set/hdr_skiplist_set_rcu_gpi.cpp \ - tests/test-hdr/set/hdr_skiplist_set_rcu_gpb.cpp \ - tests/test-hdr/set/hdr_skiplist_set_rcu_gpt.cpp \ - tests/test-hdr/set/hdr_skiplist_set_rcu_shb.cpp \ - tests/test-hdr/set/hdr_skiplist_set_rcu_sht.cpp \ - tests/test-hdr/set/hdr_skiplist_set_nogc.cpp \ - tests/test-hdr/set/hdr_splitlist_set_hp.cpp \ - tests/test-hdr/set/hdr_splitlist_set_nogc.cpp \ - tests/test-hdr/set/hdr_splitlist_set_dhp.cpp \ - tests/test-hdr/set/hdr_splitlist_set_rcu_gpi.cpp \ - tests/test-hdr/set/hdr_splitlist_set_rcu_gpb.cpp \ - tests/test-hdr/set/hdr_splitlist_set_rcu_gpt.cpp \ - tests/test-hdr/set/hdr_splitlist_set_rcu_shb.cpp \ - tests/test-hdr/set/hdr_splitlist_set_rcu_sht.cpp \ - tests/test-hdr/set/hdr_splitlist_set_lazy_hp.cpp \ - tests/test-hdr/set/hdr_splitlist_set_lazy_nogc.cpp \ - tests/test-hdr/set/hdr_splitlist_set_lazy_dhp.cpp \ - tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpi.cpp \ - tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpb.cpp \ - tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpt.cpp \ - tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_shb.cpp \ - tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_sht.cpp \ - tests/test-hdr/set/hdr_striped_hashset_hashset_std.cpp \ - tests/test-hdr/set/hdr_striped_hashset_boost_flat_set.cpp \ - tests/test-hdr/set/hdr_striped_hashset_boost_list.cpp \ - tests/test-hdr/set/hdr_striped_hashset_boost_set.cpp \ - tests/test-hdr/set/hdr_striped_hashset_boost_stable_vector.cpp \ - tests/test-hdr/set/hdr_striped_hashset_boost_unordered_set.cpp \ - tests/test-hdr/set/hdr_striped_hashset_boost_vector.cpp \ - tests/test-hdr/set/hdr_striped_hashset_list.cpp \ - tests/test-hdr/set/hdr_striped_hashset_set.cpp \ - tests/test-hdr/set/hdr_striped_hashset_slist.cpp \ - tests/test-hdr/set/hdr_striped_hashset_vector.cpp - CDS_TESTHDR_TREE := \ tests/test-hdr/tree/hdr_tree_reg.cpp \ tests/test-hdr/tree/hdr_intrusive_ellen_bintree_hp.cpp \ @@ -216,7 +113,6 @@ CDS_TESTHDR_MISC := \ CDS_TESTHDR_SOURCES := \ $(CDS_TESTHDR_MAP) \ - $(CDS_TESTHDR_SET) \ $(CDS_TESTHDR_TREE) \ $(CDS_TESTHDR_MISC) diff --git a/projects/source.test-hdr.offsetof.mk b/projects/source.test-hdr.offsetof.mk index 7b728af1..ca559e89 100644 --- a/projects/source.test-hdr.offsetof.mk +++ b/projects/source.test-hdr.offsetof.mk @@ -1,51 +1,6 @@ CDS_TESTHDR_OFFSETOF_MAP := \ tests/test-hdr/map/hdr_cuckoo_map.cpp -CDS_TESTHDR_OFFSETOF_SET := \ - tests/test-hdr/set/hdr_cuckoo_set.cpp \ - tests/test-hdr/set/hdr_intrusive_cuckoo_set.cpp \ - tests/test-hdr/set/hdr_intrusive_cuckoo_refinable_set.cpp \ - tests/test-hdr/set/hdr_intrusive_michael_set_hp.cpp \ - tests/test-hdr/set/hdr_intrusive_michael_set_dhp.cpp \ - tests/test-hdr/set/hdr_intrusive_michael_set_nogc.cpp \ - tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpi.cpp \ - tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpb.cpp \ - tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpt.cpp \ - tests/test-hdr/set/hdr_intrusive_michael_set_rcu_shb.cpp \ - tests/test-hdr/set/hdr_intrusive_michael_set_rcu_sht.cpp \ - tests/test-hdr/set/hdr_intrusive_michael_set_hp_lazy.cpp \ - tests/test-hdr/set/hdr_intrusive_michael_set_dhp_lazy.cpp \ - tests/test-hdr/set/hdr_intrusive_michael_set_nogc_lazy.cpp \ - tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpi_lazy.cpp \ - tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpb_lazy.cpp \ - tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpt_lazy.cpp \ - tests/test-hdr/set/hdr_intrusive_michael_set_rcu_shb_lazy.cpp \ - tests/test-hdr/set/hdr_intrusive_michael_set_rcu_sht_lazy.cpp \ - tests/test-hdr/set/hdr_intrusive_skiplist_hp_member.cpp \ - tests/test-hdr/set/hdr_intrusive_skiplist_dhp_member.cpp \ - tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpi_member.cpp \ - tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpb_member.cpp \ - tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpt_member.cpp \ - tests/test-hdr/set/hdr_intrusive_skiplist_rcu_shb_member.cpp \ - tests/test-hdr/set/hdr_intrusive_skiplist_rcu_sht_member.cpp \ - tests/test-hdr/set/hdr_intrusive_skiplist_nogc_member.cpp \ - tests/test-hdr/set/hdr_intrusive_splitlist_set_hp.cpp \ - tests/test-hdr/set/hdr_intrusive_splitlist_set_nogc.cpp \ - tests/test-hdr/set/hdr_intrusive_splitlist_set_dhp.cpp \ - tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb.cpp \ - tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi.cpp \ - tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt.cpp \ - tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb.cpp \ - tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht.cpp \ - tests/test-hdr/set/hdr_intrusive_splitlist_set_hp_lazy.cpp \ - tests/test-hdr/set/hdr_intrusive_splitlist_set_nogc_lazy.cpp \ - tests/test-hdr/set/hdr_intrusive_splitlist_set_dhp_lazy.cpp \ - tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb_lazy.cpp \ - tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi_lazy.cpp \ - tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt_lazy.cpp \ - tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb_lazy.cpp \ - tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht_lazy.cpp - CDS_TESTHDR_OFFSETOF_TREE := \ tests/test-hdr/tree/hdr_intrusive_ellen_bintree_hp_member.cpp \ tests/test-hdr/tree/hdr_intrusive_ellen_bintree_dhp_member.cpp \ @@ -57,5 +12,4 @@ CDS_TESTHDR_OFFSETOF_TREE := \ CDS_TESTHDR_OFFSETOF_SOURCES := \ $(CDS_TESTHDR_OFFSETOF_MAP) \ - $(CDS_TESTHDR_OFFSETOF_SET) \ $(CDS_TESTHDR_OFFSETOF_TREE) diff --git a/tests/test-hdr/CMakeLists.txt b/tests/test-hdr/CMakeLists.txt index 35c3ab18..ad887533 100644 --- a/tests/test-hdr/CMakeLists.txt +++ b/tests/test-hdr/CMakeLists.txt @@ -66,109 +66,6 @@ set(CDS_TESTHDR_MAP map/hdr_striped_hashmap_slist.cpp map/hdr_striped_map_reg.cpp) -set(CDS_TESTHDR_SET - set/hdr_intrusive_feldman_hashset_hp.cpp - set/hdr_intrusive_feldman_hashset_dhp.cpp - set/hdr_intrusive_feldman_hashset_rcu_gpi.cpp - set/hdr_intrusive_feldman_hashset_rcu_gpb.cpp - set/hdr_intrusive_feldman_hashset_rcu_gpt.cpp - set/hdr_intrusive_feldman_hashset_rcu_shb.cpp - set/hdr_intrusive_feldman_hashset_rcu_sht.cpp - set/hdr_intrusive_refinable_hashset_avlset.cpp - set/hdr_intrusive_refinable_hashset_list.cpp - set/hdr_intrusive_refinable_hashset_set.cpp - set/hdr_intrusive_refinable_hashset_sgset.cpp - set/hdr_intrusive_refinable_hashset_slist.cpp - set/hdr_intrusive_refinable_hashset_splayset.cpp - set/hdr_intrusive_refinable_hashset_treapset.cpp - set/hdr_intrusive_refinable_hashset_uset.cpp - set/hdr_intrusive_skiplist_hp.cpp - set/hdr_intrusive_skiplist_dhp.cpp - set/hdr_intrusive_skiplist_rcu_gpb.cpp - set/hdr_intrusive_skiplist_rcu_gpi.cpp - set/hdr_intrusive_skiplist_rcu_gpt.cpp - set/hdr_intrusive_skiplist_rcu_shb.cpp - set/hdr_intrusive_skiplist_rcu_sht.cpp - set/hdr_intrusive_skiplist_nogc.cpp - set/hdr_intrusive_striped_hashset_avlset.cpp - set/hdr_intrusive_striped_hashset_list.cpp - set/hdr_intrusive_striped_hashset_set.cpp - set/hdr_intrusive_striped_hashset_sgset.cpp - set/hdr_intrusive_striped_hashset_slist.cpp - set/hdr_intrusive_striped_hashset_splayset.cpp - set/hdr_intrusive_striped_hashset_treapset.cpp - set/hdr_intrusive_striped_hashset_uset.cpp - set/hdr_intrusive_striped_set.cpp - set/hdr_michael_set_hp.cpp - set/hdr_michael_set_dhp.cpp - set/hdr_michael_set_rcu_gpi.cpp - set/hdr_michael_set_rcu_gpb.cpp - set/hdr_michael_set_rcu_gpt.cpp - set/hdr_michael_set_rcu_shb.cpp - set/hdr_michael_set_rcu_sht.cpp - set/hdr_michael_set_nogc.cpp - set/hdr_michael_set_lazy_hp.cpp - set/hdr_michael_set_lazy_dhp.cpp - set/hdr_michael_set_lazy_rcu_gpi.cpp - set/hdr_michael_set_lazy_rcu_gpb.cpp - set/hdr_michael_set_lazy_rcu_gpt.cpp - set/hdr_michael_set_lazy_rcu_shb.cpp - set/hdr_michael_set_lazy_rcu_sht.cpp - set/hdr_michael_set_lazy_nogc.cpp - set/hdr_feldman_hashset_hp.cpp - set/hdr_feldman_hashset_dhp.cpp - set/hdr_feldman_hashset_rcu_gpb.cpp - set/hdr_feldman_hashset_rcu_gpi.cpp - set/hdr_feldman_hashset_rcu_gpt.cpp - set/hdr_feldman_hashset_rcu_shb.cpp - set/hdr_feldman_hashset_rcu_sht.cpp - set/hdr_refinable_hashset_hashset_std.cpp - set/hdr_refinable_hashset_boost_flat_set.cpp - set/hdr_refinable_hashset_boost_list.cpp - set/hdr_refinable_hashset_boost_set.cpp - set/hdr_refinable_hashset_boost_stable_vector.cpp - set/hdr_refinable_hashset_boost_unordered_set.cpp - set/hdr_refinable_hashset_boost_vector.cpp - set/hdr_refinable_hashset_list.cpp - set/hdr_refinable_hashset_set.cpp - set/hdr_refinable_hashset_slist.cpp - set/hdr_refinable_hashset_vector.cpp - set/hdr_skiplist_set_hp.cpp - set/hdr_skiplist_set_dhp.cpp - set/hdr_skiplist_set_rcu_gpi.cpp - set/hdr_skiplist_set_rcu_gpb.cpp - set/hdr_skiplist_set_rcu_gpt.cpp - set/hdr_skiplist_set_rcu_shb.cpp - set/hdr_skiplist_set_rcu_sht.cpp - set/hdr_skiplist_set_nogc.cpp - set/hdr_splitlist_set_hp.cpp - set/hdr_splitlist_set_nogc.cpp - set/hdr_splitlist_set_dhp.cpp - set/hdr_splitlist_set_rcu_gpi.cpp - set/hdr_splitlist_set_rcu_gpb.cpp - set/hdr_splitlist_set_rcu_gpt.cpp - set/hdr_splitlist_set_rcu_shb.cpp - set/hdr_splitlist_set_rcu_sht.cpp - set/hdr_splitlist_set_lazy_hp.cpp - set/hdr_splitlist_set_lazy_nogc.cpp - set/hdr_splitlist_set_lazy_dhp.cpp - set/hdr_splitlist_set_lazy_rcu_gpi.cpp - set/hdr_splitlist_set_lazy_rcu_gpb.cpp - set/hdr_splitlist_set_lazy_rcu_gpt.cpp - set/hdr_splitlist_set_lazy_rcu_shb.cpp - set/hdr_splitlist_set_lazy_rcu_sht.cpp - set/hdr_striped_hashset_hashset_std.cpp - set/hdr_striped_hashset_boost_flat_set.cpp - set/hdr_striped_hashset_boost_list.cpp - set/hdr_striped_hashset_boost_set.cpp - set/hdr_striped_hashset_boost_stable_vector.cpp - set/hdr_striped_hashset_boost_unordered_set.cpp - set/hdr_striped_hashset_boost_vector.cpp - set/hdr_striped_hashset_list.cpp - set/hdr_striped_hashset_set.cpp - set/hdr_striped_hashset_slist.cpp - set/hdr_striped_hashset_vector.cpp) - set(CDS_TESTHDR_TREE tree/hdr_tree_reg.cpp tree/hdr_intrusive_ellen_bintree_hp.cpp @@ -219,51 +116,6 @@ set(CDS_TESTHDR_MISC set(CDS_TESTHDR_OFFSETOF_MAP map/hdr_cuckoo_map.cpp) -set(CDS_TESTHDR_OFFSETOF_SET - set/hdr_cuckoo_set.cpp - set/hdr_intrusive_cuckoo_set.cpp - set/hdr_intrusive_cuckoo_refinable_set.cpp - set/hdr_intrusive_michael_set_hp.cpp - set/hdr_intrusive_michael_set_dhp.cpp - set/hdr_intrusive_michael_set_nogc.cpp - set/hdr_intrusive_michael_set_rcu_gpi.cpp - set/hdr_intrusive_michael_set_rcu_gpb.cpp - set/hdr_intrusive_michael_set_rcu_gpt.cpp - set/hdr_intrusive_michael_set_rcu_shb.cpp - set/hdr_intrusive_michael_set_rcu_sht.cpp - set/hdr_intrusive_michael_set_hp_lazy.cpp - set/hdr_intrusive_michael_set_dhp_lazy.cpp - set/hdr_intrusive_michael_set_nogc_lazy.cpp - set/hdr_intrusive_michael_set_rcu_gpi_lazy.cpp - set/hdr_intrusive_michael_set_rcu_gpb_lazy.cpp - set/hdr_intrusive_michael_set_rcu_gpt_lazy.cpp - set/hdr_intrusive_michael_set_rcu_shb_lazy.cpp - set/hdr_intrusive_michael_set_rcu_sht_lazy.cpp - set/hdr_intrusive_skiplist_hp_member.cpp - set/hdr_intrusive_skiplist_dhp_member.cpp - set/hdr_intrusive_skiplist_rcu_gpi_member.cpp - set/hdr_intrusive_skiplist_rcu_gpb_member.cpp - set/hdr_intrusive_skiplist_rcu_gpt_member.cpp - set/hdr_intrusive_skiplist_rcu_shb_member.cpp - set/hdr_intrusive_skiplist_rcu_sht_member.cpp - set/hdr_intrusive_skiplist_nogc_member.cpp - set/hdr_intrusive_splitlist_set_hp.cpp - set/hdr_intrusive_splitlist_set_nogc.cpp - set/hdr_intrusive_splitlist_set_dhp.cpp - set/hdr_intrusive_splitlist_set_rcu_gpb.cpp - set/hdr_intrusive_splitlist_set_rcu_gpi.cpp - set/hdr_intrusive_splitlist_set_rcu_gpt.cpp - set/hdr_intrusive_splitlist_set_rcu_shb.cpp - set/hdr_intrusive_splitlist_set_rcu_sht.cpp - set/hdr_intrusive_splitlist_set_hp_lazy.cpp - set/hdr_intrusive_splitlist_set_nogc_lazy.cpp - set/hdr_intrusive_splitlist_set_dhp_lazy.cpp - set/hdr_intrusive_splitlist_set_rcu_gpb_lazy.cpp - set/hdr_intrusive_splitlist_set_rcu_gpi_lazy.cpp - set/hdr_intrusive_splitlist_set_rcu_gpt_lazy.cpp - set/hdr_intrusive_splitlist_set_rcu_shb_lazy.cpp - set/hdr_intrusive_splitlist_set_rcu_sht_lazy.cpp) - set(CDS_TESTHDR_OFFSETOF_TREE tree/hdr_intrusive_ellen_bintree_hp_member.cpp tree/hdr_intrusive_ellen_bintree_dhp_member.cpp @@ -275,7 +127,6 @@ set(CDS_TESTHDR_OFFSETOF_TREE set(CDS_TESTHDR_OFFSETOF_SOURCES ${CDS_TESTHDR_OFFSETOF_MAP} - ${CDS_TESTHDR_OFFSETOF_SET} ${CDS_TESTHDR_OFFSETOF_TREE}) add_library(test-hdr-offsetof OBJECT ${CDS_TESTHDR_OFFSETOF_SOURCES}) @@ -286,7 +137,6 @@ endif(CMAKE_COMPILER_IS_GNUCC) set(CDS_TESTHDR_SOURCES ${CDS_TESTHDR_MAP} - ${CDS_TESTHDR_SET} ${CDS_TESTHDR_TREE} ${CDS_TESTHDR_MISC}) diff --git a/tests/test-hdr/set/hdr_cuckoo_set.cpp b/tests/test-hdr/set/hdr_cuckoo_set.cpp deleted file mode 100644 index 31586bf9..00000000 --- a/tests/test-hdr/set/hdr_cuckoo_set.cpp +++ /dev/null @@ -1,658 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_cuckoo_set.h" -#include - -namespace set { - - void CuckooSetHdrTest::Cuckoo_Striped_list_unord() - { - struct set_traits : public cc::cuckoo::traits { - typedef equal equal_to; - typedef co::hash_tuple< hash1, hash2 > hash; - }; - - typedef cc::CuckooSet< item, set_traits > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Striped_list_unord_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::striping<> > - ,co::equal_to< equal< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::list > - ,co::hash< std::tuple< hash1, hash2 > > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Striped_list_cmp() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::compare< cmp< item > > - ,cc::cuckoo::store_hash< false > - ,cc::cuckoo::probeset_type< cc::cuckoo::list > - ,co::hash< std::tuple< hash1, hash2 > > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Striped_list_cmp_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::striping<> > - ,co::compare< cmp< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::list > - ,co::hash< std::tuple< hash1, hash2 > > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Striped_list_less() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::less< less< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::mutex_policy< cc::cuckoo::striping<> > - ,cc::cuckoo::store_hash< false > - ,cc::cuckoo::probeset_type< cc::cuckoo::list > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Striped_list_less_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::striping<> > - ,co::less< less< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::list > - ,co::hash< std::tuple< hash1, hash2 > > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Striped_list_less_cmp() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::less< less< item > > - ,co::compare< cmp< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::mutex_policy< cc::cuckoo::striping<> > - ,cc::cuckoo::store_hash< false > - ,cc::cuckoo::probeset_type< cc::cuckoo::list > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Striped_list_less_cmp_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::striping<> > - ,co::less< less< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< cmp< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::list > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Striped_list_less_cmp_eq() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::less< less< item > > - ,co::compare< cmp< item > > - ,co::equal_to< equal< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::mutex_policy< cc::cuckoo::striping<> > - ,cc::cuckoo::store_hash< false > - ,cc::cuckoo::probeset_type< cc::cuckoo::list > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Striped_list_less_cmp_eq_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::striping<> > - ,co::less< less< item > > - ,co::compare< cmp< item > > - ,co::equal_to< equal< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::list > - ,co::hash< std::tuple< hash1, hash2 > > - >::type - > set_t; - - test_int >(); - } - - - // Vector - void CuckooSetHdrTest::Cuckoo_Striped_vector_unord() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::equal_to< equal< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Striped_vector_unord_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::striping<> > - ,co::equal_to< equal< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - ,co::hash< std::tuple< hash1, hash2 > > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Striped_vector_cmp() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::compare< cmp< item > > - ,cc::cuckoo::store_hash< false > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - ,co::hash< std::tuple< hash1, hash2 > > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Striped_vector_cmp_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::striping<> > - ,co::compare< cmp< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - ,co::hash< std::tuple< hash1, hash2 > > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Striped_vector_less() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::less< less< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::mutex_policy< cc::cuckoo::striping<> > - ,cc::cuckoo::store_hash< false > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Striped_vector_less_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::striping<> > - ,co::less< less< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - ,co::hash< std::tuple< hash1, hash2 > > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Striped_vector_less_cmp() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::less< less< item > > - ,co::compare< cmp< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::mutex_policy< cc::cuckoo::striping<> > - ,cc::cuckoo::store_hash< false > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Striped_vector_less_cmp_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::striping<> > - ,co::less< less< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< cmp< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Striped_vector_less_cmp_eq() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::less< less< item > > - ,co::compare< cmp< item > > - ,co::equal_to< equal< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::mutex_policy< cc::cuckoo::striping<> > - ,cc::cuckoo::store_hash< false > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Striped_vector_less_cmp_eq_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::striping<> > - ,co::less< less< item > > - ,co::compare< cmp< item > > - ,co::equal_to< equal< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - ,co::hash< std::tuple< hash1, hash2 > > - >::type - > set_t; - - test_int >(); - } - - // Refinable set - void CuckooSetHdrTest::Cuckoo_Refinable_list_unord() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::equal_to< equal< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::mutex_policy< cc::cuckoo::refinable<> > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Refinable_list_unord_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::refinable<> > - ,co::equal_to< equal< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::list > - ,co::hash< std::tuple< hash1, hash2 > > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Refinable_list_cmp() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::compare< cmp< item > > - ,cc::cuckoo::store_hash< false > - ,cc::cuckoo::probeset_type< cc::cuckoo::list > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::mutex_policy< cc::cuckoo::refinable<> > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Refinable_list_cmp_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::refinable<> > - ,co::compare< cmp< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::list > - ,co::hash< std::tuple< hash1, hash2 > > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Refinable_list_less() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::less< less< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::mutex_policy< cc::cuckoo::refinable<> > - ,cc::cuckoo::store_hash< false > - ,cc::cuckoo::probeset_type< cc::cuckoo::list > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Refinable_list_less_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::refinable<> > - ,co::less< less< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::list > - ,co::hash< std::tuple< hash1, hash2 > > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Refinable_list_less_cmp() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::less< less< item > > - ,co::compare< cmp< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::mutex_policy< cc::cuckoo::refinable<> > - ,cc::cuckoo::store_hash< false > - ,cc::cuckoo::probeset_type< cc::cuckoo::list > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Refinable_list_less_cmp_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::refinable<> > - ,co::less< less< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< cmp< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::list > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Refinable_list_less_cmp_eq() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::less< less< item > > - ,co::compare< cmp< item > > - ,co::equal_to< equal< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::mutex_policy< cc::cuckoo::refinable<> > - ,cc::cuckoo::store_hash< false > - ,cc::cuckoo::probeset_type< cc::cuckoo::list > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Refinable_list_less_cmp_eq_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::refinable<> > - ,co::less< less< item > > - ,co::compare< cmp< item > > - ,co::equal_to< equal< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::list > - ,co::hash< std::tuple< hash1, hash2 > > - >::type - > set_t; - - test_int >(); - } - - - - // Refinable Vector - void CuckooSetHdrTest::Cuckoo_Refinable_vector_unord() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::equal_to< equal< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - ,co::mutex_policy< cc::cuckoo::refinable<> > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Refinable_vector_unord_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::refinable<> > - ,co::equal_to< equal< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - ,co::hash< std::tuple< hash1, hash2 > > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Refinable_vector_cmp() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::compare< cmp< item > > - ,cc::cuckoo::store_hash< false > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::mutex_policy< cc::cuckoo::refinable<> > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Refinable_vector_cmp_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::refinable<> > - ,co::compare< cmp< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - ,co::hash< std::tuple< hash1, hash2 > > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Refinable_vector_less() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::less< less< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::mutex_policy< cc::cuckoo::refinable<> > - ,cc::cuckoo::store_hash< false > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Refinable_vector_less_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::refinable<> > - ,co::less< less< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - ,co::hash< std::tuple< hash1, hash2 > > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Refinable_vector_less_cmp() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::less< less< item > > - ,co::compare< cmp< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::mutex_policy< cc::cuckoo::refinable<> > - ,cc::cuckoo::store_hash< false > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Refinable_vector_less_cmp_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::refinable<> > - ,co::less< less< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< cmp< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Refinable_vector_less_cmp_eq() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::less< less< item > > - ,co::compare< cmp< item > > - ,co::equal_to< equal< item > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::mutex_policy< cc::cuckoo::refinable<> > - ,cc::cuckoo::store_hash< false > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - >::type - > set_t; - - test_int >(); - } - - void CuckooSetHdrTest::Cuckoo_Refinable_vector_less_cmp_eq_storehash() - { - typedef cc::CuckooSet< item, - cc::cuckoo::make_traits< - co::mutex_policy< cc::cuckoo::refinable<> > - ,co::less< less< item > > - ,co::compare< cmp< item > > - ,co::equal_to< equal< item > > - ,cc::cuckoo::store_hash< true > - ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - ,co::hash< std::tuple< hash1, hash2 > > - >::type - > set_t; - - test_int >(); - } - -} // namespace set - -CPPUNIT_TEST_SUITE_REGISTRATION(set::CuckooSetHdrTest); diff --git a/tests/test-hdr/set/hdr_cuckoo_set.h b/tests/test-hdr/set/hdr_cuckoo_set.h deleted file mode 100644 index 4e95b728..00000000 --- a/tests/test-hdr/set/hdr_cuckoo_set.h +++ /dev/null @@ -1,636 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_CUCKOO_SET_H -#define CDSTEST_HDR_CUCKOO_SET_H - -#include "cppunit/cppunit_proxy.h" -#include "size_check.h" - -#include -#include -#include // ref - -// forward namespace declaration -namespace cds { - namespace container {} - namespace opt {} -} - -namespace set { - using misc::check_size; - - namespace cc = cds::container; - namespace co = cds::opt; - - - class CuckooSetHdrTest: public CppUnitMini::TestCase - { - public: - struct stat - { - unsigned int nFindCount ; // count of find-functor calling - unsigned int nUpdateNewCount; - unsigned int nUpdateCount; - - stat() - { - memset( this, 0, sizeof(*this)); - } - - void copy( stat const& s ) - { - nFindCount = s.nFindCount; - nUpdateCount = s.nUpdateCount; - nUpdateNewCount = s.nUpdateNewCount; - } - }; - - struct item: public stat - { - int nKey; - int nVal; - - item() - {} - - item( int key ) - : nKey( key ) - , nVal( key ) - {} - - item (int key, int val ) - : nKey(key) - , nVal( val ) - {} - - item( std::pair const& p ) - : nKey( p.first ) - , nVal( p.second ) - {} - - item( item const& i ) - : nKey( i.nKey ) - , nVal( i.nVal ) - {} - - item& operator=(item const& i) - { - nKey = i.nKey; - nVal = i.nVal; - stat::copy(i); - - return *this; - } - - item( item&& i ) - : nKey( i.nKey ) - , nVal( i.nVal ) - {} - - int key() const - { - return nKey; - } - - int val() const - { - return nVal; - } - }; - - struct hash1 { - size_t operator()( int i ) const - { - return co::v::hash()( i ); - } - - size_t operator()( std::pair const& i ) const - { - return co::v::hash()( i.first ); - } - - template - size_t operator()( Item const& i ) const - { - return (*this)( i.key() ); - } - }; - - struct hash2: private hash1 - { - typedef hash1 base_class; - - size_t operator()( int i ) const - { - return ~( base_class::operator()(i)); - } - template - size_t operator()( const Item& i ) const - { - return ~( base_class::operator()(i)); - } - size_t operator()( std::pair const& i ) const - { - return ~( base_class::operator()(i)); - } - }; - - struct simple_item_counter { - size_t m_nCount; - - simple_item_counter() - : m_nCount(0) - {} - - size_t operator ++() - { - return ++m_nCount; - } - - size_t operator --() - { - return --m_nCount; - } - - void reset() - { - m_nCount = 0; - } - - operator size_t() const - { - return m_nCount; - } - }; - - template - struct less - { - bool operator ()(const T& v1, const T& v2 ) const - { - return v1.key() < v2.key(); - } - - template - bool operator ()(const T& v1, const Q& v2 ) const - { - return v1.key() < v2; - } - - template - bool operator ()(const Q& v1, const T& v2 ) const - { - return v1 < v2.key(); - } - - bool operator ()( std::pair const& v1, const T& v2 ) const - { - return v1.first < v2.key(); - } - - bool operator ()(const T& v1, std::pair const& v2 ) const - { - return v1.key() < v2.first; - } - }; - - template - struct cmp { - int operator ()(const T& v1, const T& v2 ) const - { - if ( v1.key() < v2.key() ) - return -1; - return v1.key() > v2.key() ? 1 : 0; - } - - template - int operator ()(const T& v1, const Q& v2 ) const - { - if ( v1.key() < v2 ) - return -1; - return v1.key() > v2 ? 1 : 0; - } - - template - int operator ()(const Q& v1, const T& v2 ) const - { - if ( v1 < v2.key() ) - return -1; - return v1 > v2.key() ? 1 : 0; - } - - int operator()( std::pair const& v1, T const& v2 ) const - { - if ( v1.first < v2.key() ) - return -1; - return v1.first > v2.key() ? 1 : 0; - } - - int operator()( T const& v1, std::pair const& v2 ) const - { - if ( v1.key() < v2.first ) - return -1; - return v1.key() > v2.first ? 1 : 0; - } - }; - - template - struct equal - { - bool operator ()(const T& v1, const T& v2 ) const - { - return v1.key() == v2.key(); - } - - template - bool operator ()(const T& v1, const Q& v2 ) const - { - return v1.key() == v2; - } - - template - bool operator ()(const Q& v1, const T& v2 ) const - { - return v1 == v2.key(); - } - - bool operator ()( std::pair const& v1, const T& v2 ) const - { - return v1.first == v2.key(); - } - - bool operator ()(const T& v1, std::pair const& v2 ) const - { - return v1.key() == v2.first; - } - }; - - struct find_functor - { - template - void operator()( Item& i, T& /*val*/ ) - { - ++i.nFindCount; - } - template - void operator()( Item& i, T const& /*val*/ ) - { - ++i.nFindCount; - } - }; - - template - struct copy_found - { - Item m_found; - - template - void operator()( Item& i, T& /*val*/ ) - { - m_found = i; - } - - void operator()( Item const& i ) - { - m_found = i; - } - }; - - struct insert_functor - { - template - void operator()(Item& i ) - { - i.nVal = i.nKey * 100; - } - }; - - template - static void update_func( bool bNew, Item& i, Q& /*val*/ ) - { - if ( bNew ) - ++i.nUpdateNewCount; - else - ++i.nUpdateCount; - } - - struct update_functor - { - template - void operator()( bool bNew, Item& i, Q& val ) - { - update_func( bNew, i, val ); - } - }; - - template - void test_int_with( Set& s, Predicate pred ) - { - typedef typename Set::value_type value_type; - - item itm; - int key; - - // insert/find test - CPPUNIT_ASSERT( !s.contains( 10 ) ); - CPPUNIT_ASSERT( s.insert( 10 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( s.contains( 10 ) ); - - CPPUNIT_ASSERT( !s.insert( 10 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 )); - - CPPUNIT_ASSERT( !s.contains( 20, pred ) ); - CPPUNIT_ASSERT( s.insert( std::make_pair(20, 25) )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( s.contains( 10, pred ) ); - CPPUNIT_ASSERT( s.contains( key = 20 ) ); - CPPUNIT_ASSERT( s.find_with( key, pred, find_functor() ) ); - { - copy_found f; - key = 20; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 20 ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - CPPUNIT_ASSERT( f.m_found.nFindCount == 1 ); - } - { - copy_found f; - key = 20; - CPPUNIT_ASSERT( s.find_with( key, pred, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 20 ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - CPPUNIT_ASSERT( f.m_found.nFindCount == 1 ); - } - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - - CPPUNIT_ASSERT( !s.contains( 25 ) ); - CPPUNIT_ASSERT( s.insert( std::make_pair(25, -1), insert_functor() )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - { - copy_found f; - key = 25; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 25 ); - CPPUNIT_ASSERT( f.m_found.nVal == 2500 ); - } - - // update() test - key = 10; - { - copy_found f; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 10 ); - CPPUNIT_ASSERT( f.m_found.nVal == 10 ); - CPPUNIT_ASSERT( f.m_found.nUpdateCount == 0 ); - CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 0 ); - } - std::pair updateResult = s.update( key, update_functor() ); - CPPUNIT_ASSERT( updateResult.first && !updateResult.second ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - { - copy_found f; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 10 ); - CPPUNIT_ASSERT( f.m_found.nVal == 10 ); - CPPUNIT_ASSERT( f.m_found.nUpdateCount == 1 ); - CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 0 ); - } - - updateResult = s.update(std::make_pair(13, 1300), update_functor(), false); - CPPUNIT_ASSERT(!updateResult.first && !updateResult.second); - - updateResult = s.update( std::make_pair(13, 1300), update_functor() ); - CPPUNIT_ASSERT( updateResult.first && updateResult.second ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 4 )); - { - copy_found f; - key = 13; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 13 ); - CPPUNIT_ASSERT( f.m_found.nVal == 1300 ); - CPPUNIT_ASSERT( f.m_found.nUpdateCount == 0 ); - CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 1 ); - } - - // erase test - CPPUNIT_ASSERT( s.erase(13) ); - CPPUNIT_ASSERT( !s.contains( 13 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - CPPUNIT_ASSERT( !s.erase(13) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - CPPUNIT_ASSERT( s.contains( 10 )); - CPPUNIT_ASSERT( s.erase_with( 10, pred )); - CPPUNIT_ASSERT( !s.contains( 10 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( !s.erase_with(10, pred) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - - CPPUNIT_ASSERT( s.contains(20) ); - { - copy_found f; - CPPUNIT_ASSERT( s.erase( 20, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 20 ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - - CPPUNIT_ASSERT( s.insert(235)) - CPPUNIT_ASSERT( s.erase_with( 235, pred, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 235 ); - CPPUNIT_ASSERT( f.m_found.nVal == 235 ); - } - CPPUNIT_ASSERT( !s.contains( 20 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 )); - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - // emplace test - CPPUNIT_ASSERT( s.emplace( 151 )) ; // key = 151, val = 151 - CPPUNIT_ASSERT( s.emplace( 174, 471 )) ; // key = 174, val = 471 - CPPUNIT_ASSERT( s.emplace( std::make_pair( 190, 91 ) )) ; // key == 190, val = 91 - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - CPPUNIT_ASSERT( s.contains(151)); - CPPUNIT_ASSERT( s.contains(174, pred )); - CPPUNIT_ASSERT( s.contains(190)); - - { - copy_found f; - key = 151; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 151 ); - CPPUNIT_ASSERT( f.m_found.nVal == 151 ); - - key = 174; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 174 ); - CPPUNIT_ASSERT( f.m_found.nVal == 471 ); - - key = 190; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 190 ); - CPPUNIT_ASSERT( f.m_found.nVal == 91 ); - } - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - } - - template - void test_int() - { - Set s( 32, 4, 3 ); - CPPUNIT_ASSERT( s.bucket_count() == 32 ); - CPPUNIT_ASSERT( s.lock_count() == 32 ); - - cds::OS::Timer timer; - - test_int_with( s, Predicate() ); - - // Resizing test - for ( int i = 0; i < 10000; i++ ) { - s.insert( i ); - } - - CPPUNIT_MSG( " Duration=" << timer.duration() ); - } - - public: - void Cuckoo_Striped_list_unord(); - void Cuckoo_Striped_list_unord_storehash(); - void Cuckoo_Striped_list_cmp(); - void Cuckoo_Striped_list_cmp_storehash(); - void Cuckoo_Striped_list_less(); - void Cuckoo_Striped_list_less_storehash(); - void Cuckoo_Striped_list_less_cmp(); - void Cuckoo_Striped_list_less_cmp_storehash(); - void Cuckoo_Striped_list_less_cmp_eq(); - void Cuckoo_Striped_list_less_cmp_eq_storehash(); - - void Cuckoo_Striped_vector_unord(); - void Cuckoo_Striped_vector_unord_storehash(); - void Cuckoo_Striped_vector_cmp(); - void Cuckoo_Striped_vector_cmp_storehash(); - void Cuckoo_Striped_vector_less(); - void Cuckoo_Striped_vector_less_storehash(); - void Cuckoo_Striped_vector_less_cmp(); - void Cuckoo_Striped_vector_less_cmp_storehash(); - void Cuckoo_Striped_vector_less_cmp_eq(); - void Cuckoo_Striped_vector_less_cmp_eq_storehash(); - - void Cuckoo_Refinable_list_unord(); - void Cuckoo_Refinable_list_unord_storehash(); - void Cuckoo_Refinable_list_cmp(); - void Cuckoo_Refinable_list_cmp_storehash(); - void Cuckoo_Refinable_list_less(); - void Cuckoo_Refinable_list_less_storehash(); - void Cuckoo_Refinable_list_less_cmp(); - void Cuckoo_Refinable_list_less_cmp_storehash(); - void Cuckoo_Refinable_list_less_cmp_eq(); - void Cuckoo_Refinable_list_less_cmp_eq_storehash(); - - void Cuckoo_Refinable_vector_unord(); - void Cuckoo_Refinable_vector_unord_storehash(); - void Cuckoo_Refinable_vector_cmp(); - void Cuckoo_Refinable_vector_cmp_storehash(); - void Cuckoo_Refinable_vector_less(); - void Cuckoo_Refinable_vector_less_storehash(); - void Cuckoo_Refinable_vector_less_cmp(); - void Cuckoo_Refinable_vector_less_cmp_storehash(); - void Cuckoo_Refinable_vector_less_cmp_eq(); - void Cuckoo_Refinable_vector_less_cmp_eq_storehash(); - - CPPUNIT_TEST_SUITE(CuckooSetHdrTest) - CPPUNIT_TEST( Cuckoo_Striped_list_unord) - CPPUNIT_TEST( Cuckoo_Striped_list_unord_storehash) - CPPUNIT_TEST( Cuckoo_Striped_list_cmp) - CPPUNIT_TEST( Cuckoo_Striped_list_cmp_storehash) - CPPUNIT_TEST( Cuckoo_Striped_list_less) - CPPUNIT_TEST( Cuckoo_Striped_list_less_storehash) - CPPUNIT_TEST( Cuckoo_Striped_list_less_cmp) - CPPUNIT_TEST( Cuckoo_Striped_list_less_cmp_storehash) - CPPUNIT_TEST( Cuckoo_Striped_list_less_cmp_eq) - CPPUNIT_TEST( Cuckoo_Striped_list_less_cmp_eq_storehash) - - CPPUNIT_TEST( Cuckoo_Striped_vector_unord) - CPPUNIT_TEST( Cuckoo_Striped_vector_unord_storehash) - CPPUNIT_TEST( Cuckoo_Striped_vector_cmp) - CPPUNIT_TEST( Cuckoo_Striped_vector_cmp_storehash) - CPPUNIT_TEST( Cuckoo_Striped_vector_less) - CPPUNIT_TEST( Cuckoo_Striped_vector_less_storehash) - CPPUNIT_TEST( Cuckoo_Striped_vector_less_cmp) - CPPUNIT_TEST( Cuckoo_Striped_vector_less_cmp_storehash) - CPPUNIT_TEST( Cuckoo_Striped_vector_less_cmp_eq) - CPPUNIT_TEST( Cuckoo_Striped_vector_less_cmp_eq_storehash) - - CPPUNIT_TEST( Cuckoo_Refinable_list_unord) - CPPUNIT_TEST( Cuckoo_Refinable_list_unord_storehash) - CPPUNIT_TEST( Cuckoo_Refinable_list_cmp) - CPPUNIT_TEST( Cuckoo_Refinable_list_cmp_storehash) - CPPUNIT_TEST( Cuckoo_Refinable_list_less) - CPPUNIT_TEST( Cuckoo_Refinable_list_less_storehash) - CPPUNIT_TEST( Cuckoo_Refinable_list_less_cmp) - CPPUNIT_TEST( Cuckoo_Refinable_list_less_cmp_storehash) - CPPUNIT_TEST( Cuckoo_Refinable_list_less_cmp_eq) - CPPUNIT_TEST( Cuckoo_Refinable_list_less_cmp_eq_storehash) - - CPPUNIT_TEST( Cuckoo_Refinable_vector_unord) - CPPUNIT_TEST( Cuckoo_Refinable_vector_unord_storehash) - CPPUNIT_TEST( Cuckoo_Refinable_vector_cmp) - CPPUNIT_TEST( Cuckoo_Refinable_vector_cmp_storehash) - CPPUNIT_TEST( Cuckoo_Refinable_vector_less) - CPPUNIT_TEST( Cuckoo_Refinable_vector_less_storehash) - CPPUNIT_TEST( Cuckoo_Refinable_vector_less_cmp) - CPPUNIT_TEST( Cuckoo_Refinable_vector_less_cmp_storehash) - CPPUNIT_TEST( Cuckoo_Refinable_vector_less_cmp_eq) - CPPUNIT_TEST( Cuckoo_Refinable_vector_less_cmp_eq_storehash) - CPPUNIT_TEST_SUITE_END() - }; - -} // namespace set - -#endif // #ifndef CDSTEST_HDR_CUCKOO_SET_H diff --git a/tests/test-hdr/set/hdr_feldman_hashset.h b/tests/test-hdr/set/hdr_feldman_hashset.h deleted file mode 100644 index 4a25ada4..00000000 --- a/tests/test-hdr/set/hdr_feldman_hashset.h +++ /dev/null @@ -1,871 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_FELDMAN_HASHSET_H -#define CDSTEST_HDR_FELDMAN_HASHSET_H - -#include "cppunit/cppunit_proxy.h" - -// forward declaration -namespace cds { - namespace container {} - namespace opt {} -} - -namespace set { - namespace cc = cds::container; - namespace co = cds::opt; - - class FeldmanHashSetHdrTest : public CppUnitMini::TestCase - { - template - struct Arg - { - size_t key; - Hash hash; - - Arg( size_t k, Hash const& h ) - : key( k ) - , hash( h ) - {} - }; - - template - struct Item - { - unsigned int nInsertCall; - unsigned int nFindCall; - unsigned int nEraseCall; - mutable unsigned int nIteratorCall; - Hash hash; - size_t key; - - Item( size_t k, Hash const& h ) - : nInsertCall(0) - , nFindCall(0) - , nEraseCall(0) - , nIteratorCall(0) - , hash( h ) - , key( k ) - {} - - explicit Item( Arg const& arg ) - : nInsertCall(0) - , nFindCall(0) - , nEraseCall(0) - , nIteratorCall(0) - , hash( arg.hash ) - , key( arg.key ) - {} - - Item( Item const& i ) - : nInsertCall(0) - , nFindCall(0) - , nEraseCall(0) - , nIteratorCall(0) - , hash( i.hash ) - , key( i.key ) - {} - }; - - template - struct get_hash - { - Hash const& operator()( Item const& i ) const - { - return i.hash; - } - }; - - template - struct get_key - { - Key operator()(Item const& i)const - { - return i.hash; - } - }; - - template - struct nohash { - Key operator()(Key k) const - { - return k; - } - }; - - struct hash128 - { - size_t lo; - size_t hi; - - hash128() {} - hash128(size_t l, size_t h) : lo(l), hi(h) {} - hash128( hash128 const& h) : lo(h.lo), hi(h.hi) {} - - struct make { - hash128 operator()( size_t n ) const - { - return hash128( std::hash()( n ), std::hash()( ~n )); - } - hash128 operator()( hash128 const& n ) const - { - return hash128( std::hash()( n.lo ), std::hash()( ~n.hi )); - } - }; - - struct less { - bool operator()( hash128 const& lhs, hash128 const& rhs ) const - { - if ( lhs.hi != rhs.hi ) - return lhs.hi < rhs.hi; - return lhs.lo < rhs.lo; - } - }; - - struct cmp { - int operator()( hash128 const& lhs, hash128 const& rhs ) const - { - if ( lhs.hi != rhs.hi ) - return lhs.hi < rhs.hi ? -1 : 1; - return lhs.lo < rhs.lo ? -1 : lhs.lo == rhs.lo ? 0 : 1; - } - }; - - friend bool operator==( hash128 const& lhs, hash128 const& rhs ) - { - return cmp()( lhs, rhs ) == 0; - } - friend bool operator!=(hash128 const& lhs, hash128 const& rhs) - { - return !( lhs == rhs ); - } - }; - - template - void test_hp( size_t nHeadBits, size_t nArrayBits ) - { - typedef typename Set::hash_type hash_type; - typedef typename Set::value_type value_type; - typedef Arg arg_type; - typedef typename Set::guarded_ptr guarded_ptr; - - Hasher hasher; - - size_t const capacity = 1000; - - Set s( nHeadBits, nArrayBits ); - CPPUNIT_MSG("Array size: head=" << s.head_size() << ", array_node=" << s.array_node_size()); - CPPUNIT_ASSERT(s.head_size() >= (size_t(1) << nHeadBits)); - CPPUNIT_ASSERT(s.array_node_size() == (size_t(1) << nArrayBits)); - - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT(s.size() == 0); - - // insert test - for ( size_t i = 0; i < capacity; ++i ) { - hash_type h = hasher(i); - CPPUNIT_ASSERT( !s.contains( h )); - CPPUNIT_ASSERT( s.insert( value_type( i, h ))); - CPPUNIT_ASSERT(s.contains( h )); - - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( s.size() == i + 1); - - CPPUNIT_ASSERT( !s.insert( arg_type(i, h) )); - CPPUNIT_ASSERT( s.size() == i + 1); - } - - // update existing test - for ( size_t i = 0; i < capacity; ++i ) { - hash_type h = hasher(i); - CPPUNIT_ASSERT( s.contains( h )); - std::pair ret = s.update( arg_type( i, h ), - [](value_type& i, value_type * prev ) { - CPPUNIT_ASSERT_CURRENT( prev != nullptr ); - CPPUNIT_ASSERT_CURRENT( i.key == prev->key ); - CPPUNIT_ASSERT_CURRENT( i.hash == prev->hash ); - i.nInsertCall += 1; - }, false ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( !ret.second ); - CPPUNIT_ASSERT( s.contains( h )); - CPPUNIT_ASSERT( s.size() == capacity ); - - guarded_ptr gp(s.get( h )); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( gp->nInsertCall == 1 ); - CPPUNIT_ASSERT( gp->key == i ); - CPPUNIT_ASSERT( gp->hash == h ); - } - - // erase test - for ( size_t i = 0; i < capacity; ++i ) { - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( s.size() == capacity - i ); - CPPUNIT_ASSERT(s.find(hasher(i), []( value_type &) {})); - CPPUNIT_ASSERT( s.erase(hasher(i)) ); - CPPUNIT_ASSERT( !s.find(hasher(i), []( value_type &) {})); - CPPUNIT_ASSERT( s.size() == capacity - i - 1); - } - CPPUNIT_ASSERT( s.empty() ); - - // Iterators on empty set - CPPUNIT_ASSERT(s.begin() == s.end()); - CPPUNIT_ASSERT(s.cbegin() == s.cend()); - CPPUNIT_ASSERT(s.rbegin() == s.rend()); - CPPUNIT_ASSERT(s.crbegin() == s.crend()); - - // insert with functor - for ( size_t i = capacity; i > 0; --i ) { - CPPUNIT_ASSERT( s.size() == capacity - i ); - CPPUNIT_ASSERT(s.insert( arg_type( i, hasher(i)), []( value_type& val ) { val.nInsertCall += 1; } )); - CPPUNIT_ASSERT( s.size() == capacity - i + 1 ); - CPPUNIT_ASSERT( !s.empty() ); - - CPPUNIT_ASSERT(s.find( hasher(i), []( value_type& val ) { - CPPUNIT_ASSERT_CURRENT( val.nInsertCall == 1 ); - val.nFindCall += 1; - } )); - } - CPPUNIT_ASSERT( s.size() == capacity ); - - // for-each iterator test - for ( auto& el : s ) { - CPPUNIT_ASSERT( el.nInsertCall == 1 ); - CPPUNIT_ASSERT( el.nFindCall == 1 ); - el.nFindCall += 1; - } - - // iterator test - for ( auto it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( it->nInsertCall == 1 ); - CPPUNIT_ASSERT( it->nFindCall == 2 ); - it->nFindCall += 1; - } - - // reverse iterator test - for ( auto it = s.rbegin(), itEnd = s.rend(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( it->nInsertCall == 1 ); - CPPUNIT_ASSERT( it->nFindCall == 3 ); - it->nFindCall += 1; - } - - // const iterator test - for ( auto it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( it->nInsertCall == 1 ); - CPPUNIT_ASSERT( it->nFindCall == 4 ); - it->nIteratorCall += 1; - } - - // const reverse iterator test - for ( auto it = s.rbegin(), itEnd = s.rend(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( it->nInsertCall == 1 ); - CPPUNIT_ASSERT( it->nFindCall == 4 ); - CPPUNIT_ASSERT( it->nIteratorCall == 1 ); - it->nIteratorCall += 1; - } - - // check completeness - for ( size_t i = 1; i <= capacity; ++i ) { - CPPUNIT_ASSERT( s.find( hasher( i ), []( value_type const& el ) { - CPPUNIT_ASSERT_CURRENT( el.nInsertCall == 1 ); - CPPUNIT_ASSERT_CURRENT( el.nFindCall == 4 ); - CPPUNIT_ASSERT_CURRENT( el.nIteratorCall == 2 ); - } )); - } - - // erase with functor test - { - size_t nSum = 0; - for ( size_t i = 1; i <= capacity; ++i ) { - CPPUNIT_ASSERT( s.size() == capacity - i + 1 ); - CPPUNIT_ASSERT(s.erase(hasher(i), [&nSum]( value_type const& val ) { - CPPUNIT_ASSERT_CURRENT( val.nInsertCall == 1 ); - CPPUNIT_ASSERT_CURRENT( val.nFindCall == 4 ); - CPPUNIT_ASSERT_CURRENT( val.nIteratorCall == 2 ); - nSum += val.key; - } )) - CPPUNIT_ASSERT( s.size() == capacity - i ); - CPPUNIT_ASSERT( !s.erase(hasher(i), [&nSum]( value_type const& val ) { nSum += val.key; } )) - } - CPPUNIT_ASSERT(s.empty() ); - CPPUNIT_ASSERT(nSum == (1 + capacity) * capacity / 2 ); - } - - // update test with insert allowing - for ( size_t i = 0; i < capacity; ++i ) { - hash_type h = hasher(i); - CPPUNIT_ASSERT( !s.contains( h )); - guarded_ptr gp(s.get( h )); - CPPUNIT_ASSERT( !gp ); - std::pair ret = s.update( arg_type( i, h ), - [](value_type& i, value_type * prev ) { - CPPUNIT_ASSERT_CURRENT( prev == nullptr ); - i.nInsertCall += 1; - }); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( ret.second ); - CPPUNIT_ASSERT( s.contains( h )); - CPPUNIT_ASSERT( s.size() == i + 1 ); - - gp = s.get( h ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( gp->nInsertCall == 1 ); - CPPUNIT_ASSERT( gp->key == i ); - CPPUNIT_ASSERT( gp->hash == h ); - } - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT(s.size() == capacity ); - - // erase_at( iterator ) test - for ( auto it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( s.erase_at( it )); - } - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( s.size() == 0 ); - - // emplace test - for ( size_t i = 0; i < capacity; ++i ) { - hash_type h = hasher(i); - CPPUNIT_ASSERT( !s.contains( h )); - CPPUNIT_ASSERT( s.emplace( i, hasher(i) )); - CPPUNIT_ASSERT(s.contains( h )); - - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( s.size() == i + 1); - - CPPUNIT_ASSERT( !s.emplace( arg_type(i, h) )); - CPPUNIT_ASSERT( s.size() == i + 1); - } - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT(s.size() == capacity ); - - // erase_at( reverse_iterator ) test - for ( auto it = s.rbegin(), itEnd = s.rend(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( s.erase_at( it )); - } - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( s.size() == 0 ); - - // extract test - for ( size_t i = 0; i < capacity; ++i ) { - hash_type h = hasher(i); - CPPUNIT_ASSERT( !s.contains( h )); - CPPUNIT_ASSERT( s.emplace( arg_type( i, hasher(i) ))); - CPPUNIT_ASSERT(s.contains( h )); - - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( s.size() == i + 1); - - CPPUNIT_ASSERT( !s.emplace( i, h )); - CPPUNIT_ASSERT( s.size() == i + 1); - } - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT(s.size() == capacity ); - - for ( size_t i = capacity; i != 0; --i ) { - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( s.size() == i ); - - guarded_ptr gp{ s.extract( hasher(i-1)) }; - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( gp->key == i - 1); - CPPUNIT_ASSERT(gp->hash == hasher(i-1)); - CPPUNIT_ASSERT( !s.contains(hasher(i-1))); - - gp = s.get(hasher(i-1)); - CPPUNIT_ASSERT( !gp ); - - CPPUNIT_ASSERT( s.size() == i - 1 ); - } - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT(s.size() == 0 ); - - // clear test - for ( size_t i = 0; i < capacity; ++i ) { - hash_type h = hasher(i); - CPPUNIT_ASSERT( !s.contains( h )); - CPPUNIT_ASSERT( s.emplace( arg_type( i, hasher(i) ))); - CPPUNIT_ASSERT(s.contains( h )); - - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( s.size() == i + 1); - - CPPUNIT_ASSERT( !s.emplace( i, h )); - CPPUNIT_ASSERT( s.size() == i + 1); - } - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT(s.size() == capacity ); - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT(s.size() == 0 ); - - CPPUNIT_MSG( s.statistics() ); - } - - template - void test_rcu(size_t nHeadBits, size_t nArrayBits) - { - typedef typename Set::hash_type hash_type; - typedef typename Set::value_type value_type; - typedef Arg arg_type; - typedef typename Set::exempt_ptr exempt_ptr; - typedef typename Set::rcu_lock rcu_lock; - - Hasher hasher; - - size_t const capacity = 1000; - - Set s(nHeadBits, nArrayBits); - CPPUNIT_MSG("Array size: head=" << s.head_size() << ", array_node=" << s.array_node_size()); - CPPUNIT_ASSERT(s.head_size() >= (size_t(1) << nHeadBits)); - CPPUNIT_ASSERT(s.array_node_size() == (size_t(1) << nArrayBits)); - - CPPUNIT_ASSERT(s.empty()); - CPPUNIT_ASSERT(s.size() == 0); - - // insert test - for (size_t i = 0; i < capacity; ++i) { - hash_type h = hasher(i); - CPPUNIT_ASSERT(!s.contains(h)); - CPPUNIT_ASSERT(s.insert(value_type(i, h))); - CPPUNIT_ASSERT(s.contains(h)); - - CPPUNIT_ASSERT(!s.empty()); - CPPUNIT_ASSERT(s.size() == i + 1); - - CPPUNIT_ASSERT(!s.insert(arg_type(i, h))); - CPPUNIT_ASSERT(s.size() == i + 1); - } - - // update existing test - for (size_t i = 0; i < capacity; ++i) { - hash_type h = hasher(i); - CPPUNIT_ASSERT(s.contains(h)); - std::pair ret = s.update(arg_type(i, h), - [](value_type& i, value_type * prev) { - CPPUNIT_ASSERT_CURRENT(prev != nullptr); - CPPUNIT_ASSERT_CURRENT(i.key == prev->key); - CPPUNIT_ASSERT_CURRENT(i.hash == prev->hash); - i.nInsertCall += 1; - }, false); - CPPUNIT_ASSERT(ret.first); - CPPUNIT_ASSERT(!ret.second); - CPPUNIT_ASSERT(s.contains(h)); - CPPUNIT_ASSERT(s.size() == capacity); - - { - rcu_lock l; - value_type * p = s.get(h); - CPPUNIT_ASSERT(p); - CPPUNIT_ASSERT(p->nInsertCall == 1); - CPPUNIT_ASSERT(p->key == i); - CPPUNIT_ASSERT(p->hash == h); - } - } - - // erase test - for (size_t i = 0; i < capacity; ++i) { - CPPUNIT_ASSERT(!s.empty()); - CPPUNIT_ASSERT(s.size() == capacity - i); - CPPUNIT_ASSERT(s.find(hasher(i), [](value_type &) {})); - CPPUNIT_ASSERT(s.erase(hasher(i))); - CPPUNIT_ASSERT(!s.find(hasher(i), [](value_type &) {})); - CPPUNIT_ASSERT(s.size() == capacity - i - 1); - } - CPPUNIT_ASSERT(s.empty()); - - // Iterators on empty set - { - rcu_lock l; - CPPUNIT_ASSERT(s.begin() == s.end()); - CPPUNIT_ASSERT(s.cbegin() == s.cend()); - CPPUNIT_ASSERT(s.rbegin() == s.rend()); - CPPUNIT_ASSERT(s.crbegin() == s.crend()); - } - - // insert with functor - for (size_t i = capacity; i > 0; --i) { - CPPUNIT_ASSERT(s.size() == capacity - i); - CPPUNIT_ASSERT(s.insert(arg_type(i, hasher(i)), [](value_type& val) { val.nInsertCall += 1; })); - CPPUNIT_ASSERT(s.size() == capacity - i + 1); - CPPUNIT_ASSERT(!s.empty()); - - CPPUNIT_ASSERT(s.find(hasher(i), [](value_type& val) { - CPPUNIT_ASSERT_CURRENT(val.nInsertCall == 1); - val.nFindCall += 1; - })); - } - CPPUNIT_ASSERT(s.size() == capacity); - - // for-each iterator test - { - rcu_lock l; - for (auto& el : s) { - CPPUNIT_ASSERT(el.nInsertCall == 1); - CPPUNIT_ASSERT(el.nFindCall == 1); - el.nFindCall += 1; - } - } - - // iterator test - { - rcu_lock l; - for (auto it = s.begin(), itEnd = s.end(); it != itEnd; ++it) { - CPPUNIT_ASSERT(it->nInsertCall == 1); - CPPUNIT_ASSERT(it->nFindCall == 2); - it->nFindCall += 1; - } - } - - // reverse iterator test - { - rcu_lock l; - for (auto it = s.rbegin(), itEnd = s.rend(); it != itEnd; ++it) { - CPPUNIT_ASSERT(it->nInsertCall == 1); - CPPUNIT_ASSERT(it->nFindCall == 3); - it->nFindCall += 1; - } - } - - // const iterator test - { - rcu_lock l; - for (auto it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it) { - CPPUNIT_ASSERT(it->nInsertCall == 1); - CPPUNIT_ASSERT(it->nFindCall == 4); - it->nIteratorCall += 1; - } - } - - // const reverse iterator test - { - rcu_lock l; - for (auto it = s.rbegin(), itEnd = s.rend(); it != itEnd; ++it) { - CPPUNIT_ASSERT(it->nInsertCall == 1); - CPPUNIT_ASSERT(it->nFindCall == 4); - CPPUNIT_ASSERT(it->nIteratorCall == 1); - it->nIteratorCall += 1; - } - } - - // check completeness - for (size_t i = 1; i <= capacity; ++i) { - CPPUNIT_ASSERT(s.find(hasher(i), [](value_type const& el) { - CPPUNIT_ASSERT_CURRENT(el.nInsertCall == 1); - CPPUNIT_ASSERT_CURRENT(el.nFindCall == 4); - CPPUNIT_ASSERT_CURRENT(el.nIteratorCall == 2); - })); - } - - // erase with functor test - { - size_t nSum = 0; - for (size_t i = 1; i <= capacity; ++i) { - CPPUNIT_ASSERT(s.size() == capacity - i + 1); - CPPUNIT_ASSERT(s.erase(hasher(i), [&nSum](value_type const& val) { - CPPUNIT_ASSERT_CURRENT(val.nInsertCall == 1); - CPPUNIT_ASSERT_CURRENT(val.nFindCall == 4); - CPPUNIT_ASSERT_CURRENT(val.nIteratorCall == 2); - nSum += val.key; - })); - CPPUNIT_ASSERT(s.size() == capacity - i); - CPPUNIT_ASSERT(!s.erase(hasher(i), [&nSum](value_type const& val) { nSum += val.key; })) - } - CPPUNIT_ASSERT(s.empty()); - CPPUNIT_ASSERT(nSum == (1 + capacity) * capacity / 2); - } - - // update test with insert allowing - for (size_t i = 0; i < capacity; ++i) { - hash_type h = hasher(i); - CPPUNIT_ASSERT(!s.contains(h)); - - { - rcu_lock l; - value_type * p = s.get(h); - CPPUNIT_ASSERT(!p); - } - std::pair ret = s.update(arg_type(i, h), - [](value_type& i, value_type * prev) { - CPPUNIT_ASSERT_CURRENT(prev == nullptr); - i.nInsertCall += 1; - }); - CPPUNIT_ASSERT(ret.first); - CPPUNIT_ASSERT(ret.second); - CPPUNIT_ASSERT(s.contains(h)); - CPPUNIT_ASSERT(s.size() == i + 1); - - { - rcu_lock l; - value_type * p = s.get(h); - CPPUNIT_ASSERT(p); - CPPUNIT_ASSERT(p->nInsertCall == 1); - CPPUNIT_ASSERT(p->key == i); - CPPUNIT_ASSERT(p->hash == h); - } - } - CPPUNIT_ASSERT(!s.empty()); - CPPUNIT_ASSERT(s.size() == capacity); - - s.clear(); - CPPUNIT_ASSERT(s.empty()); - CPPUNIT_ASSERT(s.size() == 0); - - // emplace test - for (size_t i = 0; i < capacity; ++i) { - hash_type h = hasher(i); - CPPUNIT_ASSERT(!s.contains(h)); - CPPUNIT_ASSERT(s.emplace(i, hasher(i))); - CPPUNIT_ASSERT(s.contains(h)); - - CPPUNIT_ASSERT(!s.empty()); - CPPUNIT_ASSERT(s.size() == i + 1); - - CPPUNIT_ASSERT(!s.emplace(arg_type(i, h))); - CPPUNIT_ASSERT(s.size() == i + 1); - } - CPPUNIT_ASSERT(!s.empty()); - CPPUNIT_ASSERT(s.size() == capacity); - - // extract test - for (size_t i = capacity; i != 0; --i) { - CPPUNIT_ASSERT(!s.empty()); - CPPUNIT_ASSERT(s.size() == i); - - exempt_ptr gp{ s.extract(hasher(i - 1)) }; - CPPUNIT_ASSERT(gp); - CPPUNIT_ASSERT(gp->key == i - 1); - CPPUNIT_ASSERT(gp->hash == hasher(i - 1)); - CPPUNIT_ASSERT(!s.contains(hasher(i - 1))); - - { - rcu_lock l; - value_type * p = s.get(hasher(i - 1)); - CPPUNIT_ASSERT( p == nullptr ); - } - CPPUNIT_ASSERT(s.size() == i - 1); - } - CPPUNIT_ASSERT(s.empty()); - CPPUNIT_ASSERT(s.size() == 0); - - CPPUNIT_MSG(s.statistics()); - } - - void hp_nohash(); - void hp_nohash_stat(); - void hp_nohash_5_3(); - void hp_nohash_5_3_stat(); - void hp_stdhash(); - void hp_stdhash_stat(); - void hp_stdhash_5_3(); - void hp_stdhash_5_3_stat(); - void hp_hash128(); - void hp_hash128_stat(); - void hp_hash128_4_3(); - void hp_hash128_4_3_stat(); - - void dhp_nohash(); - void dhp_nohash_stat(); - void dhp_nohash_5_3(); - void dhp_nohash_5_3_stat(); - void dhp_stdhash(); - void dhp_stdhash_stat(); - void dhp_stdhash_5_3(); - void dhp_stdhash_5_3_stat(); - void dhp_hash128(); - void dhp_hash128_stat(); - void dhp_hash128_4_3(); - void dhp_hash128_4_3_stat(); - - void rcu_gpi_nohash(); - void rcu_gpi_nohash_stat(); - void rcu_gpi_nohash_5_3(); - void rcu_gpi_nohash_5_3_stat(); - void rcu_gpi_stdhash(); - void rcu_gpi_stdhash_stat(); - void rcu_gpi_stdhash_5_3(); - void rcu_gpi_stdhash_5_3_stat(); - void rcu_gpi_hash128(); - void rcu_gpi_hash128_stat(); - void rcu_gpi_hash128_4_3(); - void rcu_gpi_hash128_4_3_stat(); - - void rcu_gpb_nohash(); - void rcu_gpb_nohash_stat(); - void rcu_gpb_nohash_5_3(); - void rcu_gpb_nohash_5_3_stat(); - void rcu_gpb_stdhash(); - void rcu_gpb_stdhash_stat(); - void rcu_gpb_stdhash_5_3(); - void rcu_gpb_stdhash_5_3_stat(); - void rcu_gpb_hash128(); - void rcu_gpb_hash128_stat(); - void rcu_gpb_hash128_4_3(); - void rcu_gpb_hash128_4_3_stat(); - - void rcu_gpt_nohash(); - void rcu_gpt_nohash_stat(); - void rcu_gpt_nohash_5_3(); - void rcu_gpt_nohash_5_3_stat(); - void rcu_gpt_stdhash(); - void rcu_gpt_stdhash_stat(); - void rcu_gpt_stdhash_5_3(); - void rcu_gpt_stdhash_5_3_stat(); - void rcu_gpt_hash128(); - void rcu_gpt_hash128_stat(); - void rcu_gpt_hash128_4_3(); - void rcu_gpt_hash128_4_3_stat(); - - void rcu_shb_nohash(); - void rcu_shb_nohash_stat(); - void rcu_shb_nohash_5_3(); - void rcu_shb_nohash_5_3_stat(); - void rcu_shb_stdhash(); - void rcu_shb_stdhash_stat(); - void rcu_shb_stdhash_5_3(); - void rcu_shb_stdhash_5_3_stat(); - void rcu_shb_hash128(); - void rcu_shb_hash128_stat(); - void rcu_shb_hash128_4_3(); - void rcu_shb_hash128_4_3_stat(); - - void rcu_sht_nohash(); - void rcu_sht_nohash_stat(); - void rcu_sht_nohash_5_3(); - void rcu_sht_nohash_5_3_stat(); - void rcu_sht_stdhash(); - void rcu_sht_stdhash_stat(); - void rcu_sht_stdhash_5_3(); - void rcu_sht_stdhash_5_3_stat(); - void rcu_sht_hash128(); - void rcu_sht_hash128_stat(); - void rcu_sht_hash128_4_3(); - void rcu_sht_hash128_4_3_stat(); - - CPPUNIT_TEST_SUITE(FeldmanHashSetHdrTest) - CPPUNIT_TEST(hp_nohash) - CPPUNIT_TEST(hp_nohash_stat) - CPPUNIT_TEST(hp_nohash_5_3) - CPPUNIT_TEST(hp_nohash_5_3_stat) - CPPUNIT_TEST(hp_stdhash) - CPPUNIT_TEST(hp_stdhash_stat) - CPPUNIT_TEST(hp_stdhash_5_3) - CPPUNIT_TEST(hp_stdhash_5_3_stat) - CPPUNIT_TEST(hp_hash128) - CPPUNIT_TEST(hp_hash128_stat) - CPPUNIT_TEST(hp_hash128_4_3) - CPPUNIT_TEST(hp_hash128_4_3_stat) - - CPPUNIT_TEST(dhp_nohash) - CPPUNIT_TEST(dhp_nohash_stat) - CPPUNIT_TEST(dhp_nohash_5_3) - CPPUNIT_TEST(dhp_nohash_5_3_stat) - CPPUNIT_TEST(dhp_stdhash) - CPPUNIT_TEST(dhp_stdhash_stat) - CPPUNIT_TEST(dhp_stdhash_5_3) - CPPUNIT_TEST(dhp_stdhash_5_3_stat) - CPPUNIT_TEST(dhp_hash128) - CPPUNIT_TEST(dhp_hash128_stat) - CPPUNIT_TEST(dhp_hash128_4_3) - CPPUNIT_TEST(dhp_hash128_4_3_stat) - - CPPUNIT_TEST(rcu_gpi_nohash) - CPPUNIT_TEST(rcu_gpi_nohash_stat) - CPPUNIT_TEST(rcu_gpi_nohash_5_3) - CPPUNIT_TEST(rcu_gpi_nohash_5_3_stat) - CPPUNIT_TEST(rcu_gpi_stdhash) - CPPUNIT_TEST(rcu_gpi_stdhash_stat) - CPPUNIT_TEST(rcu_gpi_stdhash_5_3) - CPPUNIT_TEST(rcu_gpi_stdhash_5_3_stat) - CPPUNIT_TEST(rcu_gpi_hash128) - CPPUNIT_TEST(rcu_gpi_hash128_stat) - CPPUNIT_TEST(rcu_gpi_hash128_4_3) - CPPUNIT_TEST(rcu_gpi_hash128_4_3_stat) - - CPPUNIT_TEST(rcu_gpb_nohash) - CPPUNIT_TEST(rcu_gpb_nohash_stat) - CPPUNIT_TEST(rcu_gpb_nohash_5_3) - CPPUNIT_TEST(rcu_gpb_nohash_5_3_stat) - CPPUNIT_TEST(rcu_gpb_stdhash) - CPPUNIT_TEST(rcu_gpb_stdhash_stat) - CPPUNIT_TEST(rcu_gpb_stdhash_5_3) - CPPUNIT_TEST(rcu_gpb_stdhash_5_3_stat) - CPPUNIT_TEST(rcu_gpb_hash128) - CPPUNIT_TEST(rcu_gpb_hash128_stat) - CPPUNIT_TEST(rcu_gpb_hash128_4_3) - CPPUNIT_TEST(rcu_gpb_hash128_4_3_stat) - - CPPUNIT_TEST(rcu_gpt_nohash) - CPPUNIT_TEST(rcu_gpt_nohash_stat) - CPPUNIT_TEST(rcu_gpt_nohash_5_3) - CPPUNIT_TEST(rcu_gpt_nohash_5_3_stat) - CPPUNIT_TEST(rcu_gpt_stdhash) - CPPUNIT_TEST(rcu_gpt_stdhash_stat) - CPPUNIT_TEST(rcu_gpt_stdhash_5_3) - CPPUNIT_TEST(rcu_gpt_stdhash_5_3_stat) - CPPUNIT_TEST(rcu_gpt_hash128) - CPPUNIT_TEST(rcu_gpt_hash128_stat) - CPPUNIT_TEST(rcu_gpt_hash128_4_3) - CPPUNIT_TEST(rcu_gpt_hash128_4_3_stat) - - CPPUNIT_TEST(rcu_shb_nohash) - CPPUNIT_TEST(rcu_shb_nohash_stat) - CPPUNIT_TEST(rcu_shb_nohash_5_3) - CPPUNIT_TEST(rcu_shb_nohash_5_3_stat) - CPPUNIT_TEST(rcu_shb_stdhash) - CPPUNIT_TEST(rcu_shb_stdhash_stat) - CPPUNIT_TEST(rcu_shb_stdhash_5_3) - CPPUNIT_TEST(rcu_shb_stdhash_5_3_stat) - CPPUNIT_TEST(rcu_shb_hash128) - CPPUNIT_TEST(rcu_shb_hash128_stat) - CPPUNIT_TEST(rcu_shb_hash128_4_3) - CPPUNIT_TEST(rcu_shb_hash128_4_3_stat) - - CPPUNIT_TEST(rcu_sht_nohash) - CPPUNIT_TEST(rcu_sht_nohash_stat) - CPPUNIT_TEST(rcu_sht_nohash_5_3) - CPPUNIT_TEST(rcu_sht_nohash_5_3_stat) - CPPUNIT_TEST(rcu_sht_stdhash) - CPPUNIT_TEST(rcu_sht_stdhash_stat) - CPPUNIT_TEST(rcu_sht_stdhash_5_3) - CPPUNIT_TEST(rcu_sht_stdhash_5_3_stat) - CPPUNIT_TEST(rcu_sht_hash128) - CPPUNIT_TEST(rcu_sht_hash128_stat) - CPPUNIT_TEST(rcu_sht_hash128_4_3) - CPPUNIT_TEST(rcu_sht_hash128_4_3_stat) - CPPUNIT_TEST_SUITE_END() - }; - -} // namespace set - -#endif // #ifndef CDSTEST_HDR_FELDMAN_HASHSET_H diff --git a/tests/test-hdr/set/hdr_feldman_hashset_dhp.cpp b/tests/test-hdr/set/hdr_feldman_hashset_dhp.cpp deleted file mode 100644 index 672c140f..00000000 --- a/tests/test-hdr/set/hdr_feldman_hashset_dhp.cpp +++ /dev/null @@ -1,327 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_feldman_hashset.h" -#include -#include "unit/print_feldman_hashset_stat.h" - -namespace set { - namespace { - typedef cds::gc::DHP gc_type; - } // namespace - - void FeldmanHashSetHdrTest::dhp_nohash() - { - typedef size_t key_type; - - struct traits : public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_hp>(4, 2); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - >::type - > set_type2; - test_hp>(4, 2); - } - - void FeldmanHashSetHdrTest::dhp_stdhash() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(4, 2); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - >::type - > set_type2; - test_hp>(4, 2); - } - - void FeldmanHashSetHdrTest::dhp_hash128() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef hash128::less less; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" ); - test_hp(4, 2); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - , co::less< hash_type::less > - >::type - > set_type2; - test_hp(4, 2); - } - - void FeldmanHashSetHdrTest::dhp_nohash_stat() - { - typedef size_t key_type; - - struct traits : public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_hp>(4, 2); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - , co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_hp>(4, 2); - } - - void FeldmanHashSetHdrTest::dhp_stdhash_stat() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(4, 2); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_hp>(4, 2); - } - - void FeldmanHashSetHdrTest::dhp_hash128_stat() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef hash128::cmp compare; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_hp(4, 2); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - ,co::compare< hash128::cmp > - >::type - > set_type2; - test_hp(4, 2); - } - - void FeldmanHashSetHdrTest::dhp_nohash_5_3() - { - typedef size_t key_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(5, 3); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - >::type - > set_type2; - test_hp>(5, 3); - } - - void FeldmanHashSetHdrTest::dhp_stdhash_5_3() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(5, 3); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - >::type - > set_type2; - test_hp>(5, 3); - } - - void FeldmanHashSetHdrTest::dhp_hash128_4_3() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef co::v::sequential_consistent memory_model; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_hp(4, 3); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::memory_model< co::v::sequential_consistent > - >::type - > set_type2; - test_hp(4, 3); - } - - void FeldmanHashSetHdrTest::dhp_nohash_5_3_stat() - { - typedef size_t key_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(5, 3); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_hp>(5, 3); - } - - void FeldmanHashSetHdrTest::dhp_stdhash_5_3_stat() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(5, 3); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_hp>(5, 3); - } - - void FeldmanHashSetHdrTest::dhp_hash128_4_3_stat() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - typedef hash128::less less; - typedef hash128::cmp compare; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_hp(4, 3); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - , co::stat< cc::feldman_hashset::stat<>> - , co::less< hash_type::less > - , co::compare< hash128::cmp > - >::type - > set_type2; - test_hp(4, 3); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_feldman_hashset_hp.cpp b/tests/test-hdr/set/hdr_feldman_hashset_hp.cpp deleted file mode 100644 index 389de08c..00000000 --- a/tests/test-hdr/set/hdr_feldman_hashset_hp.cpp +++ /dev/null @@ -1,329 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_feldman_hashset.h" -#include -#include "unit/print_feldman_hashset_stat.h" - -namespace set { - namespace { - typedef cds::gc::HP gc_type; - } // namespace - - void FeldmanHashSetHdrTest::hp_nohash() - { - typedef size_t key_type; - - struct traits : public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_hp>(4, 2); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - >::type - > set_type2; - test_hp>(4, 2); - } - - void FeldmanHashSetHdrTest::hp_stdhash() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(4, 2); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - >::type - > set_type2; - test_hp>(4, 2); - } - - void FeldmanHashSetHdrTest::hp_hash128() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef hash128::less less; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" ); - test_hp(4, 2); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - , co::less< hash_type::less > - >::type - > set_type2; - test_hp(4, 2); - } - - void FeldmanHashSetHdrTest::hp_nohash_stat() - { - typedef size_t key_type; - - struct traits : public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_hp>(4, 2); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - , co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_hp>(4, 2); - } - - void FeldmanHashSetHdrTest::hp_stdhash_stat() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(4, 2); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_hp>(4, 2); - } - - void FeldmanHashSetHdrTest::hp_hash128_stat() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef hash128::cmp compare; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_hp(4, 2); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - ,co::compare< hash128::cmp > - >::type - > set_type2; - test_hp(4, 2); - } - - void FeldmanHashSetHdrTest::hp_nohash_5_3() - { - typedef size_t key_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(5, 3); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - >::type - > set_type2; - test_hp>(5, 3); - } - - void FeldmanHashSetHdrTest::hp_stdhash_5_3() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(5, 3); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - >::type - > set_type2; - test_hp>(5, 3); - } - - void FeldmanHashSetHdrTest::hp_hash128_4_3() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef co::v::sequential_consistent memory_model; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_hp(4, 3); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::memory_model< co::v::sequential_consistent > - >::type - > set_type2; - test_hp(4, 3); - } - - void FeldmanHashSetHdrTest::hp_nohash_5_3_stat() - { - typedef size_t key_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(5, 3); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_hp>(5, 3); - } - - void FeldmanHashSetHdrTest::hp_stdhash_5_3_stat() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(5, 3); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_hp>(5, 3); - } - - void FeldmanHashSetHdrTest::hp_hash128_4_3_stat() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - typedef hash128::less less; - typedef hash128::cmp compare; - }; - typedef cc::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_hp(4, 3); - - typedef cc::FeldmanHashSet< - gc_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - , co::stat< cc::feldman_hashset::stat<>> - , co::less< hash_type::less > - , co::compare< hash128::cmp > - >::type - > set_type2; - test_hp(4, 3); - } - - -} // namespace set - -CPPUNIT_TEST_SUITE_REGISTRATION(set::FeldmanHashSetHdrTest); diff --git a/tests/test-hdr/set/hdr_feldman_hashset_rcu_gpb.cpp b/tests/test-hdr/set/hdr_feldman_hashset_rcu_gpb.cpp deleted file mode 100644 index e8374c28..00000000 --- a/tests/test-hdr/set/hdr_feldman_hashset_rcu_gpb.cpp +++ /dev/null @@ -1,328 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_feldman_hashset.h" -#include -#include -#include "unit/print_feldman_hashset_stat.h" - -namespace set { - namespace { - typedef cds::urcu::gc> rcu_type; - } // namespace - - void FeldmanHashSetHdrTest::rcu_gpb_nohash() - { - typedef size_t key_type; - - struct traits : public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - >::type - > set_type2; - test_rcu>(4, 2); - } - - void FeldmanHashSetHdrTest::rcu_gpb_stdhash() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - >::type - > set_type2; - test_rcu>(4, 2); - } - - void FeldmanHashSetHdrTest::rcu_gpb_hash128() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef hash128::less less; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" ); - test_rcu(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - , co::less< hash_type::less > - >::type - > set_type2; - test_rcu(4, 2); - } - - void FeldmanHashSetHdrTest::rcu_gpb_nohash_stat() - { - typedef size_t key_type; - - struct traits : public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - , co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); - } - - void FeldmanHashSetHdrTest::rcu_gpb_stdhash_stat() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); - } - - void FeldmanHashSetHdrTest::rcu_gpb_hash128_stat() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef hash128::cmp compare; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - ,co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 2); - } - - void FeldmanHashSetHdrTest::rcu_gpb_nohash_5_3() - { - typedef size_t key_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - >::type - > set_type2; - test_rcu>(5, 3); - } - - void FeldmanHashSetHdrTest::rcu_gpb_stdhash_5_3() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - >::type - > set_type2; - test_rcu>(5, 3); - } - - void FeldmanHashSetHdrTest::rcu_gpb_hash128_4_3() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef co::v::sequential_consistent memory_model; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::memory_model< co::v::sequential_consistent > - >::type - > set_type2; - test_rcu(4, 3); - } - - void FeldmanHashSetHdrTest::rcu_gpb_nohash_5_3_stat() - { - typedef size_t key_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); - } - - void FeldmanHashSetHdrTest::rcu_gpb_stdhash_5_3_stat() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); - } - - void FeldmanHashSetHdrTest::rcu_gpb_hash128_4_3_stat() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - typedef hash128::less less; - typedef hash128::cmp compare; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - , co::stat< cc::feldman_hashset::stat<>> - , co::less< hash_type::less > - , co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 3); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_feldman_hashset_rcu_gpi.cpp b/tests/test-hdr/set/hdr_feldman_hashset_rcu_gpi.cpp deleted file mode 100644 index ea898e1f..00000000 --- a/tests/test-hdr/set/hdr_feldman_hashset_rcu_gpi.cpp +++ /dev/null @@ -1,328 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_feldman_hashset.h" -#include -#include -#include "unit/print_feldman_hashset_stat.h" - -namespace set { - namespace { - typedef cds::urcu::gc> rcu_type; - } // namespace - - void FeldmanHashSetHdrTest::rcu_gpi_nohash() - { - typedef size_t key_type; - - struct traits : public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - >::type - > set_type2; - test_rcu>(4, 2); - } - - void FeldmanHashSetHdrTest::rcu_gpi_stdhash() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - >::type - > set_type2; - test_rcu>(4, 2); - } - - void FeldmanHashSetHdrTest::rcu_gpi_hash128() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef hash128::less less; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" ); - test_rcu(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - , co::less< hash_type::less > - >::type - > set_type2; - test_rcu(4, 2); - } - - void FeldmanHashSetHdrTest::rcu_gpi_nohash_stat() - { - typedef size_t key_type; - - struct traits : public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - , co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); - } - - void FeldmanHashSetHdrTest::rcu_gpi_stdhash_stat() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); - } - - void FeldmanHashSetHdrTest::rcu_gpi_hash128_stat() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef hash128::cmp compare; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - ,co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 2); - } - - void FeldmanHashSetHdrTest::rcu_gpi_nohash_5_3() - { - typedef size_t key_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - >::type - > set_type2; - test_rcu>(5, 3); - } - - void FeldmanHashSetHdrTest::rcu_gpi_stdhash_5_3() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - >::type - > set_type2; - test_rcu>(5, 3); - } - - void FeldmanHashSetHdrTest::rcu_gpi_hash128_4_3() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef co::v::sequential_consistent memory_model; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::memory_model< co::v::sequential_consistent > - >::type - > set_type2; - test_rcu(4, 3); - } - - void FeldmanHashSetHdrTest::rcu_gpi_nohash_5_3_stat() - { - typedef size_t key_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); - } - - void FeldmanHashSetHdrTest::rcu_gpi_stdhash_5_3_stat() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); - } - - void FeldmanHashSetHdrTest::rcu_gpi_hash128_4_3_stat() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - typedef hash128::less less; - typedef hash128::cmp compare; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - , co::stat< cc::feldman_hashset::stat<>> - , co::less< hash_type::less > - , co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 3); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_feldman_hashset_rcu_gpt.cpp b/tests/test-hdr/set/hdr_feldman_hashset_rcu_gpt.cpp deleted file mode 100644 index bc627f4c..00000000 --- a/tests/test-hdr/set/hdr_feldman_hashset_rcu_gpt.cpp +++ /dev/null @@ -1,328 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_feldman_hashset.h" -#include -#include -#include "unit/print_feldman_hashset_stat.h" - -namespace set { - namespace { - typedef cds::urcu::gc> rcu_type; - } // namespace - - void FeldmanHashSetHdrTest::rcu_gpt_nohash() - { - typedef size_t key_type; - - struct traits : public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - >::type - > set_type2; - test_rcu>(4, 2); - } - - void FeldmanHashSetHdrTest::rcu_gpt_stdhash() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - >::type - > set_type2; - test_rcu>(4, 2); - } - - void FeldmanHashSetHdrTest::rcu_gpt_hash128() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef hash128::less less; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" ); - test_rcu(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - , co::less< hash_type::less > - >::type - > set_type2; - test_rcu(4, 2); - } - - void FeldmanHashSetHdrTest::rcu_gpt_nohash_stat() - { - typedef size_t key_type; - - struct traits : public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - , co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); - } - - void FeldmanHashSetHdrTest::rcu_gpt_stdhash_stat() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); - } - - void FeldmanHashSetHdrTest::rcu_gpt_hash128_stat() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef hash128::cmp compare; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - ,co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 2); - } - - void FeldmanHashSetHdrTest::rcu_gpt_nohash_5_3() - { - typedef size_t key_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - >::type - > set_type2; - test_rcu>(5, 3); - } - - void FeldmanHashSetHdrTest::rcu_gpt_stdhash_5_3() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - >::type - > set_type2; - test_rcu>(5, 3); - } - - void FeldmanHashSetHdrTest::rcu_gpt_hash128_4_3() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef co::v::sequential_consistent memory_model; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::memory_model< co::v::sequential_consistent > - >::type - > set_type2; - test_rcu(4, 3); - } - - void FeldmanHashSetHdrTest::rcu_gpt_nohash_5_3_stat() - { - typedef size_t key_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); - } - - void FeldmanHashSetHdrTest::rcu_gpt_stdhash_5_3_stat() - { - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); - } - - void FeldmanHashSetHdrTest::rcu_gpt_hash128_4_3_stat() - { - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - typedef hash128::less less; - typedef hash128::cmp compare; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - , co::stat< cc::feldman_hashset::stat<>> - , co::less< hash_type::less > - , co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 3); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_feldman_hashset_rcu_shb.cpp b/tests/test-hdr/set/hdr_feldman_hashset_rcu_shb.cpp deleted file mode 100644 index 07b3ffcc..00000000 --- a/tests/test-hdr/set/hdr_feldman_hashset_rcu_shb.cpp +++ /dev/null @@ -1,352 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_feldman_hashset.h" -#include -#include -#include "unit/print_feldman_hashset_stat.h" - -namespace set { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc> rcu_type; - } // namespace -#endif - - void FeldmanHashSetHdrTest::rcu_shb_nohash() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t key_type; - - struct traits : public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - >::type - > set_type2; - test_rcu>(4, 2); -#endif - } - - void FeldmanHashSetHdrTest::rcu_shb_stdhash() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - >::type - > set_type2; - test_rcu>(4, 2); -#endif - } - - void FeldmanHashSetHdrTest::rcu_shb_hash128() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef hash128::less less; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" ); - test_rcu(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - , co::less< hash_type::less > - >::type - > set_type2; - test_rcu(4, 2); -#endif - } - - void FeldmanHashSetHdrTest::rcu_shb_nohash_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t key_type; - - struct traits : public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - , co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); -#endif - } - - void FeldmanHashSetHdrTest::rcu_shb_stdhash_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); -#endif - } - - void FeldmanHashSetHdrTest::rcu_shb_hash128_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef hash128::cmp compare; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - ,co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 2); -#endif - } - - void FeldmanHashSetHdrTest::rcu_shb_nohash_5_3() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t key_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - >::type - > set_type2; - test_rcu>(5, 3); -#endif - } - - void FeldmanHashSetHdrTest::rcu_shb_stdhash_5_3() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - >::type - > set_type2; - test_rcu>(5, 3); -#endif - } - - void FeldmanHashSetHdrTest::rcu_shb_hash128_4_3() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef co::v::sequential_consistent memory_model; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::memory_model< co::v::sequential_consistent > - >::type - > set_type2; - test_rcu(4, 3); -#endif - } - - void FeldmanHashSetHdrTest::rcu_shb_nohash_5_3_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t key_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); -#endif - } - - void FeldmanHashSetHdrTest::rcu_shb_stdhash_5_3_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); -#endif - } - - void FeldmanHashSetHdrTest::rcu_shb_hash128_4_3_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - typedef hash128::less less; - typedef hash128::cmp compare; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - , co::stat< cc::feldman_hashset::stat<>> - , co::less< hash_type::less > - , co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 3); -#endif - } -} // namespace set diff --git a/tests/test-hdr/set/hdr_feldman_hashset_rcu_sht.cpp b/tests/test-hdr/set/hdr_feldman_hashset_rcu_sht.cpp deleted file mode 100644 index 73d7baeb..00000000 --- a/tests/test-hdr/set/hdr_feldman_hashset_rcu_sht.cpp +++ /dev/null @@ -1,352 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_feldman_hashset.h" -#include -#include -#include "unit/print_feldman_hashset_stat.h" - -namespace set { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc> rcu_type; - } // namespace -#endif - - void FeldmanHashSetHdrTest::rcu_sht_nohash() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t key_type; - - struct traits : public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - >::type - > set_type2; - test_rcu>(4, 2); -#endif - } - - void FeldmanHashSetHdrTest::rcu_sht_stdhash() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - >::type - > set_type2; - test_rcu>(4, 2); -#endif - } - - void FeldmanHashSetHdrTest::rcu_sht_hash128() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef hash128::less less; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" ); - test_rcu(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - , co::less< hash_type::less > - >::type - > set_type2; - test_rcu(4, 2); -#endif - } - - void FeldmanHashSetHdrTest::rcu_sht_nohash_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t key_type; - - struct traits : public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - , co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); -#endif - } - - void FeldmanHashSetHdrTest::rcu_sht_stdhash_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); -#endif - } - - void FeldmanHashSetHdrTest::rcu_sht_hash128_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef hash128::cmp compare; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 2); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - ,co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 2); -#endif - } - - void FeldmanHashSetHdrTest::rcu_sht_nohash_5_3() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t key_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - >::type - > set_type2; - test_rcu>(5, 3); -#endif - } - - void FeldmanHashSetHdrTest::rcu_sht_stdhash_5_3() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - >::type - > set_type2; - test_rcu>(5, 3); -#endif - } - - void FeldmanHashSetHdrTest::rcu_sht_hash128_4_3() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef co::v::sequential_consistent memory_model; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::memory_model< co::v::sequential_consistent > - >::type - > set_type2; - test_rcu(4, 3); -#endif - } - - void FeldmanHashSetHdrTest::rcu_sht_nohash_5_3_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t key_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_key> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); -#endif - } - - void FeldmanHashSetHdrTest::rcu_sht_stdhash_5_3_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - ,co::stat< cc::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); -#endif - } - - void FeldmanHashSetHdrTest::rcu_sht_hash128_4_3_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef hash128 hash_type; - - struct traits: public cc::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef cc::feldman_hashset::stat<> stat; - typedef hash128::less less; - typedef hash128::cmp compare; - }; - typedef cc::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef cc::FeldmanHashSet< - rcu_type, - Item, - typename cc::feldman_hashset::make_traits< - cc::feldman_hashset::hash_accessor< get_hash> - , co::stat< cc::feldman_hashset::stat<>> - , co::less< hash_type::less > - , co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 3); -#endif - } -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_cuckoo_refinable_set.cpp b/tests/test-hdr/set/hdr_intrusive_cuckoo_refinable_set.cpp deleted file mode 100644 index 94a8a4ed..00000000 --- a/tests/test-hdr/set/hdr_intrusive_cuckoo_refinable_set.cpp +++ /dev/null @@ -1,674 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_cuckoo_set.h" -#include - -#include "set/intrusive_cuckoo_set_common.h" -#include "../unit/print_cuckoo_stat.h" - -namespace set { - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_basehook_equal() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type; - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - co::hash< std::tuple< hash1, hash2 > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::equal_to< equal_to > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_basehook_equal() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::equal_to< equal_to > - ,co::mutex_policy< ci::cuckoo::refinable<> > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_basehook_sort_cmp() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_basehook_sort_cmp() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_basehook_sort_less() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_basehook_sort_less() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_basehook_sort_cmpmix() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_basehook_sort_cmpmix() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 0 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_basehook_sort_cmpmix_stat() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 0 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - ,co::stat< ci::cuckoo::stat > - >::type - > set_type; - - unsigned int nProbesetSize = set_type::node_type::probeset_size ? set_type::node_type::probeset_size : 4; - set_type s( 256, nProbesetSize, nProbesetSize / 2 ); - test_with( s ); - CPPUNIT_MSG( s.statistics() << s.mutex_policy_statistics() ); - } - - - // base hook, store hash - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_basehook_equal_storehash() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > > item_type; - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - ,ci::cuckoo::store_hash< item_type::hash_array_size > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::equal_to< equal_to > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_basehook_equal_storehash() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - ,ci::cuckoo::store_hash< item_type::hash_array_size > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::equal_to< equal_to > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_basehook_sort_cmp_storehash() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - ,ci::cuckoo::store_hash< item_type::hash_array_size > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_basehook_sort_cmp_storehash() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - ,ci::cuckoo::store_hash< item_type::hash_array_size > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_basehook_sort_less_storehash() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - ,ci::cuckoo::store_hash< item_type::hash_array_size > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_basehook_sort_less_storehash() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - ,ci::cuckoo::store_hash< item_type::hash_array_size > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_basehook_sort_cmpmix_storehash() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - ,ci::cuckoo::store_hash< item_type::hash_array_size > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_basehook_sort_cmpmix_storehash() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 2 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - ,ci::cuckoo::store_hash< item_type::hash_array_size > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - - // Member hook - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_memberhook_equal() - { - typedef IntrusiveCuckooSetHdrTest::member_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type; - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember)> > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::equal_to< equal_to > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_memberhook_equal() - { - typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::equal_to< equal_to > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_memberhook_sort_cmp() - { - typedef ci::cuckoo::node< ci::cuckoo::list, 0 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_memberhook_sort_cmp() - { - typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_memberhook_sort_less() - { - typedef ci::cuckoo::node< ci::cuckoo::list, 0 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_memberhook_sort_less() - { - typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_memberhook_sort_cmpmix() - { - typedef ci::cuckoo::node< ci::cuckoo::list, 0 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_memberhook_sort_cmpmix() - { - typedef ci::cuckoo::node< ci::cuckoo::vector<8>, 0 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - - // member hook, store hash - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_memberhook_equal_storehash() - { - typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - ,ci::cuckoo::store_hash< node_type::hash_array_size > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::equal_to< equal_to > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_memberhook_equal_storehash() - { - typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - ,ci::cuckoo::store_hash< node_type::hash_array_size > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::equal_to< equal_to > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_memberhook_sort_cmp_storehash() - { - typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - ,ci::cuckoo::store_hash< node_type::hash_array_size > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_memberhook_sort_cmp_storehash() - { - typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - ,ci::cuckoo::store_hash< node_type::hash_array_size > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_memberhook_sort_less_storehash() - { - typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - ,ci::cuckoo::store_hash< node_type::hash_array_size > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_memberhook_sort_less_storehash() - { - typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - ,ci::cuckoo::store_hash< node_type::hash_array_size > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_memberhook_sort_cmpmix_storehash() - { - typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - ,ci::cuckoo::store_hash< node_type::hash_array_size > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_memberhook_sort_cmpmix_storehash() - { - typedef ci::cuckoo::node< ci::cuckoo::vector<8>, 2 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - ,ci::cuckoo::store_hash< node_type::hash_array_size > - > > - ,co::mutex_policy< ci::cuckoo::refinable<> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_cuckoo_set.cpp b/tests/test-hdr/set/hdr_intrusive_cuckoo_set.cpp deleted file mode 100644 index ea06a340..00000000 --- a/tests/test-hdr/set/hdr_intrusive_cuckoo_set.cpp +++ /dev/null @@ -1,639 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_cuckoo_set.h" -#include - -#include "set/intrusive_cuckoo_set_common.h" -#include "../unit/print_cuckoo_stat.h" - -namespace set { - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_equal() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type; - struct set_traits : public ci::cuckoo::traits { - typedef co::hash_tuple< hash1, hash2 > hash; - typedef set::equal_to equal_to; - }; - typedef ci::CuckooSet< item_type, set_traits > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_equal() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > > item_type; - - struct set_traits : public ci::cuckoo::traits { - typedef ci::cuckoo::base_hook< ci::cuckoo::probeset_type< item_type::probeset_type >> hook; - typedef co::hash_tuple< hash1, hash2 > hash; - typedef set::equal_to equal_to; - }; - typedef ci::CuckooSet< item_type, set_traits > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_sort_cmp() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_cmp() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_sort_less() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_less() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_sort_cmpmix() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_cmpmix() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 0 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_cmpmix_stat() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 0 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - ,co::stat< ci::cuckoo::stat > - >::type - > set_type; - - unsigned int nProbesetSize = set_type::node_type::probeset_size ? set_type::node_type::probeset_size : 4; - set_type s( 256, nProbesetSize, nProbesetSize / 2 ); - test_with( s ); - CPPUNIT_MSG( s.statistics() << s.mutex_policy_statistics() ); - } - - - // base hook, store hash - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_equal_storehash() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > > item_type; - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - ,ci::cuckoo::store_hash< item_type::hash_array_size > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::equal_to< equal_to > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_equal_storehash() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - ,ci::cuckoo::store_hash< item_type::hash_array_size > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::equal_to< equal_to > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_sort_cmp_storehash() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - ,ci::cuckoo::store_hash< item_type::hash_array_size > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_cmp_storehash() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - ,ci::cuckoo::store_hash< item_type::hash_array_size > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_sort_less_storehash() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - ,ci::cuckoo::store_hash< item_type::hash_array_size > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_less_storehash() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - ,ci::cuckoo::store_hash< item_type::hash_array_size > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_sort_cmpmix_storehash() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - ,ci::cuckoo::store_hash< item_type::hash_array_size > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_cmpmix_storehash() - { - typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 2 > > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::base_hook< - ci::cuckoo::probeset_type< item_type::probeset_type > - ,ci::cuckoo::store_hash< item_type::hash_array_size > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - - // Member hook - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_equal() - { - typedef IntrusiveCuckooSetHdrTest::member_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type; - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember)> > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::equal_to< equal_to > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_equal() - { - typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::equal_to< equal_to > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_sort_cmp() - { - typedef ci::cuckoo::node< ci::cuckoo::list, 0 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_sort_cmp() - { - typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_sort_less() - { - typedef ci::cuckoo::node< ci::cuckoo::list, 0 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_sort_less() - { - typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_sort_cmpmix() - { - typedef ci::cuckoo::node< ci::cuckoo::list, 0 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_sort_cmpmix() - { - typedef ci::cuckoo::node< ci::cuckoo::vector<8>, 0 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - - // member hook, store hash - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_equal_storehash() - { - typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - ,ci::cuckoo::store_hash< node_type::hash_array_size > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::equal_to< equal_to > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_equal_storehash() - { - typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - ,ci::cuckoo::store_hash< node_type::hash_array_size > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::equal_to< equal_to > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_sort_cmp_storehash() - { - typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - ,ci::cuckoo::store_hash< node_type::hash_array_size > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_sort_cmp_storehash() - { - typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - ,ci::cuckoo::store_hash< node_type::hash_array_size > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_sort_less_storehash() - { - typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - ,ci::cuckoo::store_hash< node_type::hash_array_size > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_sort_less_storehash() - { - typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - ,ci::cuckoo::store_hash< node_type::hash_array_size > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_sort_cmpmix_storehash() - { - typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - ,ci::cuckoo::store_hash< node_type::hash_array_size > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - - void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_sort_cmpmix_storehash() - { - typedef ci::cuckoo::node< ci::cuckoo::vector<8>, 2 > node_type; - typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type; - - typedef ci::CuckooSet< item_type - ,ci::cuckoo::make_traits< - ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember), - ci::cuckoo::probeset_type< node_type::probeset_type > - ,ci::cuckoo::store_hash< node_type::hash_array_size > - > > - ,co::hash< std::tuple< hash1, hash2 > > - ,co::less< IntrusiveCuckooSetHdrTest::less > - ,co::compare< IntrusiveCuckooSetHdrTest::cmp > - >::type - > set_type; - - test_cuckoo(); - } - -} // namespace set - -CPPUNIT_TEST_SUITE_REGISTRATION(set::IntrusiveCuckooSetHdrTest); diff --git a/tests/test-hdr/set/hdr_intrusive_cuckoo_set.h b/tests/test-hdr/set/hdr_intrusive_cuckoo_set.h deleted file mode 100644 index 064a86ab..00000000 --- a/tests/test-hdr/set/hdr_intrusive_cuckoo_set.h +++ /dev/null @@ -1,687 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_INTRUSIVE_CUCKOO_SET_H -#define CDSTEST_HDR_INTRUSIVE_CUCKOO_SET_H - -#include "cppunit/cppunit_proxy.h" -#include - -// cds::intrusive namespace forward declaration -namespace cds { namespace intrusive {}} - -namespace set { - namespace ci = cds::intrusive; - namespace co = cds::opt; - - // MichaelHashSet - class IntrusiveCuckooSetHdrTest: public CppUnitMini::TestCase - { - public: - struct stat - { - unsigned int nDisposeCount ; // count of disposer calling - unsigned int nFindCount ; // count of find-functor calling - unsigned int nFindArgCount; - unsigned int nInsertCount; - unsigned int nEnsureNewCount; - unsigned int nEnsureCount; - unsigned int nEraseCount; - - stat() - { - memset( this, 0, sizeof(*this)); - } - - stat& operator=( stat const& s) - { - memcpy( this, &s, sizeof(*this)); - return *this; - } - }; - - struct item - { - int nKey; - int nVal; - - item() - {} - - item(int key, int val) - : nKey( key ) - , nVal(val) - {} - - item(const item& v ) - : nKey( v.nKey ) - , nVal( v.nVal ) - {} - - int key() const - { - return nKey; - } - - int val() const - { - return nVal; - } - }; - - template - struct base_item - : public item - , public Hook - , public stat - - { - base_item() - {} - - base_item(int key, int val) - : item( key, val ) - {} - - base_item(const base_item& v ) - : item( static_cast(v) ) - , stat() - {} - }; - - template - struct member_item - : public item - , public stat - { - Hook hMember; - - member_item() - {} - - member_item(int key, int val) - : item( key, val ) - {} - - member_item(const member_item& v ) - : item( static_cast(v)) - , stat() - {} - }; - - struct find_key { - int nKey; - - find_key( int key ) - : nKey(key) - {} - }; - - struct hash_int { - size_t operator()( int i ) const - { - return co::v::hash()( i ); - } - template - size_t operator()( const Item& i ) const - { - return (*this)( i.key() ); - } - size_t operator()( find_key const& i) const - { - return co::v::hash()( i.nKey ); - } - }; - - template - struct less - { - bool operator ()(const T& v1, const T& v2 ) const - { - return v1.key() < v2.key(); - } - - template - bool operator ()(const T& v1, const Q& v2 ) const - { - return v1.key() < v2; - } - - template - bool operator ()(const Q& v1, const T& v2 ) const - { - return v1 < v2.key(); - } - }; - - template - struct cmp { - int operator ()(const T& v1, const T& v2 ) const - { - if ( v1.key() < v2.key() ) - return -1; - return v1.key() > v2.key() ? 1 : 0; - } - - template - int operator ()(const T& v1, const Q& v2 ) const - { - if ( v1.key() < v2 ) - return -1; - return v1.key() > v2 ? 1 : 0; - } - - template - int operator ()(const Q& v1, const T& v2 ) const - { - if ( v1 < v2.key() ) - return -1; - return v1 > v2.key() ? 1 : 0; - } - }; - - struct faked_disposer - { - template - void operator ()( T * p ) - { - ++p->nDisposeCount; - } - }; - - struct insert_functor { - template - void operator()( Item& e) - { - ++e.nInsertCount; - } - }; - - struct update_functor { - template - void operator()( bool bNew, Item& e, Item& arg ) - { - if ( bNew ) { - ++e.nEnsureNewCount; - CPPUNIT_ASSERT_CURRENT( &e == &arg ); - } - else - ++e.nEnsureCount; - } - }; - - struct erase_functor { - template< typename Item > - void operator()( Item& e ) - { - ++e.nEraseCount; - } - }; - - struct find_functor { - template - void operator()( Item& e, What& ) - { - ++e.nFindCount; - } - - template - void operator()( Item& e, Item& w ) - { - ++e.nFindCount; - ++w.nFindArgCount; - } - }; - - struct less2 { - template - bool operator()( Item const& e, find_key const& k ) const - { - return e.key() < k.nKey; - } - template - bool operator()( find_key const& k, Item const& e ) const - { - return k.nKey < e.key(); - } - template - bool operator()( Item const& e, int k ) const - { - return e.key() < k; - } - template - bool operator()( int k, Item const& e ) const - { - return k < e.key(); - } - }; - - struct equal_to2 { - template - bool operator()( Item const& e, find_key const& k ) const - { - return e.key() == k.nKey; - } - template - bool operator()( find_key const& k, Item const& e ) const - { - return k.nKey == e.key(); - } - template - bool operator()( Item const& e, int k ) const - { - return e.key() == k; - } - template - bool operator()( int k, Item const& e ) const - { - return k == e.key(); - } - }; - - template - struct auto_dispose { - T * m_pArr; - auto_dispose( T * pArr ): m_pArr( pArr ) {} - ~auto_dispose() { delete[] m_pArr; } - }; - - template - void test_with(Set& s) - { - typedef typename Set::value_type value_type; - - int const k1 = 10; - int const k2 = 25; - int const k3 = 51; - - int const v1 = 25; - int const v2 = 56; - int const v3 = 23; - - value_type e1( k1, v1 ); - value_type e2( k2, v2 ); - value_type e3( k3, v3); - - stat s1 = e1; - stat s2 = e2; - stat s3 = e3; - - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( s.size() == 0 ); - - CPPUNIT_ASSERT( !s.contains(k1)); - CPPUNIT_ASSERT( !s.contains(k2, typename std::conditional::type() )); - CPPUNIT_ASSERT( !s.contains(k3)); - - CPPUNIT_ASSERT( s.insert(e1)); - CPPUNIT_ASSERT( s.contains(e1)); - CPPUNIT_ASSERT( s.contains(k1)); - CPPUNIT_ASSERT( s.contains(k1, typename std::conditional::type())); - CPPUNIT_ASSERT( !s.contains(e2)); - CPPUNIT_ASSERT( !s.contains(e3)); - - CPPUNIT_ASSERT( e2.nInsertCount == 0 ); - CPPUNIT_ASSERT( s.insert(e2, insert_functor() )); - CPPUNIT_ASSERT( e2.nInsertCount == 1 ); - CPPUNIT_ASSERT( s.find(e1, find_functor() )); - CPPUNIT_ASSERT( e1.nFindCount == 1 ); - CPPUNIT_ASSERT( e1.nFindArgCount == 1 ); - CPPUNIT_ASSERT( s.find(k1, find_functor() )); - CPPUNIT_ASSERT( e1.nFindCount == 2 ); - CPPUNIT_ASSERT( e1.nFindArgCount == 1 ); - CPPUNIT_ASSERT( s.find_with(k2, typename std::conditional::type(), find_functor() )); - CPPUNIT_ASSERT( e2.nFindCount == 1 ); - CPPUNIT_ASSERT( e2.nFindArgCount == 0 ); - CPPUNIT_ASSERT( s.find(e2, find_functor() )); - CPPUNIT_ASSERT( e2.nFindCount == 2 ); - CPPUNIT_ASSERT( e2.nFindArgCount == 1 ); - CPPUNIT_ASSERT( !s.find(k3, find_functor())); - CPPUNIT_ASSERT( e3.nFindCount == 0 ); - CPPUNIT_ASSERT( e3.nFindArgCount == 0 ); - CPPUNIT_ASSERT( !s.find(e3, find_functor())); - CPPUNIT_ASSERT( e3.nFindCount == 0 ); - CPPUNIT_ASSERT( e3.nFindArgCount == 0 ); - - s1 = e1 ; s2 = e2 ; s3 = e3; - - CPPUNIT_ASSERT( e3.nEnsureNewCount == 0 ); - CPPUNIT_ASSERT( e3.nEnsureCount == 0 ); - CPPUNIT_ASSERT(s.update(e3, update_functor(), false) == std::make_pair(false, false)); - CPPUNIT_ASSERT(e3.nEnsureNewCount == 0); - CPPUNIT_ASSERT(e3.nEnsureCount == 0); - CPPUNIT_ASSERT( s.update( e3, update_functor() ) == std::make_pair(true, true)); - CPPUNIT_ASSERT( e3.nEnsureNewCount == 1 ); - CPPUNIT_ASSERT( e3.nEnsureCount == 0 ); - CPPUNIT_ASSERT( s.find_with(find_key(k1), typename std::conditional::type(), find_functor() )); - CPPUNIT_ASSERT( e1.nFindCount == s1.nFindCount + 1 ); - CPPUNIT_ASSERT( e1.nFindArgCount == s1.nFindArgCount ); - CPPUNIT_ASSERT( s.find_with(k1, typename std::conditional::type(), find_functor() )); - CPPUNIT_ASSERT( e1.nFindCount == s1.nFindCount + 2 ); - CPPUNIT_ASSERT( e1.nFindArgCount == s1.nFindArgCount ); - CPPUNIT_ASSERT( s.find_with(k2, typename std::conditional::type(), find_functor() )); - CPPUNIT_ASSERT( e2.nFindCount == s2.nFindCount + 1 ); - CPPUNIT_ASSERT( e2.nFindArgCount == s2.nFindArgCount ); - CPPUNIT_ASSERT( s.contains(find_key(k2), typename std::conditional::type() )); - CPPUNIT_ASSERT( e2.nFindCount == s2.nFindCount + 1 ) ; // unchanged, no find_functor - CPPUNIT_ASSERT( e2.nFindArgCount == s2.nFindArgCount ); - CPPUNIT_ASSERT( s.contains(k3, typename std::conditional::type() )); - CPPUNIT_ASSERT( e3.nFindCount == s3.nFindCount ) ; // unchanged, no find_functor - CPPUNIT_ASSERT( e3.nFindArgCount == s3.nFindArgCount ); - CPPUNIT_ASSERT( s.find_with(find_key(k3), typename std::conditional::type(), find_functor() )); - CPPUNIT_ASSERT( e3.nFindCount == s3.nFindCount + 1 ); - CPPUNIT_ASSERT( e3.nFindArgCount == s3.nFindArgCount ); - - s1 = e1 ; s2 = e2 ; s3 = e3; - - // insert existing elements - { - value_type eu( k2, 1000 ); - CPPUNIT_ASSERT( !s.insert( eu )); - CPPUNIT_ASSERT( !s.insert( eu, insert_functor() )); - CPPUNIT_ASSERT( e2.nInsertCount == s2.nInsertCount ); - - CPPUNIT_ASSERT( s.update( eu, update_functor()) == std::make_pair(true, false)); - CPPUNIT_ASSERT( e2.nInsertCount == s2.nInsertCount ); - CPPUNIT_ASSERT( e2.nEnsureCount == s2.nEnsureCount + 1 ); - CPPUNIT_ASSERT( e2.nEnsureNewCount == s2.nEnsureNewCount ); - } - - s1 = e1 ; s2 = e2 ; s3 = e3; - - // unlink & erase test - { - value_type eu( k2, 10 ); - CPPUNIT_ASSERT( !s.unlink(eu)); - } - - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( s.size() == 3 ); - - CPPUNIT_ASSERT( s.unlink( e1 ) ); - CPPUNIT_ASSERT( s.erase_with( k2, typename std::conditional::type() ) == &e2 ); - CPPUNIT_ASSERT( s.erase( e2 ) == nullptr ); - CPPUNIT_ASSERT( e3.nEraseCount == 0 ); - CPPUNIT_ASSERT( s.erase_with( k3, typename std::conditional::type(), erase_functor()) == &e3 ); - CPPUNIT_ASSERT( e3.nEraseCount == 1 ); - CPPUNIT_ASSERT( s.erase( k3, erase_functor() ) == nullptr ); - CPPUNIT_ASSERT( e3.nEraseCount == 1 ); - - CPPUNIT_ASSERT( s.insert( e3 ) ); - CPPUNIT_ASSERT( s.erase( e3 ) == &e3 ); - CPPUNIT_ASSERT( e3.nEraseCount == 1 ); - - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( s.size() == 0 ); - - s1 = e1 ; s2 = e2 ; s3 = e3; - - // clear & clear_and_dispose test - CPPUNIT_ASSERT( s.insert(e1)); - CPPUNIT_ASSERT( s.insert(e2)); - CPPUNIT_ASSERT( s.insert(e3)); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( s.size() == 3 ); - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( s.size() == 0 ); - - CPPUNIT_ASSERT( s.insert(e1)); - CPPUNIT_ASSERT( s.insert(e2)); - CPPUNIT_ASSERT( s.insert(e3)); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( s.size() == 3 ); - - CPPUNIT_ASSERT( e1.nDisposeCount == 0 ); - CPPUNIT_ASSERT( e2.nDisposeCount == 0 ); - CPPUNIT_ASSERT( e3.nDisposeCount == 0 ); - s.clear_and_dispose( faked_disposer() ); - CPPUNIT_ASSERT( e1.nDisposeCount == 1 ); - CPPUNIT_ASSERT( e2.nDisposeCount == 1 ); - CPPUNIT_ASSERT( e3.nDisposeCount == 1 ); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( s.size() == 0 ); - - // resize test (up to 64K elements) - size_t const nSize = 64 * 1024; - value_type * arr = new value_type[nSize]; - auto_dispose ad(arr); - for ( size_t i = 0; i < nSize; ++i ) { - value_type * p = new (arr + i) value_type( (int) i, (int) i * 2 ); - CPPUNIT_ASSERT_EX( s.insert( *p, insert_functor() ), "i=" << i ); - CPPUNIT_ASSERT_EX( p->nInsertCount == 1, "i=" << i ); - //for ( size_t j = 0; j <= i; ++j ) { - // if ( !s.contains((int) j) ) { - // CPPUNIT_MSG( "Key " << j << " is not found after inserting key " << i ); - // } - //} - } - - for ( size_t i = 0; i < nSize; ++i ) - CPPUNIT_ASSERT_EX( s.contains((int) i), "Key " << i << " is not found" ); - - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( s.size() == nSize ); - s.clear_and_dispose( faked_disposer() ); - for ( size_t i = 0; i < nSize; ++i ) { - CPPUNIT_ASSERT_EX( arr[i].nDisposeCount == 1, "i=" << i ); - } - } - - template - void test() - { - // default ctor - { - Set s; - test_with(s); - } - - // ctor with explicit initial capacity - { - Set s(256); - test_with(s); - } - } - - template - void test_cuckoo() - { - unsigned int nProbesetSize = Set::node_type::probeset_size ? Set::node_type::probeset_size : 4; - Set s( 256, nProbesetSize, nProbesetSize / 2 ); - test_with( s ); - } - - // *********************************************************** - // Cuckoo hashing (striped) - - void Cuckoo_striped_list_basehook_equal(); - void Cuckoo_striped_vector_basehook_equal(); - void Cuckoo_striped_list_basehook_sort_cmp(); - void Cuckoo_striped_vector_basehook_sort_cmp(); - void Cuckoo_striped_list_basehook_sort_less(); - void Cuckoo_striped_vector_basehook_sort_less(); - void Cuckoo_striped_list_basehook_sort_cmpmix(); - void Cuckoo_striped_vector_basehook_sort_cmpmix(); - void Cuckoo_striped_vector_basehook_sort_cmpmix_stat(); - - void Cuckoo_striped_list_basehook_equal_storehash(); - void Cuckoo_striped_vector_basehook_equal_storehash(); - void Cuckoo_striped_list_basehook_sort_cmp_storehash(); - void Cuckoo_striped_vector_basehook_sort_cmp_storehash(); - void Cuckoo_striped_list_basehook_sort_less_storehash(); - void Cuckoo_striped_vector_basehook_sort_less_storehash(); - void Cuckoo_striped_list_basehook_sort_cmpmix_storehash(); - void Cuckoo_striped_vector_basehook_sort_cmpmix_storehash(); - - void Cuckoo_striped_list_memberhook_equal(); - void Cuckoo_striped_vector_memberhook_equal(); - void Cuckoo_striped_list_memberhook_sort_cmp(); - void Cuckoo_striped_vector_memberhook_sort_cmp(); - void Cuckoo_striped_list_memberhook_sort_less(); - void Cuckoo_striped_vector_memberhook_sort_less(); - void Cuckoo_striped_list_memberhook_sort_cmpmix(); - void Cuckoo_striped_vector_memberhook_sort_cmpmix(); - - void Cuckoo_striped_list_memberhook_equal_storehash(); - void Cuckoo_striped_vector_memberhook_equal_storehash(); - void Cuckoo_striped_list_memberhook_sort_cmp_storehash(); - void Cuckoo_striped_vector_memberhook_sort_cmp_storehash(); - void Cuckoo_striped_list_memberhook_sort_less_storehash(); - void Cuckoo_striped_vector_memberhook_sort_less_storehash(); - void Cuckoo_striped_list_memberhook_sort_cmpmix_storehash(); - void Cuckoo_striped_vector_memberhook_sort_cmpmix_storehash(); - - // *********************************************************** - // Cuckoo hashing (refinable) - - void Cuckoo_refinable_list_basehook_equal(); - void Cuckoo_refinable_vector_basehook_equal(); - void Cuckoo_refinable_list_basehook_sort_cmp(); - void Cuckoo_refinable_vector_basehook_sort_cmp(); - void Cuckoo_refinable_list_basehook_sort_less(); - void Cuckoo_refinable_vector_basehook_sort_less(); - void Cuckoo_refinable_list_basehook_sort_cmpmix(); - void Cuckoo_refinable_vector_basehook_sort_cmpmix(); - void Cuckoo_refinable_vector_basehook_sort_cmpmix_stat(); - - void Cuckoo_refinable_list_basehook_equal_storehash(); - void Cuckoo_refinable_vector_basehook_equal_storehash(); - void Cuckoo_refinable_list_basehook_sort_cmp_storehash(); - void Cuckoo_refinable_vector_basehook_sort_cmp_storehash(); - void Cuckoo_refinable_list_basehook_sort_less_storehash(); - void Cuckoo_refinable_vector_basehook_sort_less_storehash(); - void Cuckoo_refinable_list_basehook_sort_cmpmix_storehash(); - void Cuckoo_refinable_vector_basehook_sort_cmpmix_storehash(); - - void Cuckoo_refinable_list_memberhook_equal(); - void Cuckoo_refinable_vector_memberhook_equal(); - void Cuckoo_refinable_list_memberhook_sort_cmp(); - void Cuckoo_refinable_vector_memberhook_sort_cmp(); - void Cuckoo_refinable_list_memberhook_sort_less(); - void Cuckoo_refinable_vector_memberhook_sort_less(); - void Cuckoo_refinable_list_memberhook_sort_cmpmix(); - void Cuckoo_refinable_vector_memberhook_sort_cmpmix(); - - void Cuckoo_refinable_list_memberhook_equal_storehash(); - void Cuckoo_refinable_vector_memberhook_equal_storehash(); - void Cuckoo_refinable_list_memberhook_sort_cmp_storehash(); - void Cuckoo_refinable_vector_memberhook_sort_cmp_storehash(); - void Cuckoo_refinable_list_memberhook_sort_less_storehash(); - void Cuckoo_refinable_vector_memberhook_sort_less_storehash(); - void Cuckoo_refinable_list_memberhook_sort_cmpmix_storehash(); - void Cuckoo_refinable_vector_memberhook_sort_cmpmix_storehash(); - - CPPUNIT_TEST_SUITE(IntrusiveCuckooSetHdrTest) - // *********************************************************** - // Cuckoo hashing (striped) - - CPPUNIT_TEST( Cuckoo_striped_list_basehook_equal) - CPPUNIT_TEST( Cuckoo_striped_vector_basehook_equal) - CPPUNIT_TEST( Cuckoo_striped_list_basehook_sort_cmp) - CPPUNIT_TEST( Cuckoo_striped_vector_basehook_sort_cmp) - CPPUNIT_TEST( Cuckoo_striped_list_basehook_sort_less) - CPPUNIT_TEST( Cuckoo_striped_vector_basehook_sort_less) - CPPUNIT_TEST( Cuckoo_striped_list_basehook_sort_cmpmix) - CPPUNIT_TEST( Cuckoo_striped_vector_basehook_sort_cmpmix) - CPPUNIT_TEST( Cuckoo_striped_vector_basehook_sort_cmpmix_stat) - - CPPUNIT_TEST( Cuckoo_striped_list_basehook_equal_storehash) - CPPUNIT_TEST( Cuckoo_striped_vector_basehook_equal_storehash) - CPPUNIT_TEST( Cuckoo_striped_list_basehook_sort_cmp_storehash) - CPPUNIT_TEST( Cuckoo_striped_vector_basehook_sort_cmp_storehash) - CPPUNIT_TEST( Cuckoo_striped_list_basehook_sort_less_storehash) - CPPUNIT_TEST( Cuckoo_striped_vector_basehook_sort_less_storehash) - CPPUNIT_TEST( Cuckoo_striped_list_basehook_sort_cmpmix_storehash) - CPPUNIT_TEST( Cuckoo_striped_vector_basehook_sort_cmpmix_storehash) - - CPPUNIT_TEST( Cuckoo_striped_list_memberhook_equal) - CPPUNIT_TEST( Cuckoo_striped_vector_memberhook_equal) - CPPUNIT_TEST( Cuckoo_striped_list_memberhook_sort_cmp) - CPPUNIT_TEST( Cuckoo_striped_vector_memberhook_sort_cmp) - CPPUNIT_TEST( Cuckoo_striped_list_memberhook_sort_less) - CPPUNIT_TEST( Cuckoo_striped_vector_memberhook_sort_less) - CPPUNIT_TEST( Cuckoo_striped_list_memberhook_sort_cmpmix) - CPPUNIT_TEST( Cuckoo_striped_vector_memberhook_sort_cmpmix) - - CPPUNIT_TEST( Cuckoo_striped_list_memberhook_equal_storehash) - CPPUNIT_TEST( Cuckoo_striped_vector_memberhook_equal_storehash) - CPPUNIT_TEST( Cuckoo_striped_list_memberhook_sort_cmp_storehash) - CPPUNIT_TEST( Cuckoo_striped_vector_memberhook_sort_cmp_storehash) - CPPUNIT_TEST( Cuckoo_striped_list_memberhook_sort_less_storehash) - CPPUNIT_TEST( Cuckoo_striped_vector_memberhook_sort_less_storehash) - CPPUNIT_TEST( Cuckoo_striped_list_memberhook_sort_cmpmix_storehash) - CPPUNIT_TEST( Cuckoo_striped_vector_memberhook_sort_cmpmix_storehash) - - // *********************************************************** - // Cuckoo hashing (refinable) - - CPPUNIT_TEST( Cuckoo_refinable_list_basehook_equal) - CPPUNIT_TEST( Cuckoo_refinable_vector_basehook_equal) - CPPUNIT_TEST( Cuckoo_refinable_list_basehook_sort_cmp) - CPPUNIT_TEST( Cuckoo_refinable_vector_basehook_sort_cmp) - CPPUNIT_TEST( Cuckoo_refinable_list_basehook_sort_less) - CPPUNIT_TEST( Cuckoo_refinable_vector_basehook_sort_less) - CPPUNIT_TEST( Cuckoo_refinable_list_basehook_sort_cmpmix) - CPPUNIT_TEST( Cuckoo_refinable_vector_basehook_sort_cmpmix) - CPPUNIT_TEST( Cuckoo_refinable_vector_basehook_sort_cmpmix_stat) - - CPPUNIT_TEST( Cuckoo_refinable_list_basehook_equal_storehash) - CPPUNIT_TEST( Cuckoo_refinable_vector_basehook_equal_storehash) - CPPUNIT_TEST( Cuckoo_refinable_list_basehook_sort_cmp_storehash) - CPPUNIT_TEST( Cuckoo_refinable_vector_basehook_sort_cmp_storehash) - CPPUNIT_TEST( Cuckoo_refinable_list_basehook_sort_less_storehash) - CPPUNIT_TEST( Cuckoo_refinable_vector_basehook_sort_less_storehash) - CPPUNIT_TEST( Cuckoo_refinable_list_basehook_sort_cmpmix_storehash) - CPPUNIT_TEST( Cuckoo_refinable_vector_basehook_sort_cmpmix_storehash) - - CPPUNIT_TEST( Cuckoo_refinable_list_memberhook_equal) - CPPUNIT_TEST( Cuckoo_refinable_vector_memberhook_equal) - CPPUNIT_TEST( Cuckoo_refinable_list_memberhook_sort_cmp) - CPPUNIT_TEST( Cuckoo_refinable_vector_memberhook_sort_cmp) - CPPUNIT_TEST( Cuckoo_refinable_list_memberhook_sort_less) - CPPUNIT_TEST( Cuckoo_refinable_vector_memberhook_sort_less) - CPPUNIT_TEST( Cuckoo_refinable_list_memberhook_sort_cmpmix) - CPPUNIT_TEST( Cuckoo_refinable_vector_memberhook_sort_cmpmix) - - CPPUNIT_TEST( Cuckoo_refinable_list_memberhook_equal_storehash) - CPPUNIT_TEST( Cuckoo_refinable_vector_memberhook_equal_storehash) - CPPUNIT_TEST( Cuckoo_refinable_list_memberhook_sort_cmp_storehash) - CPPUNIT_TEST( Cuckoo_refinable_vector_memberhook_sort_cmp_storehash) - CPPUNIT_TEST( Cuckoo_refinable_list_memberhook_sort_less_storehash) - CPPUNIT_TEST( Cuckoo_refinable_vector_memberhook_sort_less_storehash) - CPPUNIT_TEST( Cuckoo_refinable_list_memberhook_sort_cmpmix_storehash) - CPPUNIT_TEST( Cuckoo_refinable_vector_memberhook_sort_cmpmix_storehash) - - CPPUNIT_TEST_SUITE_END() - }; -} // namespace set - -#endif // #ifndef CDSTEST_HDR_INTRUSIVE_CUCKOO_SET_H diff --git a/tests/test-hdr/set/hdr_intrusive_feldman_hashset.h b/tests/test-hdr/set/hdr_intrusive_feldman_hashset.h deleted file mode 100644 index 812bb6bc..00000000 --- a/tests/test-hdr/set/hdr_intrusive_feldman_hashset.h +++ /dev/null @@ -1,817 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_INTRUSIVE_FELDMAN_HASHSET_H -#define CDSTEST_HDR_INTRUSIVE_FELDMAN_HASHSET_H - -#include "cppunit/cppunit_proxy.h" - -// forward declaration -namespace cds { - namespace intrusive {} - namespace opt {} -} - -namespace set { - namespace ci = cds::intrusive; - namespace co = cds::opt; - - class IntrusiveFeldmanHashSetHdrTest: public CppUnitMini::TestCase - { - template - struct Item - { - unsigned int nDisposeCount ; // count of disposer calling - Hash hash; - unsigned int nInsertCall; - unsigned int nFindCall; - unsigned int nEraseCall; - mutable unsigned int nIteratorCall; - - Item() - : nDisposeCount(0) - , nInsertCall(0) - , nFindCall(0) - , nEraseCall(0) - , nIteratorCall(0) - {} - }; - - template - struct get_hash - { - Hash const& operator()( Item const& i ) const - { - return i.hash; - } - }; - - template - struct get_key - { - Key const& operator()(Item const& i) const - { - return i.hash; - } - }; - - struct item_disposer { - template - void operator()( Item * p ) - { - ++p->nDisposeCount; - } - }; - - template - struct nohash { - Key operator()(Key k) const - { - return k; - } - }; - - struct hash128 - { - size_t lo; - size_t hi; - - hash128() {} - hash128(size_t l, size_t h) : lo(l), hi(h) {} - - struct make { - hash128 operator()( size_t n ) const - { - return hash128( std::hash()( n ), std::hash()( ~n )); - } - hash128 operator()( hash128 const& n ) const - { - return hash128( std::hash()( n.lo ), std::hash()( ~n.hi )); - } - }; - - struct less { - bool operator()( hash128 const& lhs, hash128 const& rhs ) const - { - if ( lhs.hi != rhs.hi ) - return lhs.hi < rhs.hi; - return lhs.lo < rhs.lo; - } - }; - - struct cmp { - int operator()( hash128 const& lhs, hash128 const& rhs ) const - { - if ( lhs.hi != rhs.hi ) - return lhs.hi < rhs.hi ? -1 : 1; - return lhs.lo < rhs.lo ? -1 : lhs.lo == rhs.lo ? 0 : 1; - } - }; - }; - - - template - void test_hp( size_t nHeadBits, size_t nArrayBits ) - { - typedef typename Set::hash_type hash_type; - typedef typename Set::value_type value_type; - - Hash hasher; - - size_t const arrCapacity = 1000; - std::vector< value_type > arrValue; - arrValue.reserve( arrCapacity ); - for ( size_t i = 0; i < arrCapacity; ++i ) { - arrValue.emplace_back( value_type() ); - arrValue.back().hash = hasher( i ); - } - CPPUNIT_ASSERT( arrValue.size() == arrCapacity ); - - Set s( nHeadBits, nArrayBits ); - CPPUNIT_MSG("Array size: head=" << s.head_size() << ", array_node=" << s.array_node_size()); - CPPUNIT_ASSERT(s.head_size() >= (size_t(1) << nHeadBits)); - CPPUNIT_ASSERT(s.array_node_size() == (size_t(1) << nArrayBits)); - - // insert() test - CPPUNIT_ASSERT(s.size() == 0 ); - CPPUNIT_ASSERT(s.empty() ); - for ( auto& el : arrValue ) { - CPPUNIT_ASSERT( s.insert( el )); - CPPUNIT_ASSERT(s.contains( el.hash )); - } - CPPUNIT_ASSERT(s.size() == arrCapacity ); - for ( auto& el : arrValue ) { - CPPUNIT_ASSERT(s.contains( el.hash )); - CPPUNIT_ASSERT( !s.insert( el ) ); - } - CPPUNIT_ASSERT(s.size() == arrCapacity ); - CPPUNIT_ASSERT( !s.empty() ); - - // Iterator test - { - typedef typename Set::iterator iterator; - for ( iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) - ++(it->nIteratorCall); - for ( auto& el : arrValue ) { - CPPUNIT_ASSERT( el.nIteratorCall == 1 ); - el.nIteratorCall = 0; - } - } - - { - // Const iterator test - for ( typename Set::const_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) - (*it).nIteratorCall += 1; - for ( auto& el : arrValue ) { - CPPUNIT_ASSERT( el.nIteratorCall == 1 ); - el.nIteratorCall = 0; - } - } - - { - // Reverse iterator test - for ( typename Set::reverse_iterator it = s.rbegin(), itEnd = s.rend(); it != itEnd; ++it ) - it->nIteratorCall += 1; - for ( auto& el : arrValue ) { - CPPUNIT_ASSERT( el.nIteratorCall == 1 ); - el.nIteratorCall = 0; - } - } - - { - // Reverse const iterator test - for ( typename Set::const_reverse_iterator it = s.crbegin(), itEnd = s.crend(); it != itEnd; ++it ) { - (*it).nIteratorCall += 1; - it.release(); - } - for ( auto& el : arrValue ) { - CPPUNIT_ASSERT( el.nIteratorCall == 1 ); - el.nIteratorCall = 0; - } - } - - // update() exists test - for ( auto& el : arrValue ) { - bool bOp, bInsert; - std::tie(bOp, bInsert) = s.update( el, false ); - CPPUNIT_ASSERT( bOp ); - CPPUNIT_ASSERT( !bInsert ); - CPPUNIT_ASSERT( el.nFindCall == 0 ); - CPPUNIT_ASSERT(s.find(el.hash, [](value_type& v) { v.nFindCall++; } )); - CPPUNIT_ASSERT( el.nFindCall == 1 ); - } - - // unlink test - CPPUNIT_ASSERT(s.size() == arrCapacity ); - for ( auto const& el : arrValue ) { - CPPUNIT_ASSERT(s.unlink( el )); - CPPUNIT_ASSERT(!s.contains( el.hash )); - } - CPPUNIT_ASSERT(s.size() == 0 ); - Set::gc::force_dispose(); - for ( auto const& el : arrValue ) { - CPPUNIT_ASSERT( el.nDisposeCount == 1 ); - } - - // new hash values - for ( auto& el : arrValue ) - el.hash = hasher( el.hash ); - - // insert( func ) - CPPUNIT_ASSERT(s.size() == 0 ); - for ( auto& el : arrValue ) { - CPPUNIT_ASSERT( s.insert( el, []( value_type& v ) { ++v.nInsertCall; } )); - CPPUNIT_ASSERT(s.contains( el.hash )); - CPPUNIT_ASSERT( el.nInsertCall == 1 ); - } - CPPUNIT_ASSERT(s.size() == arrCapacity ); - for ( auto& el : arrValue ) { - CPPUNIT_ASSERT(s.contains( el.hash )); - CPPUNIT_ASSERT( !s.insert( el ) ); - } - CPPUNIT_ASSERT(s.size() == arrCapacity ); - CPPUNIT_ASSERT( !s.empty() ); - - for ( auto& el : arrValue ) - el.nDisposeCount = 0; - - s.clear(); - CPPUNIT_ASSERT(s.size() == 0 ); - Set::gc::force_dispose(); - for ( auto const& el : arrValue ) { - CPPUNIT_ASSERT( el.nDisposeCount == 1 ); - } - - // new hash values - for ( auto& el : arrValue ) - el.hash = hasher( el.hash ); - - // update test - for ( auto& el : arrValue ) { - bool bOp, bInsert; - std::tie(bOp, bInsert) = s.update( el, false ); - CPPUNIT_ASSERT( !bOp ); - CPPUNIT_ASSERT( !bInsert ); - CPPUNIT_ASSERT( !s.contains( el.hash )); - - std::tie(bOp, bInsert) = s.update( el, true ); - CPPUNIT_ASSERT( bOp ); - CPPUNIT_ASSERT( bInsert ); - CPPUNIT_ASSERT( s.contains( el.hash )); - } - CPPUNIT_ASSERT(s.size() == arrCapacity ); - - // erase test - for ( auto& el : arrValue ) { - el.nDisposeCount = 0; - CPPUNIT_ASSERT( s.contains( el.hash )); - CPPUNIT_ASSERT(s.erase( el.hash )); - CPPUNIT_ASSERT( !s.contains( el.hash )); - CPPUNIT_ASSERT( !s.erase( el.hash )); - } - CPPUNIT_ASSERT(s.size() == 0 ); - Set::gc::force_dispose(); - for ( auto& el : arrValue ) { - CPPUNIT_ASSERT( el.nDisposeCount == 1 ); - CPPUNIT_ASSERT(s.insert( el )); - } - - // erase with functor, get() test - for ( auto& el : arrValue ) { - el.nDisposeCount = 0; - CPPUNIT_ASSERT( s.contains( el.hash ) ); - { - typename Set::guarded_ptr gp{ s.get( el.hash ) }; - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( gp->nEraseCall == 0); - CPPUNIT_ASSERT(s.erase( gp->hash, []( value_type& i ) { ++i.nEraseCall; } )); - CPPUNIT_ASSERT( gp->nEraseCall == 1); - Set::gc::force_dispose(); - CPPUNIT_ASSERT( gp->nDisposeCount == 0 ); - } - CPPUNIT_ASSERT( !s.contains( el.hash )); - CPPUNIT_ASSERT( !s.erase( el.hash )); - CPPUNIT_ASSERT( el.nEraseCall == 1 ); - Set::gc::force_dispose(); - CPPUNIT_ASSERT( el.nDisposeCount == 1 ); - } - CPPUNIT_ASSERT(s.size() == 0 ); - - // new hash values - for ( auto& el : arrValue ) { - el.hash = hasher( el.hash ); - el.nDisposeCount = 0; - bool bOp, bInsert; - std::tie(bOp, bInsert) = s.update( el ); - CPPUNIT_ASSERT( bOp ); - CPPUNIT_ASSERT( bInsert ); - } - CPPUNIT_ASSERT(s.size() == arrCapacity ); - - // extract test - for ( auto& el : arrValue ) { - CPPUNIT_ASSERT( s.contains( el.hash ) ); - typename Set::guarded_ptr gp = s.extract( el.hash ); - CPPUNIT_ASSERT( gp ); - Set::gc::force_dispose(); - CPPUNIT_ASSERT( el.nDisposeCount == 0 ); - CPPUNIT_ASSERT( gp->nDisposeCount == 0 ); - gp = s.get( el.hash ); - CPPUNIT_ASSERT( !gp ); - Set::gc::force_dispose(); - CPPUNIT_ASSERT( el.nDisposeCount == 1 ); - CPPUNIT_ASSERT( !s.contains( el.hash ) ); - } - CPPUNIT_ASSERT(s.size() == 0 ); - CPPUNIT_ASSERT(s.empty() ); - - // erase with iterator - for ( auto& el : arrValue ) { - el.nDisposeCount = 0; - el.nIteratorCall = 0; - CPPUNIT_ASSERT(s.insert( el )); - } - for ( auto it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - s.erase_at( it ); - it->nIteratorCall = 1; - } - CPPUNIT_ASSERT(s.size() == 0 ); - Set::gc::force_dispose(); - for ( auto& el : arrValue ) { - CPPUNIT_ASSERT( el.nDisposeCount == 1 ); - CPPUNIT_ASSERT( el.nIteratorCall == 1 ); - } - CPPUNIT_ASSERT(s.empty() ); - - // erase with reverse_iterator - for ( auto& el : arrValue ) { - el.nDisposeCount = 0; - el.nIteratorCall = 0; - CPPUNIT_ASSERT(s.insert( el )); - } - for ( auto it = s.rbegin(), itEnd = s.rend(); it != itEnd; ++it ) { - s.erase_at( it ); - it->nIteratorCall = 1; - } - CPPUNIT_ASSERT(s.size() == 0 ); - Set::gc::force_dispose(); - for ( auto& el : arrValue ) { - CPPUNIT_ASSERT( el.nDisposeCount == 1 ); - CPPUNIT_ASSERT( el.nIteratorCall == 1 ); - } - CPPUNIT_ASSERT(s.empty() ); - - CPPUNIT_MSG( s.statistics() ); - } - - template - void test_rcu(size_t nHeadBits, size_t nArrayBits) - { - typedef typename Set::hash_type hash_type; - typedef typename Set::value_type value_type; - typedef typename Set::rcu_lock rcu_lock; - - Hash hasher; - - size_t const arrCapacity = 1000; - std::vector< value_type > arrValue; - arrValue.reserve(arrCapacity); - for (size_t i = 0; i < arrCapacity; ++i) { - arrValue.emplace_back(value_type()); - arrValue.back().hash = hasher(i); - } - CPPUNIT_ASSERT(arrValue.size() == arrCapacity); - - Set s(nHeadBits, nArrayBits); - CPPUNIT_MSG("Array size: head=" << s.head_size() << ", array_node=" << s.array_node_size()); - CPPUNIT_ASSERT(s.head_size() >= (size_t(1) << nHeadBits)); - CPPUNIT_ASSERT(s.array_node_size() == (size_t(1) << nArrayBits)); - - // insert() test - CPPUNIT_ASSERT(s.size() == 0); - CPPUNIT_ASSERT(s.empty()); - for (auto& el : arrValue) { - CPPUNIT_ASSERT(s.insert(el)); - CPPUNIT_ASSERT(s.contains(el.hash)); - } - CPPUNIT_ASSERT(s.size() == arrCapacity); - for (auto& el : arrValue) { - CPPUNIT_ASSERT(s.contains(el.hash)); - CPPUNIT_ASSERT(!s.insert(el)); - } - CPPUNIT_ASSERT(s.size() == arrCapacity); - CPPUNIT_ASSERT(!s.empty()); - - // Iterator test - { - rcu_lock l; - - typedef typename Set::iterator iterator; - for (iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it) - ++(it->nIteratorCall); - for (auto& el : arrValue) { - CPPUNIT_ASSERT(el.nIteratorCall == 1); - el.nIteratorCall = 0; - } - } - - { - // Const iterator test - rcu_lock l; - - for (typename Set::const_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it) - (*it).nIteratorCall += 1; - for (auto& el : arrValue) { - CPPUNIT_ASSERT(el.nIteratorCall == 1); - el.nIteratorCall = 0; - } - } - - { - // Reverse iterator test - rcu_lock l; - - for (typename Set::reverse_iterator it = s.rbegin(), itEnd = s.rend(); it != itEnd; ++it) - it->nIteratorCall += 1; - for (auto& el : arrValue) { - CPPUNIT_ASSERT(el.nIteratorCall == 1); - el.nIteratorCall = 0; - } - } - - { - // Reverse const iterator test - rcu_lock l; - - for (typename Set::const_reverse_iterator it = s.crbegin(), itEnd = s.crend(); it != itEnd; ++it) { - (*it).nIteratorCall += 1; - } - for (auto& el : arrValue) { - CPPUNIT_ASSERT(el.nIteratorCall == 1); - el.nIteratorCall = 0; - } - } - - // update() exists test - for (auto& el : arrValue) { - bool bOp, bInsert; - std::tie(bOp, bInsert) = s.update(el, false); - CPPUNIT_ASSERT(bOp); - CPPUNIT_ASSERT(!bInsert); - CPPUNIT_ASSERT(el.nFindCall == 0); - CPPUNIT_ASSERT(s.find(el.hash, [](value_type& v) { v.nFindCall++; })); - CPPUNIT_ASSERT(el.nFindCall == 1); - } - - // unlink test - CPPUNIT_ASSERT(s.size() == arrCapacity); - for (auto const& el : arrValue) { - CPPUNIT_ASSERT(s.unlink(el)); - CPPUNIT_ASSERT(!s.contains(el.hash)); - } - CPPUNIT_ASSERT(s.size() == 0); - Set::gc::force_dispose(); - for (auto const& el : arrValue) { - CPPUNIT_ASSERT(el.nDisposeCount == 1); - } - - // new hash values - for (auto& el : arrValue) - el.hash = hasher(el.hash); - - // insert( func ) - CPPUNIT_ASSERT(s.size() == 0); - for (auto& el : arrValue) { - CPPUNIT_ASSERT(s.insert(el, [](value_type& v) { ++v.nInsertCall; })); - CPPUNIT_ASSERT(s.contains(el.hash)); - CPPUNIT_ASSERT(el.nInsertCall == 1); - } - CPPUNIT_ASSERT(s.size() == arrCapacity); - for (auto& el : arrValue) { - CPPUNIT_ASSERT(s.contains(el.hash)); - CPPUNIT_ASSERT(!s.insert(el)); - } - CPPUNIT_ASSERT(s.size() == arrCapacity); - CPPUNIT_ASSERT(!s.empty()); - - for (auto& el : arrValue) - el.nDisposeCount = 0; - - s.clear(); - CPPUNIT_ASSERT(s.size() == 0); - Set::gc::force_dispose(); - for (auto const& el : arrValue) { - CPPUNIT_ASSERT(el.nDisposeCount == 1); - } - - // new hash values - for (auto& el : arrValue) - el.hash = hasher(el.hash); - - // update test - for (auto& el : arrValue) { - bool bOp, bInsert; - std::tie(bOp, bInsert) = s.update(el, false); - CPPUNIT_ASSERT(!bOp); - CPPUNIT_ASSERT(!bInsert); - CPPUNIT_ASSERT(!s.contains(el.hash)); - - std::tie(bOp, bInsert) = s.update(el, true); - CPPUNIT_ASSERT(bOp); - CPPUNIT_ASSERT(bInsert); - CPPUNIT_ASSERT(s.contains(el.hash)); - } - CPPUNIT_ASSERT(s.size() == arrCapacity); - - // erase test - for (auto& el : arrValue) { - el.nDisposeCount = 0; - CPPUNIT_ASSERT(s.contains(el.hash)); - CPPUNIT_ASSERT(s.erase(el.hash)); - CPPUNIT_ASSERT(!s.contains(el.hash)); - CPPUNIT_ASSERT(!s.erase(el.hash)); - } - CPPUNIT_ASSERT(s.size() == 0); - Set::gc::force_dispose(); - for (auto& el : arrValue) { - CPPUNIT_ASSERT(el.nDisposeCount == 1); - CPPUNIT_ASSERT(s.insert(el)); - } - - // erase with functor, get() test - for (auto& el : arrValue) { - el.nDisposeCount = 0; - CPPUNIT_ASSERT(s.contains(el.hash)); - value_type * p; - { - rcu_lock l; - p = s.get(el.hash); - CPPUNIT_ASSERT(p); - CPPUNIT_ASSERT(p->nEraseCall == 0); - } - // This is single-threaded test with faked disposer - // so we can dereference p outside RCU lock section - CPPUNIT_ASSERT(s.erase(p->hash, [](value_type& i) { ++i.nEraseCall; })); - CPPUNIT_ASSERT(p->nEraseCall == 1); - Set::gc::force_dispose(); - CPPUNIT_ASSERT(p->nDisposeCount == 1); - - CPPUNIT_ASSERT(!s.contains(el.hash)); - CPPUNIT_ASSERT(!s.erase(el.hash)); - CPPUNIT_ASSERT(el.nEraseCall == 1); - Set::gc::force_dispose(); - CPPUNIT_ASSERT(el.nDisposeCount == 1); - } - CPPUNIT_ASSERT(s.size() == 0); - - // new hash values - for (auto& el : arrValue) { - el.hash = hasher(el.hash); - el.nDisposeCount = 0; - bool bOp, bInsert; - std::tie(bOp, bInsert) = s.update(el); - CPPUNIT_ASSERT(bOp); - CPPUNIT_ASSERT(bInsert); - } - CPPUNIT_ASSERT(s.size() == arrCapacity); - - // extract test - for (auto& el : arrValue) { - CPPUNIT_ASSERT(s.contains(el.hash)); - typename Set::exempt_ptr xp = s.extract(el.hash); - CPPUNIT_ASSERT(xp); - Set::gc::force_dispose(); - CPPUNIT_ASSERT(el.nDisposeCount == 0); - CPPUNIT_ASSERT(xp->nDisposeCount == 0); - xp.release(); - { - rcu_lock l; - value_type * p = s.get(el.hash); - CPPUNIT_ASSERT(!p); - } - Set::gc::force_dispose(); - CPPUNIT_ASSERT(el.nDisposeCount == 1); - CPPUNIT_ASSERT(!s.contains(el.hash)); - } - CPPUNIT_ASSERT(s.size() == 0); - CPPUNIT_ASSERT(s.empty()); - - CPPUNIT_MSG(s.statistics()); - } - - void hp_nohash(); - void hp_nohash_stat(); - void hp_nohash_5_3(); - void hp_nohash_5_3_stat(); - void hp_stdhash(); - void hp_stdhash_stat(); - void hp_stdhash_5_3(); - void hp_stdhash_5_3_stat(); - void hp_hash128(); - void hp_hash128_stat(); - void hp_hash128_4_3(); - void hp_hash128_4_3_stat(); - - void dhp_nohash(); - void dhp_nohash_stat(); - void dhp_nohash_5_3(); - void dhp_nohash_5_3_stat(); - void dhp_stdhash(); - void dhp_stdhash_stat(); - void dhp_stdhash_5_3(); - void dhp_stdhash_5_3_stat(); - void dhp_hash128(); - void dhp_hash128_stat(); - void dhp_hash128_4_3(); - void dhp_hash128_4_3_stat(); - - void rcu_gpi_nohash(); - void rcu_gpi_nohash_stat(); - void rcu_gpi_nohash_5_3(); - void rcu_gpi_nohash_5_3_stat(); - void rcu_gpi_stdhash(); - void rcu_gpi_stdhash_stat(); - void rcu_gpi_stdhash_5_3(); - void rcu_gpi_stdhash_5_3_stat(); - void rcu_gpi_hash128(); - void rcu_gpi_hash128_stat(); - void rcu_gpi_hash128_4_3(); - void rcu_gpi_hash128_4_3_stat(); - - void rcu_gpb_nohash(); - void rcu_gpb_nohash_stat(); - void rcu_gpb_nohash_5_3(); - void rcu_gpb_nohash_5_3_stat(); - void rcu_gpb_stdhash(); - void rcu_gpb_stdhash_stat(); - void rcu_gpb_stdhash_5_3(); - void rcu_gpb_stdhash_5_3_stat(); - void rcu_gpb_hash128(); - void rcu_gpb_hash128_stat(); - void rcu_gpb_hash128_4_3(); - void rcu_gpb_hash128_4_3_stat(); - - void rcu_gpt_nohash(); - void rcu_gpt_nohash_stat(); - void rcu_gpt_nohash_5_3(); - void rcu_gpt_nohash_5_3_stat(); - void rcu_gpt_stdhash(); - void rcu_gpt_stdhash_stat(); - void rcu_gpt_stdhash_5_3(); - void rcu_gpt_stdhash_5_3_stat(); - void rcu_gpt_hash128(); - void rcu_gpt_hash128_stat(); - void rcu_gpt_hash128_4_3(); - void rcu_gpt_hash128_4_3_stat(); - - void rcu_shb_nohash(); - void rcu_shb_nohash_stat(); - void rcu_shb_nohash_5_3(); - void rcu_shb_nohash_5_3_stat(); - void rcu_shb_stdhash(); - void rcu_shb_stdhash_stat(); - void rcu_shb_stdhash_5_3(); - void rcu_shb_stdhash_5_3_stat(); - void rcu_shb_hash128(); - void rcu_shb_hash128_stat(); - void rcu_shb_hash128_4_3(); - void rcu_shb_hash128_4_3_stat(); - - void rcu_sht_nohash(); - void rcu_sht_nohash_stat(); - void rcu_sht_nohash_5_3(); - void rcu_sht_nohash_5_3_stat(); - void rcu_sht_stdhash(); - void rcu_sht_stdhash_stat(); - void rcu_sht_stdhash_5_3(); - void rcu_sht_stdhash_5_3_stat(); - void rcu_sht_hash128(); - void rcu_sht_hash128_stat(); - void rcu_sht_hash128_4_3(); - void rcu_sht_hash128_4_3_stat(); - - CPPUNIT_TEST_SUITE(IntrusiveFeldmanHashSetHdrTest) - CPPUNIT_TEST(hp_nohash) - CPPUNIT_TEST(hp_nohash_stat) - CPPUNIT_TEST(hp_nohash_5_3) - CPPUNIT_TEST(hp_nohash_5_3_stat) - CPPUNIT_TEST(hp_stdhash) - CPPUNIT_TEST(hp_stdhash_stat) - CPPUNIT_TEST(hp_stdhash_5_3) - CPPUNIT_TEST(hp_stdhash_5_3_stat) - CPPUNIT_TEST(hp_hash128) - CPPUNIT_TEST(hp_hash128_stat) - CPPUNIT_TEST(hp_hash128_4_3) - CPPUNIT_TEST(hp_hash128_4_3_stat) - - CPPUNIT_TEST(dhp_nohash) - CPPUNIT_TEST(dhp_nohash_stat) - CPPUNIT_TEST(dhp_nohash_5_3) - CPPUNIT_TEST(dhp_nohash_5_3_stat) - CPPUNIT_TEST(dhp_stdhash) - CPPUNIT_TEST(dhp_stdhash_stat) - CPPUNIT_TEST(dhp_stdhash_5_3) - CPPUNIT_TEST(dhp_stdhash_5_3_stat) - CPPUNIT_TEST(dhp_hash128) - CPPUNIT_TEST(dhp_hash128_stat) - CPPUNIT_TEST(dhp_hash128_4_3) - CPPUNIT_TEST(dhp_hash128_4_3_stat) - - CPPUNIT_TEST(rcu_gpi_nohash) - CPPUNIT_TEST(rcu_gpi_nohash_stat) - CPPUNIT_TEST(rcu_gpi_nohash_5_3) - CPPUNIT_TEST(rcu_gpi_nohash_5_3_stat) - CPPUNIT_TEST(rcu_gpi_stdhash) - CPPUNIT_TEST(rcu_gpi_stdhash_stat) - CPPUNIT_TEST(rcu_gpi_stdhash_5_3) - CPPUNIT_TEST(rcu_gpi_stdhash_5_3_stat) - CPPUNIT_TEST(rcu_gpi_hash128) - CPPUNIT_TEST(rcu_gpi_hash128_stat) - CPPUNIT_TEST(rcu_gpi_hash128_4_3) - CPPUNIT_TEST(rcu_gpi_hash128_4_3_stat) - - CPPUNIT_TEST(rcu_gpb_nohash) - CPPUNIT_TEST(rcu_gpb_nohash_stat) - CPPUNIT_TEST(rcu_gpb_nohash_5_3) - CPPUNIT_TEST(rcu_gpb_nohash_5_3_stat) - CPPUNIT_TEST(rcu_gpb_stdhash) - CPPUNIT_TEST(rcu_gpb_stdhash_stat) - CPPUNIT_TEST(rcu_gpb_stdhash_5_3) - CPPUNIT_TEST(rcu_gpb_stdhash_5_3_stat) - CPPUNIT_TEST(rcu_gpb_hash128) - CPPUNIT_TEST(rcu_gpb_hash128_stat) - CPPUNIT_TEST(rcu_gpb_hash128_4_3) - CPPUNIT_TEST(rcu_gpb_hash128_4_3_stat) - - CPPUNIT_TEST(rcu_gpt_nohash) - CPPUNIT_TEST(rcu_gpt_nohash_stat) - CPPUNIT_TEST(rcu_gpt_nohash_5_3) - CPPUNIT_TEST(rcu_gpt_nohash_5_3_stat) - CPPUNIT_TEST(rcu_gpt_stdhash) - CPPUNIT_TEST(rcu_gpt_stdhash_stat) - CPPUNIT_TEST(rcu_gpt_stdhash_5_3) - CPPUNIT_TEST(rcu_gpt_stdhash_5_3_stat) - CPPUNIT_TEST(rcu_gpt_hash128) - CPPUNIT_TEST(rcu_gpt_hash128_stat) - CPPUNIT_TEST(rcu_gpt_hash128_4_3) - CPPUNIT_TEST(rcu_gpt_hash128_4_3_stat) - - CPPUNIT_TEST(rcu_shb_nohash) - CPPUNIT_TEST(rcu_shb_nohash_stat) - CPPUNIT_TEST(rcu_shb_nohash_5_3) - CPPUNIT_TEST(rcu_shb_nohash_5_3_stat) - CPPUNIT_TEST(rcu_shb_stdhash) - CPPUNIT_TEST(rcu_shb_stdhash_stat) - CPPUNIT_TEST(rcu_shb_stdhash_5_3) - CPPUNIT_TEST(rcu_shb_stdhash_5_3_stat) - CPPUNIT_TEST(rcu_shb_hash128) - CPPUNIT_TEST(rcu_shb_hash128_stat) - CPPUNIT_TEST(rcu_shb_hash128_4_3) - CPPUNIT_TEST(rcu_shb_hash128_4_3_stat) - - CPPUNIT_TEST(rcu_sht_nohash) - CPPUNIT_TEST(rcu_sht_nohash_stat) - CPPUNIT_TEST(rcu_sht_nohash_5_3) - CPPUNIT_TEST(rcu_sht_nohash_5_3_stat) - CPPUNIT_TEST(rcu_sht_stdhash) - CPPUNIT_TEST(rcu_sht_stdhash_stat) - CPPUNIT_TEST(rcu_sht_stdhash_5_3) - CPPUNIT_TEST(rcu_sht_stdhash_5_3_stat) - CPPUNIT_TEST(rcu_sht_hash128) - CPPUNIT_TEST(rcu_sht_hash128_stat) - CPPUNIT_TEST(rcu_sht_hash128_4_3) - CPPUNIT_TEST(rcu_sht_hash128_4_3_stat) - - CPPUNIT_TEST_SUITE_END() - - }; -} // namespace set - -#endif // #ifndef CDSTEST_HDR_INTRUSIVE_FELDMAN_HASHSET_H diff --git a/tests/test-hdr/set/hdr_intrusive_feldman_hashset_dhp.cpp b/tests/test-hdr/set/hdr_intrusive_feldman_hashset_dhp.cpp deleted file mode 100644 index 83ddfaed..00000000 --- a/tests/test-hdr/set/hdr_intrusive_feldman_hashset_dhp.cpp +++ /dev/null @@ -1,350 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_feldman_hashset.h" -#include -#include "unit/print_feldman_hashset_stat.h" - -namespace set { - namespace { - typedef cds::gc::DHP gc_type; - } // namespace - - void IntrusiveFeldmanHashSetHdrTest::dhp_nohash() - { - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_hp>(4, 2); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_hp>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::dhp_stdhash() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(4, 2); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_hp>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::dhp_hash128() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef hash128::less less; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" ); - test_hp(4, 2); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - , ci::opt::less< hash_type::less > - >::type - > set_type2; - test_hp(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::dhp_nohash_stat() - { - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_hp>(4, 2); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - , co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_hp>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::dhp_stdhash_stat() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(4, 2); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_hp>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::dhp_hash128_stat() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef hash128::cmp compare; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_hp(4, 2); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - ,co::compare< hash128::cmp > - >::type - > set_type2; - test_hp(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::dhp_nohash_5_3() - { - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_hp>(5, 3); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_hp>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::dhp_stdhash_5_3() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(5, 3); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_hp>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::dhp_hash128_4_3() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef co::v::sequential_consistent memory_model; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_hp(4, 3); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::memory_model< co::v::sequential_consistent > - >::type - > set_type2; - test_hp(4, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::dhp_nohash_5_3_stat() - { - typedef size_t key_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(5, 3); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_hp>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::dhp_stdhash_5_3_stat() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(5, 3); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_hp>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::dhp_hash128_4_3_stat() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - typedef hash128::less less; - typedef hash128::cmp compare; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_hp(4, 3); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - , co::stat< ci::feldman_hashset::stat<>> - , co::less< hash_type::less > - , co::compare< hash128::cmp > - >::type - > set_type2; - test_hp(4, 3); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_feldman_hashset_hp.cpp b/tests/test-hdr/set/hdr_intrusive_feldman_hashset_hp.cpp deleted file mode 100644 index 059e0376..00000000 --- a/tests/test-hdr/set/hdr_intrusive_feldman_hashset_hp.cpp +++ /dev/null @@ -1,352 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_feldman_hashset.h" -#include -#include "unit/print_feldman_hashset_stat.h" - -namespace set { - namespace { - typedef cds::gc::HP gc_type; - } // namespace - - void IntrusiveFeldmanHashSetHdrTest::hp_nohash() - { - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_hp>(4, 2); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_hp>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::hp_stdhash() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(4, 2); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_hp>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::hp_hash128() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef hash128::less less; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" ); - test_hp(4, 2); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - , ci::opt::less< hash_type::less > - >::type - > set_type2; - test_hp(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::hp_nohash_stat() - { - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_hp>(4, 2); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - , co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_hp>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::hp_stdhash_stat() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(4, 2); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_hp>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::hp_hash128_stat() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef hash128::cmp compare; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_hp(4, 2); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - ,co::compare< hash128::cmp > - >::type - > set_type2; - test_hp(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::hp_nohash_5_3() - { - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_hp>(5, 3); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_hp>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::hp_stdhash_5_3() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(5, 3); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_hp>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::hp_hash128_4_3() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef co::v::sequential_consistent memory_model; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_hp(4, 3); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::memory_model< co::v::sequential_consistent > - >::type - > set_type2; - test_hp(4, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::hp_nohash_5_3_stat() - { - typedef size_t key_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(5, 3); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_hp>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::hp_stdhash_5_3_stat() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_hp>(5, 3); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_hp>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::hp_hash128_4_3_stat() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - typedef hash128::less less; - typedef hash128::cmp compare; - }; - typedef ci::FeldmanHashSet< gc_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_hp(4, 3); - - typedef ci::FeldmanHashSet< - gc_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - , co::stat< ci::feldman_hashset::stat<>> - , co::less< hash_type::less > - , co::compare< hash128::cmp > - >::type - > set_type2; - test_hp(4, 3); - } - -} // namespace set - -CPPUNIT_TEST_SUITE_REGISTRATION(set::IntrusiveFeldmanHashSetHdrTest); diff --git a/tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_gpb.cpp b/tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_gpb.cpp deleted file mode 100644 index ea5589f4..00000000 --- a/tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_gpb.cpp +++ /dev/null @@ -1,351 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_feldman_hashset.h" -#include -#include -#include "unit/print_feldman_hashset_stat.h" - -namespace set { - namespace { - typedef cds::urcu::gc> rcu_type; - } // namespace - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_nohash() - { - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_stdhash() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_hash128() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef hash128::less less; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" ); - test_rcu(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - , ci::opt::less< hash_type::less > - >::type - > set_type2; - test_rcu(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_nohash_stat() - { - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - , co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_stdhash_stat() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_hash128_stat() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef hash128::cmp compare; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - ,co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_nohash_5_3() - { - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_stdhash_5_3() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_hash128_4_3() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef co::v::sequential_consistent memory_model; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::memory_model< co::v::sequential_consistent > - >::type - > set_type2; - test_rcu(4, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_nohash_5_3_stat() - { - typedef size_t key_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_stdhash_5_3_stat() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_hash128_4_3_stat() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - typedef hash128::less less; - typedef hash128::cmp compare; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - , co::stat< ci::feldman_hashset::stat<>> - , co::less< hash_type::less > - , co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 3); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_gpi.cpp b/tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_gpi.cpp deleted file mode 100644 index aa1b7d16..00000000 --- a/tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_gpi.cpp +++ /dev/null @@ -1,351 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_feldman_hashset.h" -#include -#include -#include "unit/print_feldman_hashset_stat.h" - -namespace set { - namespace { - typedef cds::urcu::gc> rcu_type; - } // namespace - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_nohash() - { - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_stdhash() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_hash128() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef hash128::less less; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" ); - test_rcu(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - , ci::opt::less< hash_type::less > - >::type - > set_type2; - test_rcu(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_nohash_stat() - { - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - , co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_stdhash_stat() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_hash128_stat() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef hash128::cmp compare; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - ,co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_nohash_5_3() - { - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_stdhash_5_3() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_hash128_4_3() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef co::v::sequential_consistent memory_model; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::memory_model< co::v::sequential_consistent > - >::type - > set_type2; - test_rcu(4, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_nohash_5_3_stat() - { - typedef size_t key_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_stdhash_5_3_stat() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_hash128_4_3_stat() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - typedef hash128::less less; - typedef hash128::cmp compare; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - , co::stat< ci::feldman_hashset::stat<>> - , co::less< hash_type::less > - , co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 3); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_gpt.cpp b/tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_gpt.cpp deleted file mode 100644 index 91d6bb16..00000000 --- a/tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_gpt.cpp +++ /dev/null @@ -1,351 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_feldman_hashset.h" -#include -#include -#include "unit/print_feldman_hashset_stat.h" - -namespace set { - namespace { - typedef cds::urcu::gc> rcu_type; - } // namespace - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_nohash() - { - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_stdhash() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_hash128() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef hash128::less less; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" ); - test_rcu(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - , ci::opt::less< hash_type::less > - >::type - > set_type2; - test_rcu(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_nohash_stat() - { - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - , co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_stdhash_stat() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_hash128_stat() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef hash128::cmp compare; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - ,co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 2); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_nohash_5_3() - { - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_stdhash_5_3() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_hash128_4_3() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef co::v::sequential_consistent memory_model; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::memory_model< co::v::sequential_consistent > - >::type - > set_type2; - test_rcu(4, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_nohash_5_3_stat() - { - typedef size_t key_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_stdhash_5_3_stat() - { - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_hash128_4_3_stat() - { - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - typedef hash128::less less; - typedef hash128::cmp compare; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - , co::stat< ci::feldman_hashset::stat<>> - , co::less< hash_type::less > - , co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 3); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_shb.cpp b/tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_shb.cpp deleted file mode 100644 index a57b624c..00000000 --- a/tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_shb.cpp +++ /dev/null @@ -1,377 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_feldman_hashset.h" -#include -#include -#include "unit/print_feldman_hashset_stat.h" - -namespace set { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc> rcu_type; - } // namespace -#endif - - void IntrusiveFeldmanHashSetHdrTest::rcu_shb_nohash() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(4, 2); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_shb_stdhash() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(4, 2); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_shb_hash128() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef hash128::less less; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" ); - test_rcu(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - , ci::opt::less< hash_type::less > - >::type - > set_type2; - test_rcu(4, 2); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_shb_nohash_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - , co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_shb_stdhash_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_shb_hash128_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef hash128::cmp compare; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - ,co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 2); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_shb_nohash_5_3() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(5, 3); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_shb_stdhash_5_3() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(5, 3); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_shb_hash128_4_3() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef co::v::sequential_consistent memory_model; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::memory_model< co::v::sequential_consistent > - >::type - > set_type2; - test_rcu(4, 3); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_shb_nohash_5_3_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t key_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_shb_stdhash_5_3_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_shb_hash128_4_3_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - typedef hash128::less less; - typedef hash128::cmp compare; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - , co::stat< ci::feldman_hashset::stat<>> - , co::less< hash_type::less > - , co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 3); -#endif - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_sht.cpp b/tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_sht.cpp deleted file mode 100644 index 44c05c3e..00000000 --- a/tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_sht.cpp +++ /dev/null @@ -1,377 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_feldman_hashset.h" -#include -#include -#include "unit/print_feldman_hashset_stat.h" - -namespace set { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc> rcu_type; - } // namespace -#endif - - void IntrusiveFeldmanHashSetHdrTest::rcu_sht_nohash() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(4, 2); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_sht_stdhash() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(4, 2); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_sht_hash128() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef hash128::less less; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" ); - test_rcu(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - , ci::opt::less< hash_type::less > - >::type - > set_type2; - test_rcu(4, 2); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_sht_nohash_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - , co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_sht_stdhash_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(4, 2); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_sht_hash128_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef hash128::cmp compare; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 2); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - ,co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 2); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_sht_nohash_5_3() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t key_type; - - struct traits : public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!"); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(5, 3); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_sht_stdhash_5_3() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - >::type - > set_type2; - test_rcu>(5, 3); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_sht_hash128_4_3() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef co::v::sequential_consistent memory_model; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::memory_model< co::v::sequential_consistent > - >::type - > set_type2; - test_rcu(4, 3); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_sht_nohash_5_3_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t key_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_key hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_key> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_sht_stdhash_5_3_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef size_t hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" ); - test_rcu>(5, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - ,co::stat< ci::feldman_hashset::stat<>> - >::type - > set_type2; - test_rcu>(5, 3); -#endif - } - - void IntrusiveFeldmanHashSetHdrTest::rcu_sht_hash128_4_3_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef hash128 hash_type; - - struct traits: public ci::feldman_hashset::traits - { - typedef get_hash hash_accessor; - typedef item_disposer disposer; - typedef ci::feldman_hashset::stat<> stat; - typedef hash128::less less; - typedef hash128::cmp compare; - }; - typedef ci::FeldmanHashSet< rcu_type, Item, traits > set_type; - static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" ); - test_rcu(4, 3); - - typedef ci::FeldmanHashSet< - rcu_type, - Item, - typename ci::feldman_hashset::make_traits< - ci::feldman_hashset::hash_accessor< get_hash> - , ci::opt::disposer< item_disposer > - , co::stat< ci::feldman_hashset::stat<>> - , co::less< hash_type::less > - , co::compare< hash128::cmp > - >::type - > set_type2; - test_rcu(4, 3); -#endif - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_michael_set_dhp.cpp b/tests/test-hdr/set/hdr_intrusive_michael_set_dhp.cpp deleted file mode 100644 index 244603f9..00000000 --- a/tests/test-hdr/set/hdr_intrusive_michael_set_dhp.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include - -namespace set { - - void IntrusiveHashSetHdrTest::DHP_base_cmp() - { - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::DHP_base_less() - { - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::DHP_base_cmpmix() - { - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::DHP_member_cmp() - { - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::DHP_member_less() - { - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::DHP_member_cmpmix() - { - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_int(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_michael_set_dhp_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_michael_set_dhp_lazy.cpp deleted file mode 100644 index 216fd604..00000000 --- a/tests/test-hdr/set/hdr_intrusive_michael_set_dhp_lazy.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include - -namespace set { - - void IntrusiveHashSetHdrTest::DHP_base_cmp_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::DHP_base_less_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::DHP_base_cmpmix_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::DHP_member_cmp_lazy() - { - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::DHP_member_less_lazy() - { - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::DHP_member_cmpmix_lazy() - { - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_int(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_michael_set_hp.cpp b/tests/test-hdr/set/hdr_intrusive_michael_set_hp.cpp deleted file mode 100644 index 5f18fd13..00000000 --- a/tests/test-hdr/set/hdr_intrusive_michael_set_hp.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include - -namespace set { - - void IntrusiveHashSetHdrTest::HP_base_cmp() - { - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::HP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::HP_base_less() - { - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::HP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::HP_base_cmpmix() - { - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::HP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::HP_member_cmp() - { - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::HP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::HP_member_less() - { - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::HP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::HP_member_cmpmix() - { - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::HP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_int(); - } -} // namespace set - -CPPUNIT_TEST_SUITE_REGISTRATION(set::IntrusiveHashSetHdrTest); diff --git a/tests/test-hdr/set/hdr_intrusive_michael_set_hp_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_michael_set_hp_lazy.cpp deleted file mode 100644 index 9e930e25..00000000 --- a/tests/test-hdr/set/hdr_intrusive_michael_set_hp_lazy.cpp +++ /dev/null @@ -1,178 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include - -namespace set { - - void IntrusiveHashSetHdrTest::HP_base_cmp_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - struct list_traits : - public ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::opt::back_off< cds::backoff::pause > - >::type - {}; - typedef ci::LazyList< cds::gc::HP, item, list_traits > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::HP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::HP_base_less_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::HP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::HP_base_cmpmix_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::HP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::HP_member_cmp_lazy() - { - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::HP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::HP_member_less_lazy() - { - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::HP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int(); - } - - void IntrusiveHashSetHdrTest::HP_member_cmpmix_lazy() - { - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::HP, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_int(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_michael_set_nogc.cpp b/tests/test-hdr/set/hdr_intrusive_michael_set_nogc.cpp deleted file mode 100644 index 1eecec25..00000000 --- a/tests/test-hdr/set/hdr_intrusive_michael_set_nogc.cpp +++ /dev/null @@ -1,175 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include - -namespace set { - - void IntrusiveHashSetHdrTest::nogc_base_cmp() - { - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::nogc_base_less() - { - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::nogc_base_cmpmix() - { - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::nogc_member_cmp() - { - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::nogc_member_less() - { - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::nogc_member_cmpmix() - { - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_int_nogc(); - } -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_michael_set_nogc_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_michael_set_nogc_lazy.cpp deleted file mode 100644 index 4a82695b..00000000 --- a/tests/test-hdr/set/hdr_intrusive_michael_set_nogc_lazy.cpp +++ /dev/null @@ -1,175 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include - -namespace set { - - void IntrusiveHashSetHdrTest::nogc_base_cmp_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::nogc_base_less_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::nogc_base_cmpmix_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::nogc_member_cmp_lazy() - { - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::nogc_member_less_lazy() - { - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::nogc_member_cmpmix_lazy() - { - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_int_nogc(); - } -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpb.cpp b/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpb.cpp deleted file mode 100644 index c303f806..00000000 --- a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpb.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { - - namespace { - typedef cds::urcu::gc< cds::urcu::general_buffered<> > RCU; - } - - void IntrusiveHashSetHdrTest::RCU_GPB_base_cmp() - { - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::RCU_GPB_base_less() - { - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::RCU_GPB_base_cmpmix() - { - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::RCU_GPB_member_cmp() - { - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::RCU_GPB_member_less() - { - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::RCU_GPB_member_cmpmix() - { - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int_michael_list(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpb_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpb_lazy.cpp deleted file mode 100644 index a325beb6..00000000 --- a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpb_lazy.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { - namespace { - typedef cds::urcu::gc< cds::urcu::general_buffered<> > RCU; - } - - void IntrusiveHashSetHdrTest::RCU_GPB_base_cmp_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::opt::back_off< cds::backoff::pause > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::RCU_GPB_base_less_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::RCU_GPB_base_cmpmix_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::RCU_GPB_member_cmp_lazy() - { - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::RCU_GPB_member_less_lazy() - { - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::RCU_GPB_member_cmpmix_lazy() - { - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpi.cpp b/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpi.cpp deleted file mode 100644 index 9639149d..00000000 --- a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpi.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { - - namespace { - typedef cds::urcu::gc< cds::urcu::general_instant<> > RCU; - } - - void IntrusiveHashSetHdrTest::RCU_GPI_base_cmp() - { - typedef base_int_item< ci::michael_list::node > item; - struct list_traits : - public ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - {}; - typedef ci::MichaelList< RCU, item, list_traits > bucket_type; - - struct set_traits : public ci::michael_set::traits - { - typedef hash_int hash; - }; - typedef ci::MichaelHashSet< RCU, bucket_type, set_traits > set; - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::RCU_GPI_base_less() - { - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::RCU_GPI_base_cmpmix() - { - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::RCU_GPI_member_cmp() - { - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::RCU_GPI_member_less() - { - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::RCU_GPI_member_cmpmix() - { - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int_michael_list(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpi_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpi_lazy.cpp deleted file mode 100644 index 9d0425ef..00000000 --- a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpi_lazy.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { - namespace { - typedef cds::urcu::gc< cds::urcu::general_instant<> > RCU; - } - - void IntrusiveHashSetHdrTest::RCU_GPI_base_cmp_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - struct list_traits : - public ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::opt::back_off< cds::backoff::pause > - >::type - {}; - - typedef ci::LazyList< RCU, item, list_traits > bucket_type; - - struct set_traits : public ci::michael_set::traits - { - typedef hash_int hash; - }; - typedef ci::MichaelHashSet< RCU, bucket_type, set_traits > set; - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::RCU_GPI_base_less_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::RCU_GPI_base_cmpmix_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::RCU_GPI_member_cmp_lazy() - { - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::RCU_GPI_member_less_lazy() - { - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::RCU_GPI_member_cmpmix_lazy() - { - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpt.cpp b/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpt.cpp deleted file mode 100644 index 32dfc682..00000000 --- a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpt.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { - - namespace { - typedef cds::urcu::gc< cds::urcu::general_threaded<> > RCU; - } - - void IntrusiveHashSetHdrTest::RCU_GPT_base_cmp() - { - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::RCU_GPT_base_less() - { - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::RCU_GPT_base_cmpmix() - { - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::RCU_GPT_member_cmp() - { - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::RCU_GPT_member_less() - { - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::RCU_GPT_member_cmpmix() - { - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int_michael_list(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpt_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpt_lazy.cpp deleted file mode 100644 index ce49690f..00000000 --- a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpt_lazy.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { - namespace { - typedef cds::urcu::gc< cds::urcu::general_threaded<> > RCU; - } - - void IntrusiveHashSetHdrTest::RCU_GPT_base_cmp_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::opt::back_off< cds::backoff::pause > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::RCU_GPT_base_less_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::RCU_GPT_base_cmpmix_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::RCU_GPT_member_cmp_lazy() - { - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::RCU_GPT_member_less_lazy() - { - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::RCU_GPT_member_cmpmix_lazy() - { - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_shb.cpp b/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_shb.cpp deleted file mode 100644 index b9f461d8..00000000 --- a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_shb.cpp +++ /dev/null @@ -1,196 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { - -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > RCU; - } -#endif - - void IntrusiveHashSetHdrTest::RCU_SHB_base_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHB_base_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHB_base_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHB_member_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHB_member_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHB_member_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int_michael_list(); -#endif - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_shb_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_shb_lazy.cpp deleted file mode 100644 index e564e6d8..00000000 --- a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_shb_lazy.cpp +++ /dev/null @@ -1,196 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { - -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > RCU; - } -#endif - - void IntrusiveHashSetHdrTest::RCU_SHB_base_cmp_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::opt::back_off< cds::backoff::pause > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHB_base_less_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHB_base_cmpmix_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHB_member_cmp_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHB_member_less_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHB_member_cmpmix_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int(); -#endif - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_sht.cpp b/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_sht.cpp deleted file mode 100644 index ef26d249..00000000 --- a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_sht.cpp +++ /dev/null @@ -1,196 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { - -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > RCU; - } -#endif - - void IntrusiveHashSetHdrTest::RCU_SHT_base_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHT_base_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHT_base_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHT_member_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHT_member_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHT_member_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::michael_list::node > item; - typedef ci::MichaelList< RCU - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int_michael_list(); -#endif - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_sht_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_sht_lazy.cpp deleted file mode 100644 index 2c0d76d7..00000000 --- a/tests/test-hdr/set/hdr_intrusive_michael_set_rcu_sht_lazy.cpp +++ /dev/null @@ -1,195 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > RCU; - } -#endif - - void IntrusiveHashSetHdrTest::RCU_SHT_base_cmp_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::opt::back_off< cds::backoff::pause > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHT_base_less_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHT_base_cmpmix_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHT_member_cmp_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHT_member_less_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - >::type - > set; - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::RCU_SHT_member_cmpmix_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< RCU - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::MichaelHashSet< RCU, bucket_type, - ci::michael_set::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - - test_rcu_int(); -#endif - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_refinable_hashset_avlset.cpp b/tests/test-hdr/set/hdr_intrusive_refinable_hashset_avlset.cpp deleted file mode 100644 index 87090778..00000000 --- a/tests/test-hdr/set/hdr_intrusive_refinable_hashset_avlset.cpp +++ /dev/null @@ -1,158 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_striped_set.h" -#include -#include - -namespace set { - namespace bi = boost::intrusive; - - namespace { - typedef IntrusiveStripedSetHdrTest::base_item< bi::avl_set_base_hook<> > base_item_type; - typedef IntrusiveStripedSetHdrTest::member_item< bi::avl_set_member_hook<> > member_item_type; - - template - struct get_key - { - typedef T type; - - type const& operator()( Node const& v ) const - { - return v.nKey; - } - }; - } - -#if BOOST_VERSION >= 105900 -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>> -#else -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) -#endif - - void IntrusiveStripedSetHdrTest::Refinable_avl_set_basehook() - { - typedef ci::StripedSet< - bi::avl_set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::back_off< cds::backoff::empty > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_avl_set_basehook_bucket_threshold() - { - typedef ci::StripedSet< - bi::avl_set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_avl_set_basehook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::avl_set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - - void IntrusiveStripedSetHdrTest::Refinable_avl_set_memberhook() - { - typedef ci::StripedSet< - bi::avl_set< - member_item_type - , bi::member_hook< member_item_type, bi::avl_set_member_hook<>, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_avl_set_memberhook_bucket_threshold() - { - typedef ci::StripedSet< - bi::avl_set< - member_item_type - , bi::member_hook< member_item_type, bi::avl_set_member_hook<>, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_avl_set_memberhook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::avl_set< - member_item_type - , bi::member_hook< member_item_type, bi::avl_set_member_hook<>, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_intrusive_refinable_hashset_list.cpp b/tests/test-hdr/set/hdr_intrusive_refinable_hashset_list.cpp deleted file mode 100644 index 3933eecb..00000000 --- a/tests/test-hdr/set/hdr_intrusive_refinable_hashset_list.cpp +++ /dev/null @@ -1,224 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_striped_set.h" -#include -#include - -#include // std::is_same - -namespace set { - namespace bi = boost::intrusive; - - namespace { - typedef IntrusiveStripedSetHdrTest::base_item< bi::list_base_hook<> > base_item_type; - typedef IntrusiveStripedSetHdrTest::member_item< bi::list_member_hook<> > member_item_type; - } - - void IntrusiveStripedSetHdrTest::Refinable_list_basehook_cmp() - { - typedef ci::StripedSet< - bi::list - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_list_basehook_less() - { - typedef ci::StripedSet< - bi::list - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_list_basehook_cmpmix() - { - typedef ci::StripedSet< - bi::list - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_list_basehook_bucket_threshold() - { - typedef ci::StripedSet< - bi::list - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<8> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_list_basehook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::list - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - set_type s( 128, ci::striped_set::single_bucket_size_threshold<0>(4) ); - test_with( s ); - } - - void IntrusiveStripedSetHdrTest::Refinable_list_memberhook_cmp() - { - typedef ci::StripedSet< - bi::list< - member_item_type - , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember> - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_list_memberhook_less() - { - typedef ci::StripedSet< - bi::list< - member_item_type - , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember> - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_list_memberhook_cmpmix() - { - typedef ci::StripedSet< - bi::list< - member_item_type - , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember> - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_list_memberhook_bucket_threshold() - { - typedef ci::StripedSet< - bi::list< - member_item_type - , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember> - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<8> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_list_memberhook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::list< - member_item_type - , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember> - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - set_type s( 128, ci::striped_set::single_bucket_size_threshold<0>(4) ); - test_with( s ); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_intrusive_refinable_hashset_set.cpp b/tests/test-hdr/set/hdr_intrusive_refinable_hashset_set.cpp deleted file mode 100644 index 60302c3e..00000000 --- a/tests/test-hdr/set/hdr_intrusive_refinable_hashset_set.cpp +++ /dev/null @@ -1,158 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_striped_set.h" -#include -#include - -namespace set { - namespace bi = boost::intrusive; - - namespace { - typedef IntrusiveStripedSetHdrTest::base_item< bi::set_base_hook<> > base_item_type; - typedef IntrusiveStripedSetHdrTest::member_item< bi::set_member_hook<> > member_item_type; - - template - struct get_key - { - typedef T type; - - type const& operator()( Node const& v ) const - { - return v.nKey; - } - }; - } - -#if BOOST_VERSION >= 105900 -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>> -#else -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) -#endif - - void IntrusiveStripedSetHdrTest::Refinable_set_basehook() - { - typedef ci::StripedSet< - bi::set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_set_basehook_bucket_threshold() - { - typedef ci::StripedSet< - bi::set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_set_basehook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - - void IntrusiveStripedSetHdrTest::Refinable_set_memberhook() - { - typedef ci::StripedSet< - bi::set< - member_item_type - , bi::member_hook< member_item_type, bi::set_member_hook<>, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_set_memberhook_bucket_threshold() - { - typedef ci::StripedSet< - bi::set< - member_item_type - , bi::member_hook< member_item_type, bi::set_member_hook<>, &member_item_type::hMember> - , bi::compare> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_set_memberhook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::set< - member_item_type - , bi::member_hook< member_item_type, bi::set_member_hook<>, &member_item_type::hMember> - , bi::compare> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_intrusive_refinable_hashset_sgset.cpp b/tests/test-hdr/set/hdr_intrusive_refinable_hashset_sgset.cpp deleted file mode 100644 index 292b200f..00000000 --- a/tests/test-hdr/set/hdr_intrusive_refinable_hashset_sgset.cpp +++ /dev/null @@ -1,158 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_striped_set.h" -#include -#include - -namespace set { - namespace bi = boost::intrusive; - - namespace { - typedef IntrusiveStripedSetHdrTest::base_item< bi::bs_set_base_hook<> > base_item_type; - typedef IntrusiveStripedSetHdrTest::member_item< bi::bs_set_member_hook<> > member_item_type; - - template - struct get_key - { - typedef T type; - - type const& operator()( Node const& v ) const - { - return v.nKey; - } - }; - } - -#if BOOST_VERSION >= 105900 -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>> -#else -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) -#endif - - void IntrusiveStripedSetHdrTest::Refinable_sg_set_basehook() - { - typedef ci::StripedSet< - bi::sg_set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_sg_set_basehook_bucket_threshold() - { - typedef ci::StripedSet< - bi::sg_set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_sg_set_basehook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::sg_set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - - void IntrusiveStripedSetHdrTest::Refinable_sg_set_memberhook() - { - typedef ci::StripedSet< - bi::sg_set< - member_item_type - , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_sg_set_memberhook_bucket_threshold() - { - typedef ci::StripedSet< - bi::sg_set< - member_item_type - , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_sg_set_memberhook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::sg_set< - member_item_type - , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_intrusive_refinable_hashset_slist.cpp b/tests/test-hdr/set/hdr_intrusive_refinable_hashset_slist.cpp deleted file mode 100644 index 9439fcfe..00000000 --- a/tests/test-hdr/set/hdr_intrusive_refinable_hashset_slist.cpp +++ /dev/null @@ -1,224 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_striped_set.h" -#include -#include - -#include // std::is_same - -namespace set { - namespace bi = boost::intrusive; - - namespace { - typedef IntrusiveStripedSetHdrTest::base_item< bi::slist_base_hook<> > base_item_type; - typedef IntrusiveStripedSetHdrTest::member_item< bi::slist_member_hook<> > member_item_type; - } - - void IntrusiveStripedSetHdrTest::Refinable_slist_basehook_cmp() - { - typedef ci::StripedSet< - bi::slist - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_slist_basehook_less() - { - typedef ci::StripedSet< - bi::slist - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_slist_basehook_cmpmix() - { - typedef ci::StripedSet< - bi::slist - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_slist_basehook_bucket_threshold() - { - typedef ci::StripedSet< - bi::slist - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<8> > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_slist_basehook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::slist - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - set_type s( 128, ci::striped_set::single_bucket_size_threshold<0>(4) ); - test_with( s ); - } - - void IntrusiveStripedSetHdrTest::Refinable_slist_memberhook_cmp() - { - typedef ci::StripedSet< - bi::slist< - member_item_type - , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember> - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_slist_memberhook_less() - { - typedef ci::StripedSet< - bi::slist< - member_item_type - , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember> - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_slist_memberhook_cmpmix() - { - typedef ci::StripedSet< - bi::slist< - member_item_type - , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember> - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_slist_memberhook_bucket_threshold() - { - typedef ci::StripedSet< - bi::slist< - member_item_type - , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember> - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<8> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_slist_memberhook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::slist< - member_item_type - , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember> - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - set_type s( 128, ci::striped_set::single_bucket_size_threshold<0>(4) ); - test_with( s ); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_intrusive_refinable_hashset_splayset.cpp b/tests/test-hdr/set/hdr_intrusive_refinable_hashset_splayset.cpp deleted file mode 100644 index f86eb2de..00000000 --- a/tests/test-hdr/set/hdr_intrusive_refinable_hashset_splayset.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_striped_set.h" -#include -#include -#include - -namespace set { - namespace bi = boost::intrusive; - - namespace { -# if BOOST_VERSION < 105600 - typedef bi::splay_set_member_hook<> splay_set_member_hook; - typedef bi::splay_set_base_hook<> splay_set_base_hook; -#else - typedef bi::bs_set_base_hook<> splay_set_base_hook; - typedef bi::bs_set_member_hook<> splay_set_member_hook; -#endif - typedef IntrusiveStripedSetHdrTest::base_item< splay_set_base_hook > base_item_type; - typedef IntrusiveStripedSetHdrTest::member_item< splay_set_member_hook > member_item_type; - - template - struct get_key - { - typedef T type; - - type const& operator()( Node const& v ) const - { - return v.nKey; - } - }; - } - -#if BOOST_VERSION >= 105900 -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>> -#else -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) -#endif - - void IntrusiveStripedSetHdrTest::Refinable_splay_set_basehook() - { - typedef ci::StripedSet< - bi::splay_set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::back_off< cds::backoff::empty > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_splay_set_basehook_bucket_threshold() - { - typedef ci::StripedSet< - bi::splay_set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_splay_set_basehook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::splay_set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - - void IntrusiveStripedSetHdrTest::Refinable_splay_set_memberhook() - { - typedef ci::StripedSet< - bi::splay_set< - member_item_type - , bi::member_hook< member_item_type, splay_set_member_hook, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_splay_set_memberhook_bucket_threshold() - { - typedef ci::StripedSet< - bi::splay_set< - member_item_type - , bi::member_hook< member_item_type, splay_set_member_hook, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_splay_set_memberhook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::splay_set< - member_item_type - , bi::member_hook< member_item_type, splay_set_member_hook, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_intrusive_refinable_hashset_treapset.cpp b/tests/test-hdr/set/hdr_intrusive_refinable_hashset_treapset.cpp deleted file mode 100644 index f081dc54..00000000 --- a/tests/test-hdr/set/hdr_intrusive_refinable_hashset_treapset.cpp +++ /dev/null @@ -1,176 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_striped_set.h" -#include -#include - -namespace set { - namespace bi = boost::intrusive; - - namespace { - typedef IntrusiveStripedSetHdrTest::base_item< bi::bs_set_base_hook<> > base_item_type; - typedef IntrusiveStripedSetHdrTest::member_item< bi::bs_set_member_hook<> > member_item_type; - - template - struct priority_cmp: private IntrusiveStripedSetHdrTest::less - { - typedef IntrusiveStripedSetHdrTest::less base_class; - - template - bool operator()( A const& a, B const& b ) const - { - return base_class::operator()( b, a ); - } - }; - - template - struct get_key - { - typedef T type; - - type const& operator()( Node const& v ) const - { - return v.nKey; - } - }; - } - -#if BOOST_VERSION >= 105900 -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>> -#else -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) -#endif - - void IntrusiveStripedSetHdrTest::Refinable_treap_set_basehook() - { - typedef ci::StripedSet< - bi::treap_set> - , bi::priority> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_treap_set_basehook_bucket_threshold() - { - typedef ci::StripedSet< - bi::treap_set > - , bi::priority> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_treap_set_basehook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::treap_set> - , bi::priority> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - - void IntrusiveStripedSetHdrTest::Refinable_treap_set_memberhook() - { - typedef ci::StripedSet< - bi::treap_set< - member_item_type - , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember> - , bi::compare > - , bi::priority > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_treap_set_memberhook_bucket_threshold() - { - typedef ci::StripedSet< - bi::treap_set< - member_item_type - , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember> - , bi::compare > - , bi::priority > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_treap_set_memberhook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::treap_set< - member_item_type - , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember> - , bi::compare > - , bi::priority > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_intrusive_refinable_hashset_uset.cpp b/tests/test-hdr/set/hdr_intrusive_refinable_hashset_uset.cpp deleted file mode 100644 index 5cfaf2ab..00000000 --- a/tests/test-hdr/set/hdr_intrusive_refinable_hashset_uset.cpp +++ /dev/null @@ -1,211 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_striped_set.h" -#include -#include - -namespace set { - namespace bi = boost::intrusive; - - namespace { - typedef IntrusiveStripedSetHdrTest::base_item< bi::unordered_set_base_hook<> > base_item_type; - typedef IntrusiveStripedSetHdrTest::member_item< bi::unordered_set_member_hook<> > member_item_type; - - struct hasher: private IntrusiveStripedSetHdrTest::hash_int - { - typedef IntrusiveStripedSetHdrTest::hash_int base_class; - - size_t operator()( int i ) const - { - return ~( base_class::operator()(i)); - } - template - size_t operator()( const Item& i ) const - { - return ~( base_class::operator()(i)); - } - size_t operator()( IntrusiveStripedSetHdrTest::find_key const& i) const - { - return ~( base_class::operator()(i)); - } - }; - - template - struct is_equal: private IntrusiveStripedSetHdrTest::cmp - { - typedef IntrusiveStripedSetHdrTest::cmp base_class; - - bool operator ()(const T& v1, const T& v2 ) const - { - return base_class::operator()( v1, v2 ) == 0; - } - - template - bool operator ()(const T& v1, const Q& v2 ) const - { - return base_class::operator()( v1, v2 ) == 0; - } - - template - bool operator ()(const Q& v1, const T& v2 ) const - { - return base_class::operator()( v1, v2 ) == 0; - } - }; - - template - struct dyn_buffer: public co::v::dynamic_buffer< T, Alloc > - { - typedef co::v::dynamic_buffer< T, Alloc > base_class; - public: - template - struct rebind { - typedef dyn_buffer other ; ///< Rebinding result type - }; - - dyn_buffer() - : base_class( Capacity ) - {} - }; - } - - void IntrusiveStripedSetHdrTest::Refinable_unordered_set_basehook() - { - typedef ci::StripedSet< - bi::unordered_set - , bi::equal< is_equal > - , bi::power_2_buckets - , bi::incremental - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_unordered_set_basehook_bucket_threshold() - { - typedef ci::StripedSet< - bi::unordered_set - , bi::equal< is_equal > - , bi::power_2_buckets - , bi::incremental - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::buffer< co::v::static_buffer< cds::any_type, 64 > > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_unordered_set_basehook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::unordered_set - , bi::equal< is_equal > - , bi::power_2_buckets - , bi::incremental - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::buffer< dyn_buffer< 256, cds::any_type, std::allocator > > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(512) ); - test_with( s ); - } - - void IntrusiveStripedSetHdrTest::Refinable_unordered_set_memberhook() - { - typedef ci::StripedSet< - bi::unordered_set, &member_item_type::hMember> - , bi::hash< hasher > - , bi::equal< is_equal > - , bi::power_2_buckets - , bi::incremental - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_unordered_set_memberhook_bucket_threshold() - { - typedef ci::StripedSet< - bi::unordered_set, &member_item_type::hMember> - , bi::hash< hasher > - , bi::equal< is_equal > - , bi::power_2_buckets - , bi::incremental - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::buffer< dyn_buffer< 64, cds::any_type, std::allocator > > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> > - ,co::mutex_policy< ci::striped_set::refinable<> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Refinable_unordered_set_memberhook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::unordered_set, &member_item_type::hMember> - , bi::hash< hasher > - , bi::equal< is_equal > - , bi::power_2_buckets - , bi::incremental - > - ,co::mutex_policy< ci::striped_set::refinable<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::buffer< co::v::static_buffer< cds::any_type, 128 > > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_intrusive_set.h b/tests/test-hdr/set/hdr_intrusive_set.h deleted file mode 100644 index e27a88c6..00000000 --- a/tests/test-hdr/set/hdr_intrusive_set.h +++ /dev/null @@ -1,2043 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_INTRUSIVE_SET_H -#define CDSTEST_HDR_INTRUSIVE_SET_H - -#include "cppunit/cppunit_proxy.h" -#include "size_check.h" - -#include -#include // ref - -// forward declaration -namespace cds { namespace intrusive {} } - -namespace set { - using misc::check_size; - - namespace ci = cds::intrusive; - namespace co = cds::opt; - - class IntrusiveHashSetHdrTest: public CppUnitMini::TestCase - { - protected: - struct stat - { - unsigned int nDisposeCount ; // count of disposer calling - unsigned int nFindCount ; // count of find-functor calling - unsigned int nUpdateNewCount; - unsigned int nUpdateCount; - mutable unsigned int nEraseCount; - - stat() - { - memset( this, 0, sizeof(*this)); - } - }; - - template - struct base_int_item - : public Node - , public stat - - { - int nKey; - int nVal; - - base_int_item() - {} - - base_int_item(int key, int val) - : nKey( key ) - , nVal(val) - {} - - base_int_item(const base_int_item& v ) - : Node() - , stat() - , nKey( v.nKey ) - , nVal( v.nVal ) - {} - - int key() const - { - return nKey; - } - }; - - template - struct member_int_item: public stat - { - int nKey; - int nVal; - - Node hMember; - - stat s; - - member_int_item() - {} - - member_int_item(int key, int val) - : nKey( key ) - , nVal(val) - {} - - member_int_item(const member_int_item& v ) - : stat() - , nKey( v.nKey ) - , nVal( v.nVal ) - {} - - int key() const - { - return nKey; - } - }; - - struct hash_int { - size_t operator()( int i ) const - { - return co::v::hash()( i ); - } - template - size_t operator()( const Item& i ) const - { - return (*this)( i.key() ); - } - }; - - struct simple_item_counter { - size_t m_nCount; - - simple_item_counter() - : m_nCount(0) - {} - - size_t operator ++() - { - return ++m_nCount; - } - - size_t operator --() - { - return --m_nCount; - } - - void reset() - { - m_nCount = 0; - } - - operator size_t() const - { - return m_nCount; - } - - }; - - - template - struct less - { - bool operator ()(const T& v1, const T& v2 ) const - { - return v1.key() < v2.key(); - } - - template - bool operator ()(const T& v1, const Q& v2 ) const - { - return v1.key() < v2; - } - - template - bool operator ()(const Q& v1, const T& v2 ) const - { - return v1 < v2.key(); - } - }; - - template - struct cmp { - int operator ()(const T& v1, const T& v2 ) const - { - if ( v1.key() < v2.key() ) - return -1; - return v1.key() > v2.key() ? 1 : 0; - } - - template - int operator ()(const T& v1, const Q& v2 ) const - { - if ( v1.key() < v2 ) - return -1; - return v1.key() > v2 ? 1 : 0; - } - - template - int operator ()(const Q& v1, const T& v2 ) const - { - if ( v1 < v2.key() ) - return -1; - return v1 > v2.key() ? 1 : 0; - } - }; - - struct faked_disposer - { - template - void operator ()( T * p ) - { - ++p->nDisposeCount; - } - }; - - struct find_functor - { - template - void operator()( Item& item, T& /*val*/ ) - { - ++item.nFindCount; - } - }; - - struct insert_functor - { - template - void operator()(Item& item ) - { - item.nVal = item.nKey * 100; - } - }; - - struct update_functor - { - template - void operator()( bool bNew, Item& item, Item& /*val*/ ) - { - if ( bNew ) - ++item.nUpdateNewCount; - else - ++item.nUpdateCount; - } - }; - - struct erase_functor - { - template - void operator()( Item const& item ) - { - item.nEraseCount++; - } - }; - - template - void test_int_with( Set& s ) - { - typedef typename Set::value_type value_type; - - value_type v1( 10, 50 ); - value_type v2( 5, 25 ); - value_type v3( 20, 100 ); - int key; - - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - // insert/find test - CPPUNIT_ASSERT( !s.contains( v1.key() )); - CPPUNIT_ASSERT( s.insert( v1 )); - CPPUNIT_ASSERT( s.contains( v1.key() )); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( !s.empty() ); - - CPPUNIT_ASSERT( !s.contains( v2.key(), less() )); - CPPUNIT_ASSERT( s.insert( v2 )); - CPPUNIT_ASSERT( v2.nFindCount == 0 ); - CPPUNIT_ASSERT( s.find_with( key = v2.key(), less(), find_functor() )); - CPPUNIT_ASSERT( v2.nFindCount == 1 ); - v2.nFindCount = 0; - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( !s.empty() ); - - { - insert_functor fi; - find_functor ff; - CPPUNIT_ASSERT( !s.contains( v3 )); - CPPUNIT_ASSERT( v3.nVal != v3.nKey * 100 ); - CPPUNIT_ASSERT( s.insert( v3, std::ref(fi) )); - CPPUNIT_ASSERT( v3.nVal == v3.nKey * 100 ); - CPPUNIT_ASSERT( v3.nFindCount == 0 ); - CPPUNIT_ASSERT( s.find( v3, std::ref(ff) )); - CPPUNIT_ASSERT( v3.nFindCount == 1 ); - v3.nFindCount = 0; - CPPUNIT_ASSERT( check_size( s, 3 )); - CPPUNIT_ASSERT( !s.empty() ); - } - - // unlink test - CPPUNIT_ASSERT( s.unlink( v1 )); - CPPUNIT_ASSERT( !s.contains( v1 )); - CPPUNIT_ASSERT( s.contains( v2 )); - CPPUNIT_ASSERT( s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 2 )); - - CPPUNIT_ASSERT( !s.unlink( v1 )); - CPPUNIT_ASSERT( !s.contains( v1 )); - CPPUNIT_ASSERT( check_size( s, 2 )); - - CPPUNIT_ASSERT( s.contains( v3, less() )); - CPPUNIT_ASSERT( s.unlink( v3 )); - CPPUNIT_ASSERT( !s.contains( v3, less() )); - CPPUNIT_ASSERT( check_size( s, 1 )); - - CPPUNIT_ASSERT( s.contains( v2 )); - CPPUNIT_ASSERT( s.unlink( v2 )); - CPPUNIT_ASSERT( !s.contains( v1 )); - CPPUNIT_ASSERT( !s.contains( v2 )); - CPPUNIT_ASSERT( !s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 0 )); - CPPUNIT_ASSERT( s.empty() ); - - Set::gc::force_dispose(); - // unlink function calls disposer - CPPUNIT_ASSERT( v1.nDisposeCount == 1 ); - CPPUNIT_ASSERT( v2.nDisposeCount == 1 ); - CPPUNIT_ASSERT( v3.nDisposeCount == 1 ); - - // update test - { - update_functor f; - std::pair ret = s.update(v1, f, false); - CPPUNIT_ASSERT(!ret.first); - CPPUNIT_ASSERT(!ret.second); - CPPUNIT_ASSERT(v1.nUpdateNewCount == 0); - CPPUNIT_ASSERT(v1.nUpdateCount == 0); - CPPUNIT_ASSERT(check_size(s, 0)); - - ret = s.update( v1, f ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( ret.second ); - CPPUNIT_ASSERT( v1.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v1.nUpdateCount == 0 ); - CPPUNIT_ASSERT( check_size( s, 1 )); - - ret = s.update(v1, f, false); - CPPUNIT_ASSERT(ret.first); - CPPUNIT_ASSERT(!ret.second); - CPPUNIT_ASSERT(v1.nUpdateNewCount == 1); - CPPUNIT_ASSERT(v1.nUpdateCount == 1); - CPPUNIT_ASSERT(check_size(s, 1)); - - ret = s.update( v2, f ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( ret.second ); - CPPUNIT_ASSERT( v2.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v2.nUpdateCount == 0 ); - CPPUNIT_ASSERT( check_size( s, 2 )); - - ret = s.update( v3, f ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( ret.second ); - CPPUNIT_ASSERT( v3.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v3.nUpdateCount == 0 ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - CPPUNIT_ASSERT( s.contains( v1 )); - CPPUNIT_ASSERT( s.contains( v2 )); - CPPUNIT_ASSERT( s.contains( v3 )); - - ret = s.update( v1, f ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( !ret.second ); - CPPUNIT_ASSERT( v1.nUpdateNewCount == 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( v2.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v2.nUpdateCount == 1 ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - ret = s.update( v3, f ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( !ret.second ); - CPPUNIT_ASSERT( v3.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v3.nUpdateCount == 1 ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - CPPUNIT_ASSERT( s.contains( v1 )); - CPPUNIT_ASSERT( s.contains( v2 )); - CPPUNIT_ASSERT( s.contains( v3 )); - } - - // erase test - CPPUNIT_ASSERT( s.contains( v1 )); - CPPUNIT_ASSERT( s.contains( v2, less() )); - CPPUNIT_ASSERT( s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 3 )); - CPPUNIT_ASSERT( !s.empty() ); - - CPPUNIT_ASSERT( s.erase( v1 )); - CPPUNIT_ASSERT( !s.contains( v1 )); - CPPUNIT_ASSERT( s.contains( v2 )); - CPPUNIT_ASSERT( s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( !s.empty() ); - - CPPUNIT_ASSERT( v1.nEraseCount == 0 ); - CPPUNIT_ASSERT( !s.erase( v1, erase_functor() )); - CPPUNIT_ASSERT( v1.nEraseCount == 0 ); - CPPUNIT_ASSERT( !s.contains( v1 )); - CPPUNIT_ASSERT( s.contains( v2 )); - CPPUNIT_ASSERT( s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( !s.empty() ); - - CPPUNIT_ASSERT( v2.nEraseCount == 0 ); - CPPUNIT_ASSERT( s.erase_with( v2.key(), less(), erase_functor() )); - CPPUNIT_ASSERT( v2.nEraseCount == 1 ); - CPPUNIT_ASSERT( !s.contains( v1 )); - CPPUNIT_ASSERT( !s.contains( v2 )); - CPPUNIT_ASSERT( s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( !s.empty() ); - - CPPUNIT_ASSERT( !s.erase( v2.key() )); - CPPUNIT_ASSERT( !s.contains( v1 )); - CPPUNIT_ASSERT( !s.contains( v2 )); - CPPUNIT_ASSERT( s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( !s.empty() ); - - CPPUNIT_ASSERT( s.erase( v3 )); - CPPUNIT_ASSERT( !s.contains( v1 )); - CPPUNIT_ASSERT( !s.contains( v2 )); - CPPUNIT_ASSERT( !s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 0 )); - CPPUNIT_ASSERT( s.empty() ); - - // dispose test - Set::gc::force_dispose(); - CPPUNIT_ASSERT( v1.nDisposeCount == 2 ); - CPPUNIT_ASSERT( v2.nDisposeCount == 2 ); - CPPUNIT_ASSERT( v3.nDisposeCount == 2 ); - - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( s.insert( v1 )); - CPPUNIT_ASSERT( s.insert( v3 )); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( !s.empty() ); - - { - value_type v( v1 ); - CPPUNIT_ASSERT( !s.unlink( v ) ); - } - - CPPUNIT_ASSERT( s.unlink( v3 ) ); - CPPUNIT_ASSERT( s.contains( v1 )); - CPPUNIT_ASSERT( !s.contains( v2 )); - CPPUNIT_ASSERT( !s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( !s.empty() ); - - CPPUNIT_ASSERT( !s.unlink( v3 )); - CPPUNIT_ASSERT( s.contains( v1 )); - CPPUNIT_ASSERT( !s.contains( v2 )); - CPPUNIT_ASSERT( !s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( !s.empty() ); - - CPPUNIT_ASSERT( s.unlink( v1 )); - CPPUNIT_ASSERT( !s.contains( v1 )); - CPPUNIT_ASSERT( !s.contains( v2 )); - CPPUNIT_ASSERT( !s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 0 )); - CPPUNIT_ASSERT( s.empty() ); - - CPPUNIT_ASSERT( !s.unlink( v2 )); - CPPUNIT_ASSERT( !s.contains( v1 )); - CPPUNIT_ASSERT( !s.contains( v2 )); - CPPUNIT_ASSERT( !s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 0 )); - CPPUNIT_ASSERT( s.empty() ); - - Set::gc::force_dispose(); - CPPUNIT_ASSERT( v1.nDisposeCount == 3 ); - CPPUNIT_ASSERT( v2.nDisposeCount == 2 ); - CPPUNIT_ASSERT( v3.nDisposeCount == 3 ); - - // clear test - CPPUNIT_ASSERT( s.insert( v1 )); - CPPUNIT_ASSERT( s.insert( v3 )); - CPPUNIT_ASSERT( s.insert( v2 )); - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - Set::gc::force_dispose(); - CPPUNIT_CHECK( v1.nDisposeCount == 4 ); - CPPUNIT_CHECK( v2.nDisposeCount == 3 ); - CPPUNIT_CHECK( v3.nDisposeCount == 4 ); - } - - - template - void test_int() - { - { - Set s( 64, 4 ); - test_int_with( s ); - } - - // Iterator test - test_iter(); - - // extract/get test - { - typedef typename Set::value_type value_type; - typedef typename Set::guarded_ptr guarded_ptr; - - static size_t const nLimit = 1024; - value_type arrItems[nLimit]; - int arr[nLimit]; - for ( size_t i = 0; i < nLimit; ++i ) - arr[i] = (int) i; - shuffle( arr, arr + nLimit ); - - for ( size_t i = 0; i < nLimit; ++i ) { - arrItems[i].nKey = arr[i]; - arrItems[i].nVal = arr[i] * 2; - } - - Set s( nLimit, 2 ); - for ( size_t i = 0; i < nLimit; ++i ) - CPPUNIT_ASSERT( s.insert( arrItems[i] )); - - guarded_ptr gp; - for ( size_t i = 0; i < nLimit; i += 2 ) { - int nKey = arr[i]; - gp = s.get( nKey ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == nKey ); - CPPUNIT_CHECK( gp->nVal == nKey * 2 ); - gp.release(); - - gp = s.extract( nKey ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty() ); - CPPUNIT_CHECK( gp->nKey == nKey ); - CPPUNIT_CHECK( gp->nVal == nKey * 2 ); - gp.release(); - - gp = s.get( nKey ); - CPPUNIT_CHECK( !gp ); - CPPUNIT_ASSERT( gp.empty() ); - CPPUNIT_CHECK( !s.extract( nKey )); - CPPUNIT_CHECK( gp.empty() ); - - nKey = arr[i+1]; - gp = s.get_with( nKey, less() ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_CHECK( gp->nKey == nKey ); - CPPUNIT_CHECK( gp->nVal == nKey * 2 ); - gp.release(); - - gp = s.extract_with( nKey, less() ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty() ); - CPPUNIT_CHECK( gp->nKey == nKey ); - CPPUNIT_CHECK( gp->nVal == nKey * 2 ); - gp.release(); - - gp = s.get_with( nKey, less() ); - CPPUNIT_CHECK( !gp ); - CPPUNIT_CHECK( gp.empty()); - CPPUNIT_CHECK( !s.extract_with( nKey, less() )); - CPPUNIT_CHECK( gp.empty()); - } - CPPUNIT_CHECK( s.empty() ); - CPPUNIT_CHECK( check_size( s, 0 )); - - CPPUNIT_CHECK( !s.get( 100 )); - CPPUNIT_CHECK( !s.extract( 100 )); - CPPUNIT_CHECK( gp.empty() ); - - Set::gc::force_dispose(); - } - } - - template - void test_iter() - { - typedef typename Set::value_type value_type; - typedef typename Set::iterator set_iterator; - typedef typename Set::iterator const_set_iterator; - - value_type v[500]; - { - Set s( 100, 4 ); - - for ( int i = 0; unsigned(i) < sizeof(v)/sizeof(v[0]); ++i ) { - v[i].nKey = i; - v[i].nVal = i * 2; - - CPPUNIT_ASSERT( s.insert( v[i] )); - } - - { - typename Set::iterator it( s.begin() ); - typename Set::const_iterator cit( s.cbegin() ); - CPPUNIT_CHECK( it == cit ); - CPPUNIT_CHECK( it != s.end() ); - CPPUNIT_CHECK( it != s.cend() ); - CPPUNIT_CHECK( cit != s.end() ); - CPPUNIT_CHECK( cit != s.cend() ); - ++it; - CPPUNIT_CHECK( it != cit ); - CPPUNIT_CHECK( it != s.end() ); - CPPUNIT_CHECK( it != s.cend() ); - CPPUNIT_CHECK( cit != s.end() ); - CPPUNIT_CHECK( cit != s.cend() ); - ++cit; - CPPUNIT_CHECK( it == cit ); - CPPUNIT_CHECK( it != s.end() ); - CPPUNIT_CHECK( it != s.cend() ); - CPPUNIT_CHECK( cit != s.end() ); - CPPUNIT_CHECK( cit != s.cend() ); - } - - int nCount = 0; - for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - set_iterator it2 = it; - CPPUNIT_CHECK( it == it2 ); - CPPUNIT_CHECK( it2 != itEnd ); - CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal ); - it->nVal = (*it).nKey; - ++nCount; - } - CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0])); - - nCount = 0; - for ( const_set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey == it->nVal ); - ++nCount; - } - CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0])); - - for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) { - CPPUNIT_ASSERT( v[i].nKey == v[i].nVal ); - } - } - - Set::gc::force_dispose(); - - for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) { - CPPUNIT_ASSERT( v[i].nDisposeCount == 1 ); - } - } - - template - void test_int_nogc() - { - typedef typename Set::value_type value_type; - - value_type v1( 10, 50 ); - value_type v2( 5, 25 ); - value_type v3( 20, 100 ); - int key; - - { - { - Set s( 64, 4 ); - - // insert test - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - // insert/find test - CPPUNIT_ASSERT( s.contains( v1.key() ) == nullptr ); - CPPUNIT_ASSERT( s.insert( v1 )); - CPPUNIT_ASSERT( s.contains( v1.key(), less() ) == &v1 ); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( !s.empty() ); - - CPPUNIT_ASSERT( s.contains( v2.key() ) == nullptr ); - CPPUNIT_ASSERT( s.insert( v2 )); - CPPUNIT_ASSERT( v2.nFindCount == 0 ); - CPPUNIT_ASSERT( s.find( key = v2.key(), find_functor() )); - CPPUNIT_ASSERT( v2.nFindCount == 1 ); - v2.nFindCount = 0; - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( !s.empty() ); - - { - find_functor ff; - CPPUNIT_ASSERT( s.contains( v3 ) == nullptr ); - CPPUNIT_ASSERT( s.insert( v3 )); - CPPUNIT_ASSERT( v3.nFindCount == 0 ); - CPPUNIT_ASSERT( s.find_with( v3, less(), std::ref(ff) )); - CPPUNIT_ASSERT( v3.nFindCount == 1 ); - v3.nFindCount = 0; - CPPUNIT_ASSERT( check_size( s, 3 )); - CPPUNIT_ASSERT( !s.empty() ); - } - } - - // s.clear() ; // not all set supports clear() method - CPPUNIT_ASSERT( v1.nDisposeCount == 1 ); - CPPUNIT_ASSERT( v2.nDisposeCount == 1 ); - CPPUNIT_ASSERT( v3.nDisposeCount == 1 ); - - - // update test - { - Set s( 64, 4 ); - - update_functor f; - - std::pair ret = s.update(v1, f, false); - CPPUNIT_ASSERT(!ret.first); - CPPUNIT_ASSERT(!ret.second); - CPPUNIT_ASSERT(v1.nUpdateNewCount == 0); - CPPUNIT_ASSERT(v1.nUpdateCount == 0); - CPPUNIT_ASSERT(check_size(s, 0)); - - ret = s.update( v1, f ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( ret.second ); - CPPUNIT_ASSERT( v1.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v1.nUpdateCount == 0 ); - CPPUNIT_ASSERT( check_size( s, 1 )); - - ret = s.update(v1, f, false); - CPPUNIT_ASSERT(ret.first); - CPPUNIT_ASSERT(!ret.second); - CPPUNIT_ASSERT(v1.nUpdateNewCount == 1); - CPPUNIT_ASSERT(v1.nUpdateCount == 1); - CPPUNIT_ASSERT(check_size(s, 1)); - - ret = s.update( v2, f ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( ret.second ); - CPPUNIT_ASSERT( v2.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v2.nUpdateCount == 0 ); - CPPUNIT_ASSERT( check_size( s, 2 )); - - ret = s.update( v3, f ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( ret.second ); - CPPUNIT_ASSERT( v3.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v3.nUpdateCount == 0 ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - CPPUNIT_ASSERT( s.contains( v1 ) == &v1 ); - CPPUNIT_ASSERT( s.contains( v2 ) == &v2 ); - CPPUNIT_ASSERT( s.contains( v3 ) == &v3 ); - - ret = s.update( v1, f ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( !ret.second ); - CPPUNIT_ASSERT( v1.nUpdateNewCount == 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( v2.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v2.nUpdateCount == 1 ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - ret = s.update( v3, f ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( !ret.second ); - CPPUNIT_ASSERT( v3.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v3.nUpdateCount == 1 ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - CPPUNIT_ASSERT( s.contains( v1 ) == &v1 ); - CPPUNIT_ASSERT( s.contains( v2 ) == &v2 ); - CPPUNIT_ASSERT( s.contains( v3 ) == &v3 ); - } - } - - // dispose on destruct test - CPPUNIT_ASSERT( v1.nDisposeCount == 2 ); - CPPUNIT_ASSERT( v2.nDisposeCount == 2 ); - CPPUNIT_ASSERT( v3.nDisposeCount == 2 ); - - // Iterator test - test_iter(); - } - - -#define ASSERT_RCU_FIND( _expr ) { rcu_lock rl; CPPUNIT_ASSERT( _expr ); } - template - void test_rcu_int_with( Set& s ) - { - typedef typename Set::value_type value_type; - typedef typename Set::gc::scoped_lock rcu_lock; - - value_type v1( 10, 50 ); - value_type v2( 5, 25 ); - value_type v3( 20, 100 ); - value_type v4( 40, 400 ); - int key; - - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - // insert/find test - - ASSERT_RCU_FIND( !s.contains( v1.key(), less() )); - CPPUNIT_ASSERT( s.insert( v1 )); - ASSERT_RCU_FIND( s.contains( v1.key(), less()) ); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( !s.empty() ); - - ASSERT_RCU_FIND( !s.contains( v2.key() )); - CPPUNIT_ASSERT( s.insert( v2 )); - CPPUNIT_ASSERT( v2.nFindCount == 0 ); - CPPUNIT_ASSERT( s.find( key = v2.key(), find_functor() )); - CPPUNIT_ASSERT( v2.nFindCount == 1 ); - v2.nFindCount = 0; - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( !s.empty() ); - - { - insert_functor fi; - find_functor ff; - ASSERT_RCU_FIND( !s.contains( v3 )); - CPPUNIT_ASSERT( v3.nVal != v3.nKey * 100 ); - CPPUNIT_ASSERT( s.insert( v3, std::ref(fi) )); - CPPUNIT_ASSERT( v3.nVal == v3.nKey * 100 ); - CPPUNIT_ASSERT( v3.nFindCount == 0 ); - CPPUNIT_ASSERT( s.find_with( v3, less(), std::ref(ff) )); - CPPUNIT_ASSERT( v3.nFindCount == 1 ); - v3.nFindCount = 0; - CPPUNIT_ASSERT( check_size( s, 3 )); - CPPUNIT_ASSERT( !s.empty() ); - } - - // unlink test - CPPUNIT_ASSERT( s.unlink( v1 )); - ASSERT_RCU_FIND( !s.contains( v1 )); - ASSERT_RCU_FIND( s.contains( v2 )); - ASSERT_RCU_FIND( s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 2 )); - - CPPUNIT_ASSERT( !s.unlink( v1 )); - ASSERT_RCU_FIND( !s.contains( v1 )); - CPPUNIT_ASSERT( check_size( s, 2 )); - - ASSERT_RCU_FIND( s.contains( v3 ) ); - CPPUNIT_ASSERT( s.unlink( v3 )); - ASSERT_RCU_FIND( !s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 1 )); - - ASSERT_RCU_FIND( s.contains( v2 )); - CPPUNIT_ASSERT( s.unlink( v2 )); - ASSERT_RCU_FIND( !s.contains( v1 )); - ASSERT_RCU_FIND( !s.contains( v2 )); - ASSERT_RCU_FIND( !s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 0 )); - CPPUNIT_ASSERT( s.empty() ); - - Set::gc::force_dispose(); - // unlink function calls disposer - CPPUNIT_ASSERT( v1.nDisposeCount == 1 ); - CPPUNIT_ASSERT( v2.nDisposeCount == 1 ); - CPPUNIT_ASSERT( v3.nDisposeCount == 1 ); - - // update test - { - update_functor f; - - std::pair ret = s.update(v1, f, false); - CPPUNIT_ASSERT(!ret.first); - CPPUNIT_ASSERT(!ret.second); - CPPUNIT_ASSERT(v1.nUpdateNewCount == 0); - CPPUNIT_ASSERT(v1.nUpdateCount == 0); - CPPUNIT_ASSERT(check_size(s, 0)); - - ret = s.update( v1, f ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( ret.second ); - CPPUNIT_ASSERT( v1.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v1.nUpdateCount == 0 ); - CPPUNIT_ASSERT( check_size( s, 1 )); - - ret = s.update(v1, f, false); - CPPUNIT_ASSERT(ret.first); - CPPUNIT_ASSERT(!ret.second); - CPPUNIT_ASSERT(v1.nUpdateNewCount == 1); - CPPUNIT_ASSERT(v1.nUpdateCount == 1); - CPPUNIT_ASSERT(check_size(s, 1)); - - ret = s.update( v2, f ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( ret.second ); - CPPUNIT_ASSERT( v2.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v2.nUpdateCount == 0 ); - CPPUNIT_ASSERT( check_size( s, 2 )); - - ret = s.update( v3, f ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( ret.second ); - CPPUNIT_ASSERT( v3.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v3.nUpdateCount == 0 ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - ASSERT_RCU_FIND( s.contains( v1 )); - ASSERT_RCU_FIND( s.contains( v2 )); - ASSERT_RCU_FIND( s.contains( v3 )); - - ret = s.update( v1, f ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( !ret.second ); - CPPUNIT_ASSERT( v1.nUpdateNewCount == 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( v2.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v2.nUpdateCount == 1 ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - ret = s.update( v3, f ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( !ret.second ); - CPPUNIT_ASSERT( v3.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v3.nUpdateCount == 1 ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - ASSERT_RCU_FIND( s.contains( v1 ) ); - ASSERT_RCU_FIND( s.contains( v2 )); - ASSERT_RCU_FIND( s.contains( v3 )); - } - - // erase test - ASSERT_RCU_FIND( s.contains( v1 )); - ASSERT_RCU_FIND( s.contains( v2, less() )); - ASSERT_RCU_FIND( s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 3 )); - CPPUNIT_ASSERT( !s.empty() ); - - CPPUNIT_ASSERT( v1.nEraseCount == 0 ); - CPPUNIT_ASSERT( s.erase_with( v1, less(), erase_functor() )); - CPPUNIT_ASSERT( v1.nEraseCount == 1 ); - ASSERT_RCU_FIND( !s.contains( v1 )); - ASSERT_RCU_FIND( s.contains( v2 ) ); - ASSERT_RCU_FIND( s.contains( v3 ) ); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( !s.empty() ); - - CPPUNIT_ASSERT( !s.erase( v1 )); - ASSERT_RCU_FIND( !s.contains( v1 )); - ASSERT_RCU_FIND( s.contains( v2 )); - ASSERT_RCU_FIND( s.contains( v3 ) ); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( !s.empty() ); - - ASSERT_RCU_FIND( !s.contains( v4 )); - CPPUNIT_ASSERT( s.insert(v4)); - ASSERT_RCU_FIND( s.contains( v4.key() )); - CPPUNIT_ASSERT( s.erase_with( v4.key(), less() )); - ASSERT_RCU_FIND( !s.contains( v4.key() )); - - CPPUNIT_ASSERT( s.erase( v2.key() )); - ASSERT_RCU_FIND( !s.contains( v1 )); - ASSERT_RCU_FIND( !s.contains( v2 )); - ASSERT_RCU_FIND( s.contains( v3 ) ); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( !s.empty() ); - - CPPUNIT_ASSERT( !s.erase( v2.key() )); - ASSERT_RCU_FIND( !s.contains( v1 )); - ASSERT_RCU_FIND( !s.contains( v2 )); - ASSERT_RCU_FIND( s.contains( v3 ) ); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( !s.empty() ); - - CPPUNIT_ASSERT( v3.nEraseCount == 0 ); - CPPUNIT_ASSERT( s.erase( v3, erase_functor() )); - CPPUNIT_ASSERT( v3.nEraseCount == 1 ); - ASSERT_RCU_FIND( !s.contains( v1 )); - ASSERT_RCU_FIND( !s.contains( v2 )); - ASSERT_RCU_FIND( !s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 0 )); - CPPUNIT_ASSERT( s.empty() ); - - // dispose test - Set::gc::force_dispose(); - CPPUNIT_ASSERT( v1.nDisposeCount == 2 ); - CPPUNIT_ASSERT( v2.nDisposeCount == 2 ); - CPPUNIT_ASSERT( v3.nDisposeCount == 2 ); - CPPUNIT_ASSERT( v4.nDisposeCount == 1 ); - - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( s.insert( v1 )); - CPPUNIT_ASSERT( s.insert( v3 )); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( !s.empty() ); - - { - value_type v( v1 ); - CPPUNIT_ASSERT( !s.unlink( v ) ); - } - - CPPUNIT_ASSERT( s.unlink( v3 ) ); - ASSERT_RCU_FIND( s.contains( v1 )); - ASSERT_RCU_FIND( !s.contains( v2 )); - ASSERT_RCU_FIND( !s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( !s.empty() ); - - CPPUNIT_ASSERT( !s.unlink( v3 )); - ASSERT_RCU_FIND( s.contains( v1 )); - ASSERT_RCU_FIND( !s.contains( v2 )); - ASSERT_RCU_FIND( !s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( !s.empty() ); - - CPPUNIT_ASSERT( s.unlink( v1 )); - ASSERT_RCU_FIND( !s.contains( v1 )); - ASSERT_RCU_FIND( !s.contains( v2 )); - ASSERT_RCU_FIND( !s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 0 )); - CPPUNIT_ASSERT( s.empty() ); - - CPPUNIT_ASSERT( !s.unlink( v2 )); - ASSERT_RCU_FIND( !s.contains( v1 )); - ASSERT_RCU_FIND( !s.contains( v2 )); - ASSERT_RCU_FIND( !s.contains( v3 )); - CPPUNIT_ASSERT( check_size( s, 0 )); - CPPUNIT_ASSERT( s.empty() ); - - Set::gc::force_dispose(); - CPPUNIT_ASSERT( v1.nDisposeCount == 3 ); - CPPUNIT_ASSERT( v2.nDisposeCount == 2 ); - CPPUNIT_ASSERT( v3.nDisposeCount == 3 ); - CPPUNIT_ASSERT( v4.nDisposeCount == 1 ); - - // clear test - CPPUNIT_ASSERT( s.insert( v1 )); - CPPUNIT_ASSERT( s.insert( v3 )); - CPPUNIT_ASSERT( s.insert( v2 )); - - s.clear(); - Set::gc::force_dispose(); - CPPUNIT_ASSERT( v1.nDisposeCount == 4 ); - CPPUNIT_ASSERT( v2.nDisposeCount == 3 ); - CPPUNIT_ASSERT( v3.nDisposeCount == 4 ); - CPPUNIT_ASSERT( v4.nDisposeCount == 1 ); - } -#undef ASSERT_RCU_FIND - - template - void test_rcu_int() - { - { - Set s( 64, 4 ); - test_rcu_int_with( s ); - } - - // Iterator test - test_iter(); - - // Extract tests - typedef typename Set::gc rcu; - typedef typename Set::value_type value_type; - typedef typename Set::rcu_lock rcu_lock; - - typename Set::exempt_ptr ep; - - { - static size_t const nLimit = 1024; - value_type arrItems[nLimit]; - int arr[nLimit]; - for ( size_t i = 0; i < nLimit; ++i ) - arr[i] = (int) i; - shuffle( arr, arr + nLimit ); - - for ( size_t i = 0; i < nLimit; ++i ) { - arrItems[i].nKey = arr[i]; - arrItems[i].nVal = arr[i] * 2; - } - - Set s( nLimit, 2 ); - for ( size_t i = 0; i < nLimit; ++i ) - CPPUNIT_ASSERT( s.insert( arrItems[i] )); - - for ( size_t i = 0; i < nLimit; i += 2 ) { - value_type * pVal; - int nKey = arr[i]; - { - rcu_lock l; - pVal = s.get( nKey ); - CPPUNIT_ASSERT( pVal != nullptr ); - CPPUNIT_CHECK( pVal->nKey == nKey ); - CPPUNIT_CHECK( pVal->nVal == nKey * 2 ); - - ep = s.extract( nKey ); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty() ); - CPPUNIT_CHECK( pVal->nKey == ep->nKey ); - CPPUNIT_CHECK( pVal->nVal == (*ep).nVal ); - } - ep.release(); - { - rcu_lock l; - CPPUNIT_CHECK( s.get( nKey ) == nullptr ); - CPPUNIT_CHECK( !s.extract( nKey )); - CPPUNIT_CHECK( ep.empty() ); - - nKey = arr[i+1]; - pVal = s.get_with( nKey, less() ); - CPPUNIT_ASSERT( pVal != nullptr ); - CPPUNIT_CHECK( pVal->nKey == nKey ); - CPPUNIT_CHECK( pVal->nVal == nKey * 2 ); - - ep = s.extract_with( nKey, less() ); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty() ); - CPPUNIT_CHECK( pVal->nKey == ep->nKey ); - CPPUNIT_CHECK( pVal->nVal == (*ep).nVal ); - } - ep.release(); - { - rcu_lock l; - CPPUNIT_CHECK( s.get_with( nKey, less() ) == nullptr ); - ep = s.extract_with( nKey, less() ); - CPPUNIT_CHECK( !ep ); - CPPUNIT_CHECK( ep.empty() ); - } - } - CPPUNIT_CHECK( s.empty() ); - CPPUNIT_CHECK( check_size( s, 0 )); - { - rcu_lock l; - CPPUNIT_CHECK( s.get( 100 ) == nullptr ); - ep = s.extract( 100 ); - CPPUNIT_CHECK( !ep ); - CPPUNIT_CHECK( ep.empty() ); - } - - Set::gc::force_dispose(); - } - } - - template - void test_rcu_int_michael_list() - { - { - Set s( 64, 4 ); - test_rcu_int_with( s ); - } - - // Iterator test - test_iter(); - - // Extract tests - typedef typename Set::gc rcu; - typedef typename Set::value_type value_type; - typedef typename Set::rcu_lock rcu_lock; - - typename Set::exempt_ptr ep; - typename Set::raw_ptr gp; - - { - static size_t const nLimit = 1024; - value_type arrItems[nLimit]; - int arr[nLimit]; - for ( size_t i = 0; i < nLimit; ++i ) - arr[i] = (int) i; - shuffle( arr, arr + nLimit ); - - for ( size_t i = 0; i < nLimit; ++i ) { - arrItems[i].nKey = arr[i]; - arrItems[i].nVal = arr[i] * 2; - } - - Set s( nLimit, 2 ); - for ( size_t i = 0; i < nLimit; ++i ) - CPPUNIT_ASSERT( s.insert( arrItems[i] )); - - for ( size_t i = 0; i < nLimit; i += 2 ) { - int nKey = arr[i]; - { - rcu_lock l; - gp = s.get( nKey ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_CHECK( gp->nKey == nKey ); - CPPUNIT_CHECK( (*gp).nVal == nKey * 2 ); - } - gp.release(); - - ep = s.extract( nKey ); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty() ); - CPPUNIT_CHECK( nKey == ep->nKey ); - CPPUNIT_CHECK( nKey * 2 == (*ep).nVal ); - ep.release(); - { - rcu_lock l; - CPPUNIT_CHECK( !s.get( nKey )); - } - CPPUNIT_CHECK( !s.extract( nKey )); - CPPUNIT_CHECK( ep.empty() ); - - nKey = arr[i+1]; - { - rcu_lock l; - gp = s.get_with( nKey, less() ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_CHECK( gp->nKey == nKey ); - CPPUNIT_CHECK( gp->nVal == nKey * 2 ); - } - gp.release(); - - ep = s.extract_with( nKey, less() ); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty() ); - CPPUNIT_CHECK( nKey == ep->nKey ); - CPPUNIT_CHECK( nKey * 2 == (*ep).nVal ); - ep.release(); - - { - rcu_lock l; - CPPUNIT_CHECK( !s.get_with( nKey, less())); - } - ep = s.extract_with( nKey, less() ); - CPPUNIT_CHECK( !ep ); - CPPUNIT_CHECK( ep.empty() ); - } - CPPUNIT_CHECK( s.empty() ); - CPPUNIT_CHECK( check_size( s, 0 )); - { - rcu_lock l; - CPPUNIT_CHECK( !s.get( 100 )); - } - ep = s.extract( 100 ); - CPPUNIT_CHECK( !ep ); - CPPUNIT_CHECK( ep.empty() ); - - Set::gc::force_dispose(); - } - } - - // MichaelHashSet + MichaelList - void HP_base_cmp(); - void HP_base_less(); - void HP_base_cmpmix(); - void HP_member_cmp(); - void HP_member_less(); - void HP_member_cmpmix(); - - void DHP_base_cmp(); - void DHP_base_less(); - void DHP_base_cmpmix(); - void DHP_member_cmp(); - void DHP_member_less(); - void DHP_member_cmpmix(); - - void RCU_GPI_base_cmp(); - void RCU_GPI_base_less(); - void RCU_GPI_base_cmpmix(); - void RCU_GPI_member_cmp(); - void RCU_GPI_member_less(); - void RCU_GPI_member_cmpmix(); - - void RCU_GPB_base_cmp(); - void RCU_GPB_base_less(); - void RCU_GPB_base_cmpmix(); - void RCU_GPB_member_cmp(); - void RCU_GPB_member_less(); - void RCU_GPB_member_cmpmix(); - - void RCU_GPT_base_cmp(); - void RCU_GPT_base_less(); - void RCU_GPT_base_cmpmix(); - void RCU_GPT_member_cmp(); - void RCU_GPT_member_less(); - void RCU_GPT_member_cmpmix(); - - void RCU_SHB_base_cmp(); - void RCU_SHB_base_less(); - void RCU_SHB_base_cmpmix(); - void RCU_SHB_member_cmp(); - void RCU_SHB_member_less(); - void RCU_SHB_member_cmpmix(); - - void RCU_SHT_base_cmp(); - void RCU_SHT_base_less(); - void RCU_SHT_base_cmpmix(); - void RCU_SHT_member_cmp(); - void RCU_SHT_member_less(); - void RCU_SHT_member_cmpmix(); - - void nogc_base_cmp(); - void nogc_base_less(); - void nogc_base_cmpmix(); - void nogc_member_cmp(); - void nogc_member_less(); - void nogc_member_cmpmix(); - - // MichaelHashSet + LazyList - void HP_base_cmp_lazy(); - void HP_base_less_lazy(); - void HP_base_cmpmix_lazy(); - void HP_member_cmp_lazy(); - void HP_member_less_lazy(); - void HP_member_cmpmix_lazy(); - - void DHP_base_cmp_lazy(); - void DHP_base_less_lazy(); - void DHP_base_cmpmix_lazy(); - void DHP_member_cmp_lazy(); - void DHP_member_less_lazy(); - void DHP_member_cmpmix_lazy(); - - void RCU_GPI_base_cmp_lazy(); - void RCU_GPI_base_less_lazy(); - void RCU_GPI_base_cmpmix_lazy(); - void RCU_GPI_member_cmp_lazy(); - void RCU_GPI_member_less_lazy(); - void RCU_GPI_member_cmpmix_lazy(); - - void RCU_GPB_base_cmp_lazy(); - void RCU_GPB_base_less_lazy(); - void RCU_GPB_base_cmpmix_lazy(); - void RCU_GPB_member_cmp_lazy(); - void RCU_GPB_member_less_lazy(); - void RCU_GPB_member_cmpmix_lazy(); - - void RCU_GPT_base_cmp_lazy(); - void RCU_GPT_base_less_lazy(); - void RCU_GPT_base_cmpmix_lazy(); - void RCU_GPT_member_cmp_lazy(); - void RCU_GPT_member_less_lazy(); - void RCU_GPT_member_cmpmix_lazy(); - - void RCU_SHB_base_cmp_lazy(); - void RCU_SHB_base_less_lazy(); - void RCU_SHB_base_cmpmix_lazy(); - void RCU_SHB_member_cmp_lazy(); - void RCU_SHB_member_less_lazy(); - void RCU_SHB_member_cmpmix_lazy(); - - void RCU_SHT_base_cmp_lazy(); - void RCU_SHT_base_less_lazy(); - void RCU_SHT_base_cmpmix_lazy(); - void RCU_SHT_member_cmp_lazy(); - void RCU_SHT_member_less_lazy(); - void RCU_SHT_member_cmpmix_lazy(); - - void nogc_base_cmp_lazy(); - void nogc_base_less_lazy(); - void nogc_base_cmpmix_lazy(); - void nogc_member_cmp_lazy(); - void nogc_member_less_lazy(); - void nogc_member_cmpmix_lazy(); - - // SplitListSet + MichaelList [dyn - dynamic bucket table, st - static bucket table] - void split_dyn_HP_base_cmp(); - void split_dyn_HP_base_less(); - void split_dyn_HP_base_cmpmix(); - void split_dyn_HP_base_cmpmix_stat(); - void split_dyn_HP_member_cmp(); - void split_dyn_HP_member_less(); - void split_dyn_HP_member_cmpmix(); - void split_dyn_HP_member_cmpmix_stat(); - void split_st_HP_base_cmp(); - void split_st_HP_base_less(); - void split_st_HP_base_cmpmix(); - void split_st_HP_base_cmpmix_stat(); - void split_st_HP_member_cmp(); - void split_st_HP_member_less(); - void split_st_HP_member_cmpmix(); - void split_st_HP_member_cmpmix_stat(); - - void split_dyn_DHP_base_cmp(); - void split_dyn_DHP_base_less(); - void split_dyn_DHP_base_cmpmix(); - void split_dyn_DHP_base_cmpmix_stat(); - void split_dyn_DHP_member_cmp(); - void split_dyn_DHP_member_less(); - void split_dyn_DHP_member_cmpmix(); - void split_dyn_DHP_member_cmpmix_stat(); - void split_st_DHP_base_cmp(); - void split_st_DHP_base_less(); - void split_st_DHP_base_cmpmix(); - void split_st_DHP_base_cmpmix_stat(); - void split_st_DHP_member_cmp(); - void split_st_DHP_member_less(); - void split_st_DHP_member_cmpmix(); - void split_st_DHP_member_cmpmix_stat(); - - void split_dyn_RCU_GPI_base_cmp(); - void split_dyn_RCU_GPI_base_less(); - void split_dyn_RCU_GPI_base_cmpmix(); - void split_dyn_RCU_GPI_base_cmpmix_stat(); - void split_dyn_RCU_GPI_member_cmp(); - void split_dyn_RCU_GPI_member_less(); - void split_dyn_RCU_GPI_member_cmpmix(); - void split_dyn_RCU_GPI_member_cmpmix_stat(); - void split_st_RCU_GPI_base_cmp(); - void split_st_RCU_GPI_base_less(); - void split_st_RCU_GPI_base_cmpmix(); - void split_st_RCU_GPI_base_cmpmix_stat(); - void split_st_RCU_GPI_member_cmp(); - void split_st_RCU_GPI_member_less(); - void split_st_RCU_GPI_member_cmpmix(); - void split_st_RCU_GPI_member_cmpmix_stat(); - - void split_dyn_RCU_GPB_base_cmp(); - void split_dyn_RCU_GPB_base_less(); - void split_dyn_RCU_GPB_base_cmpmix(); - void split_dyn_RCU_GPB_base_cmpmix_stat(); - void split_dyn_RCU_GPB_member_cmp(); - void split_dyn_RCU_GPB_member_less(); - void split_dyn_RCU_GPB_member_cmpmix(); - void split_dyn_RCU_GPB_member_cmpmix_stat(); - void split_st_RCU_GPB_base_cmp(); - void split_st_RCU_GPB_base_less(); - void split_st_RCU_GPB_base_cmpmix(); - void split_st_RCU_GPB_base_cmpmix_stat(); - void split_st_RCU_GPB_member_cmp(); - void split_st_RCU_GPB_member_less(); - void split_st_RCU_GPB_member_cmpmix(); - void split_st_RCU_GPB_member_cmpmix_stat(); - - void split_dyn_RCU_GPT_base_cmp(); - void split_dyn_RCU_GPT_base_less(); - void split_dyn_RCU_GPT_base_cmpmix(); - void split_dyn_RCU_GPT_base_cmpmix_stat(); - void split_dyn_RCU_GPT_member_cmp(); - void split_dyn_RCU_GPT_member_less(); - void split_dyn_RCU_GPT_member_cmpmix(); - void split_dyn_RCU_GPT_member_cmpmix_stat(); - void split_st_RCU_GPT_base_cmp(); - void split_st_RCU_GPT_base_less(); - void split_st_RCU_GPT_base_cmpmix(); - void split_st_RCU_GPT_base_cmpmix_stat(); - void split_st_RCU_GPT_member_cmp(); - void split_st_RCU_GPT_member_less(); - void split_st_RCU_GPT_member_cmpmix(); - void split_st_RCU_GPT_member_cmpmix_stat(); - - void split_dyn_RCU_SHB_base_cmp(); - void split_dyn_RCU_SHB_base_less(); - void split_dyn_RCU_SHB_base_cmpmix(); - void split_dyn_RCU_SHB_base_cmpmix_stat(); - void split_dyn_RCU_SHB_member_cmp(); - void split_dyn_RCU_SHB_member_less(); - void split_dyn_RCU_SHB_member_cmpmix(); - void split_dyn_RCU_SHB_member_cmpmix_stat(); - void split_st_RCU_SHB_base_cmp(); - void split_st_RCU_SHB_base_less(); - void split_st_RCU_SHB_base_cmpmix(); - void split_st_RCU_SHB_base_cmpmix_stat(); - void split_st_RCU_SHB_member_cmp(); - void split_st_RCU_SHB_member_less(); - void split_st_RCU_SHB_member_cmpmix(); - void split_st_RCU_SHB_member_cmpmix_stat(); - - void split_dyn_RCU_SHT_base_cmp(); - void split_dyn_RCU_SHT_base_less(); - void split_dyn_RCU_SHT_base_cmpmix(); - void split_dyn_RCU_SHT_base_cmpmix_stat(); - void split_dyn_RCU_SHT_member_cmp(); - void split_dyn_RCU_SHT_member_less(); - void split_dyn_RCU_SHT_member_cmpmix(); - void split_dyn_RCU_SHT_member_cmpmix_stat(); - void split_st_RCU_SHT_base_cmp(); - void split_st_RCU_SHT_base_less(); - void split_st_RCU_SHT_base_cmpmix(); - void split_st_RCU_SHT_base_cmpmix_stat(); - void split_st_RCU_SHT_member_cmp(); - void split_st_RCU_SHT_member_less(); - void split_st_RCU_SHT_member_cmpmix(); - void split_st_RCU_SHT_member_cmpmix_stat(); - - void split_dyn_nogc_base_cmp(); - void split_dyn_nogc_base_less(); - void split_dyn_nogc_base_cmpmix(); - void split_dyn_nogc_base_cmpmix_stat(); - void split_dyn_nogc_member_cmp(); - void split_dyn_nogc_member_less(); - void split_dyn_nogc_member_cmpmix(); - void split_dyn_nogc_member_cmpmix_stat(); - void split_st_nogc_base_cmp(); - void split_st_nogc_base_less(); - void split_st_nogc_base_cmpmix(); - void split_st_nogc_base_cmpmix_stat(); - void split_st_nogc_member_cmp(); - void split_st_nogc_member_less(); - void split_st_nogc_member_cmpmix(); - void split_st_nogc_member_cmpmix_stat(); - - - // SplitListSet + LazyList [dyn - dynamic bucket table, st - static bucket table] - void split_dyn_HP_base_cmp_lazy(); - void split_dyn_HP_base_less_lazy(); - void split_dyn_HP_base_cmpmix_lazy(); - void split_dyn_HP_base_cmpmix_stat_lazy(); - void split_dyn_HP_member_cmp_lazy(); - void split_dyn_HP_member_less_lazy(); - void split_dyn_HP_member_cmpmix_lazy(); - void split_dyn_HP_member_cmpmix_stat_lazy(); - void split_st_HP_base_cmp_lazy(); - void split_st_HP_base_less_lazy(); - void split_st_HP_base_cmpmix_lazy(); - void split_st_HP_base_cmpmix_stat_lazy(); - void split_st_HP_member_cmp_lazy(); - void split_st_HP_member_less_lazy(); - void split_st_HP_member_cmpmix_lazy(); - void split_st_HP_member_cmpmix_stat_lazy(); - - void split_dyn_DHP_base_cmp_lazy(); - void split_dyn_DHP_base_less_lazy(); - void split_dyn_DHP_base_cmpmix_lazy(); - void split_dyn_DHP_base_cmpmix_stat_lazy(); - void split_dyn_DHP_member_cmp_lazy(); - void split_dyn_DHP_member_less_lazy(); - void split_dyn_DHP_member_cmpmix_lazy(); - void split_dyn_DHP_member_cmpmix_stat_lazy(); - void split_st_DHP_base_cmp_lazy(); - void split_st_DHP_base_less_lazy(); - void split_st_DHP_base_cmpmix_lazy(); - void split_st_DHP_base_cmpmix_stat_lazy(); - void split_st_DHP_member_cmp_lazy(); - void split_st_DHP_member_less_lazy(); - void split_st_DHP_member_cmpmix_lazy(); - void split_st_DHP_member_cmpmix_stat_lazy(); - - void split_dyn_RCU_GPI_base_cmp_lazy(); - void split_dyn_RCU_GPI_base_less_lazy(); - void split_dyn_RCU_GPI_base_cmpmix_lazy(); - void split_dyn_RCU_GPI_base_cmpmix_stat_lazy(); - void split_dyn_RCU_GPI_member_cmp_lazy(); - void split_dyn_RCU_GPI_member_less_lazy(); - void split_dyn_RCU_GPI_member_cmpmix_lazy(); - void split_dyn_RCU_GPI_member_cmpmix_stat_lazy(); - void split_st_RCU_GPI_base_cmp_lazy(); - void split_st_RCU_GPI_base_less_lazy(); - void split_st_RCU_GPI_base_cmpmix_lazy(); - void split_st_RCU_GPI_base_cmpmix_stat_lazy(); - void split_st_RCU_GPI_member_cmp_lazy(); - void split_st_RCU_GPI_member_less_lazy(); - void split_st_RCU_GPI_member_cmpmix_lazy(); - void split_st_RCU_GPI_member_cmpmix_stat_lazy(); - - void split_dyn_RCU_GPB_base_cmp_lazy(); - void split_dyn_RCU_GPB_base_less_lazy(); - void split_dyn_RCU_GPB_base_cmpmix_lazy(); - void split_dyn_RCU_GPB_base_cmpmix_stat_lazy(); - void split_dyn_RCU_GPB_member_cmp_lazy(); - void split_dyn_RCU_GPB_member_less_lazy(); - void split_dyn_RCU_GPB_member_cmpmix_lazy(); - void split_dyn_RCU_GPB_member_cmpmix_stat_lazy(); - void split_st_RCU_GPB_base_cmp_lazy(); - void split_st_RCU_GPB_base_less_lazy(); - void split_st_RCU_GPB_base_cmpmix_lazy(); - void split_st_RCU_GPB_base_cmpmix_stat_lazy(); - void split_st_RCU_GPB_member_cmp_lazy(); - void split_st_RCU_GPB_member_less_lazy(); - void split_st_RCU_GPB_member_cmpmix_lazy(); - void split_st_RCU_GPB_member_cmpmix_stat_lazy(); - - void split_dyn_RCU_GPT_base_cmp_lazy(); - void split_dyn_RCU_GPT_base_less_lazy(); - void split_dyn_RCU_GPT_base_cmpmix_lazy(); - void split_dyn_RCU_GPT_base_cmpmix_stat_lazy(); - void split_dyn_RCU_GPT_member_cmp_lazy(); - void split_dyn_RCU_GPT_member_less_lazy(); - void split_dyn_RCU_GPT_member_cmpmix_lazy(); - void split_dyn_RCU_GPT_member_cmpmix_stat_lazy(); - void split_st_RCU_GPT_base_cmp_lazy(); - void split_st_RCU_GPT_base_less_lazy(); - void split_st_RCU_GPT_base_cmpmix_lazy(); - void split_st_RCU_GPT_base_cmpmix_stat_lazy(); - void split_st_RCU_GPT_member_cmp_lazy(); - void split_st_RCU_GPT_member_less_lazy(); - void split_st_RCU_GPT_member_cmpmix_lazy(); - void split_st_RCU_GPT_member_cmpmix_stat_lazy(); - - void split_dyn_RCU_SHB_base_cmp_lazy(); - void split_dyn_RCU_SHB_base_less_lazy(); - void split_dyn_RCU_SHB_base_cmpmix_lazy(); - void split_dyn_RCU_SHB_base_cmpmix_stat_lazy(); - void split_dyn_RCU_SHB_member_cmp_lazy(); - void split_dyn_RCU_SHB_member_less_lazy(); - void split_dyn_RCU_SHB_member_cmpmix_lazy(); - void split_dyn_RCU_SHB_member_cmpmix_stat_lazy(); - void split_st_RCU_SHB_base_cmp_lazy(); - void split_st_RCU_SHB_base_less_lazy(); - void split_st_RCU_SHB_base_cmpmix_lazy(); - void split_st_RCU_SHB_base_cmpmix_stat_lazy(); - void split_st_RCU_SHB_member_cmp_lazy(); - void split_st_RCU_SHB_member_less_lazy(); - void split_st_RCU_SHB_member_cmpmix_lazy(); - void split_st_RCU_SHB_member_cmpmix_stat_lazy(); - - void split_dyn_RCU_SHT_base_cmp_lazy(); - void split_dyn_RCU_SHT_base_less_lazy(); - void split_dyn_RCU_SHT_base_cmpmix_lazy(); - void split_dyn_RCU_SHT_base_cmpmix_stat_lazy(); - void split_dyn_RCU_SHT_member_cmp_lazy(); - void split_dyn_RCU_SHT_member_less_lazy(); - void split_dyn_RCU_SHT_member_cmpmix_lazy(); - void split_dyn_RCU_SHT_member_cmpmix_stat_lazy(); - void split_st_RCU_SHT_base_cmp_lazy(); - void split_st_RCU_SHT_base_less_lazy(); - void split_st_RCU_SHT_base_cmpmix_lazy(); - void split_st_RCU_SHT_base_cmpmix_stat_lazy(); - void split_st_RCU_SHT_member_cmp_lazy(); - void split_st_RCU_SHT_member_less_lazy(); - void split_st_RCU_SHT_member_cmpmix_lazy(); - void split_st_RCU_SHT_member_cmpmix_stat_lazy(); - - void split_dyn_nogc_base_cmp_lazy(); - void split_dyn_nogc_base_less_lazy(); - void split_dyn_nogc_base_cmpmix_lazy(); - void split_dyn_nogc_base_cmpmix_stat_lazy(); - void split_dyn_nogc_member_cmp_lazy(); - void split_dyn_nogc_member_less_lazy(); - void split_dyn_nogc_member_cmpmix_lazy(); - void split_dyn_nogc_member_cmpmix_stat_lazy(); - void split_st_nogc_base_cmp_lazy(); - void split_st_nogc_base_less_lazy(); - void split_st_nogc_base_cmpmix_lazy(); - void split_st_nogc_base_cmpmix_stat_lazy(); - void split_st_nogc_member_cmp_lazy(); - void split_st_nogc_member_less_lazy(); - void split_st_nogc_member_cmpmix_lazy(); - void split_st_nogc_member_cmpmix_stat_lazy(); - - CPPUNIT_TEST_SUITE(IntrusiveHashSetHdrTest) - CPPUNIT_TEST(HP_base_cmp) - CPPUNIT_TEST(HP_base_less) - CPPUNIT_TEST(HP_base_cmpmix) - CPPUNIT_TEST(HP_member_cmp) - CPPUNIT_TEST(HP_member_less) - CPPUNIT_TEST(HP_member_cmpmix) - - CPPUNIT_TEST(DHP_base_cmp) - CPPUNIT_TEST(DHP_base_less) - CPPUNIT_TEST(DHP_base_cmpmix) - CPPUNIT_TEST(DHP_member_cmp) - CPPUNIT_TEST(DHP_member_less) - CPPUNIT_TEST(DHP_member_cmpmix) - - CPPUNIT_TEST(RCU_GPI_base_cmp) - CPPUNIT_TEST(RCU_GPI_base_less) - CPPUNIT_TEST(RCU_GPI_base_cmpmix) - CPPUNIT_TEST(RCU_GPI_member_cmp) - CPPUNIT_TEST(RCU_GPI_member_less) - CPPUNIT_TEST(RCU_GPI_member_cmpmix) - - CPPUNIT_TEST(RCU_GPB_base_cmp) - CPPUNIT_TEST(RCU_GPB_base_less) - CPPUNIT_TEST(RCU_GPB_base_cmpmix) - CPPUNIT_TEST(RCU_GPB_member_cmp) - CPPUNIT_TEST(RCU_GPB_member_less) - CPPUNIT_TEST(RCU_GPB_member_cmpmix) - - CPPUNIT_TEST(RCU_GPT_base_cmp) - CPPUNIT_TEST(RCU_GPT_base_less) - CPPUNIT_TEST(RCU_GPT_base_cmpmix) - CPPUNIT_TEST(RCU_GPT_member_cmp) - CPPUNIT_TEST(RCU_GPT_member_less) - CPPUNIT_TEST(RCU_GPT_member_cmpmix) - - CPPUNIT_TEST(RCU_SHB_base_cmp) - CPPUNIT_TEST(RCU_SHB_base_less) - CPPUNIT_TEST(RCU_SHB_base_cmpmix) - CPPUNIT_TEST(RCU_SHB_member_cmp) - CPPUNIT_TEST(RCU_SHB_member_less) - CPPUNIT_TEST(RCU_SHB_member_cmpmix) - - CPPUNIT_TEST(RCU_SHT_base_cmp) - CPPUNIT_TEST(RCU_SHT_base_less) - CPPUNIT_TEST(RCU_SHT_base_cmpmix) - CPPUNIT_TEST(RCU_SHT_member_cmp) - CPPUNIT_TEST(RCU_SHT_member_less) - CPPUNIT_TEST(RCU_SHT_member_cmpmix) - - CPPUNIT_TEST(nogc_base_cmp) - CPPUNIT_TEST(nogc_base_less) - CPPUNIT_TEST(nogc_base_cmpmix) - CPPUNIT_TEST(nogc_member_cmp) - CPPUNIT_TEST(nogc_member_less) - CPPUNIT_TEST(nogc_member_cmpmix) - - CPPUNIT_TEST(HP_base_cmp_lazy) - CPPUNIT_TEST(HP_base_less_lazy) - CPPUNIT_TEST(HP_base_cmpmix_lazy) - CPPUNIT_TEST(HP_member_cmp_lazy) - CPPUNIT_TEST(HP_member_less_lazy) - CPPUNIT_TEST(HP_member_cmpmix_lazy) - - CPPUNIT_TEST(DHP_base_cmp_lazy) - CPPUNIT_TEST(DHP_base_less_lazy) - CPPUNIT_TEST(DHP_base_cmpmix_lazy) - CPPUNIT_TEST(DHP_member_cmp_lazy) - CPPUNIT_TEST(DHP_member_less_lazy) - CPPUNIT_TEST(DHP_member_cmpmix_lazy) - - CPPUNIT_TEST(RCU_GPI_base_cmp_lazy) - CPPUNIT_TEST(RCU_GPI_base_less_lazy) - CPPUNIT_TEST(RCU_GPI_base_cmpmix_lazy) - CPPUNIT_TEST(RCU_GPI_member_cmp_lazy) - CPPUNIT_TEST(RCU_GPI_member_less_lazy) - CPPUNIT_TEST(RCU_GPI_member_cmpmix_lazy) - - CPPUNIT_TEST(RCU_GPB_base_cmp_lazy) - CPPUNIT_TEST(RCU_GPB_base_less_lazy) - CPPUNIT_TEST(RCU_GPB_base_cmpmix_lazy) - CPPUNIT_TEST(RCU_GPB_member_cmp_lazy) - CPPUNIT_TEST(RCU_GPB_member_less_lazy) - CPPUNIT_TEST(RCU_GPB_member_cmpmix_lazy) - - CPPUNIT_TEST(RCU_GPT_base_cmp_lazy) - CPPUNIT_TEST(RCU_GPT_base_less_lazy) - CPPUNIT_TEST(RCU_GPT_base_cmpmix_lazy) - CPPUNIT_TEST(RCU_GPT_member_cmp_lazy) - CPPUNIT_TEST(RCU_GPT_member_less_lazy) - CPPUNIT_TEST(RCU_GPT_member_cmpmix_lazy) - - CPPUNIT_TEST(RCU_SHB_base_cmp_lazy) - CPPUNIT_TEST(RCU_SHB_base_less_lazy) - CPPUNIT_TEST(RCU_SHB_base_cmpmix_lazy) - CPPUNIT_TEST(RCU_SHB_member_cmp_lazy) - CPPUNIT_TEST(RCU_SHB_member_less_lazy) - CPPUNIT_TEST(RCU_SHB_member_cmpmix_lazy) - - CPPUNIT_TEST(RCU_SHT_base_cmp_lazy) - CPPUNIT_TEST(RCU_SHT_base_less_lazy) - CPPUNIT_TEST(RCU_SHT_base_cmpmix_lazy) - CPPUNIT_TEST(RCU_SHT_member_cmp_lazy) - CPPUNIT_TEST(RCU_SHT_member_less_lazy) - CPPUNIT_TEST(RCU_SHT_member_cmpmix_lazy) - - CPPUNIT_TEST(nogc_base_cmp_lazy) - CPPUNIT_TEST(nogc_base_less_lazy) - CPPUNIT_TEST(nogc_base_cmpmix_lazy) - CPPUNIT_TEST(nogc_member_cmp_lazy) - CPPUNIT_TEST(nogc_member_less_lazy) - CPPUNIT_TEST(nogc_member_cmpmix_lazy) - - CPPUNIT_TEST(split_dyn_HP_base_cmp) - CPPUNIT_TEST(split_dyn_HP_base_less) - CPPUNIT_TEST(split_dyn_HP_base_cmpmix) - CPPUNIT_TEST( split_dyn_HP_base_cmpmix_stat ) - CPPUNIT_TEST( split_dyn_HP_member_cmp ) - CPPUNIT_TEST(split_dyn_HP_member_less) - CPPUNIT_TEST(split_dyn_HP_member_cmpmix) - CPPUNIT_TEST( split_dyn_HP_member_cmpmix_stat ) - CPPUNIT_TEST( split_st_HP_base_cmp ) - CPPUNIT_TEST(split_st_HP_base_less) - CPPUNIT_TEST(split_st_HP_base_cmpmix) - CPPUNIT_TEST( split_st_HP_base_cmpmix_stat ) - CPPUNIT_TEST( split_st_HP_member_cmp ) - CPPUNIT_TEST(split_st_HP_member_less) - CPPUNIT_TEST(split_st_HP_member_cmpmix) - CPPUNIT_TEST( split_st_HP_member_cmpmix_stat ) - - CPPUNIT_TEST(split_dyn_DHP_base_cmp) - CPPUNIT_TEST(split_dyn_DHP_base_less) - CPPUNIT_TEST(split_dyn_DHP_base_cmpmix) - CPPUNIT_TEST( split_dyn_DHP_base_cmpmix_stat ) - CPPUNIT_TEST( split_dyn_DHP_member_cmp ) - CPPUNIT_TEST(split_dyn_DHP_member_less) - CPPUNIT_TEST(split_dyn_DHP_member_cmpmix) - CPPUNIT_TEST( split_dyn_DHP_member_cmpmix_stat ) - CPPUNIT_TEST( split_st_DHP_base_cmp ) - CPPUNIT_TEST(split_st_DHP_base_less) - CPPUNIT_TEST(split_st_DHP_base_cmpmix) - CPPUNIT_TEST( split_st_DHP_base_cmpmix_stat ) - CPPUNIT_TEST( split_st_DHP_member_cmp ) - CPPUNIT_TEST(split_st_DHP_member_less) - CPPUNIT_TEST(split_st_DHP_member_cmpmix) - CPPUNIT_TEST( split_st_DHP_member_cmpmix_stat ) - - CPPUNIT_TEST(split_dyn_RCU_GPI_base_cmp) - CPPUNIT_TEST(split_dyn_RCU_GPI_base_less) - CPPUNIT_TEST(split_dyn_RCU_GPI_base_cmpmix) - CPPUNIT_TEST( split_dyn_RCU_GPI_base_cmpmix_stat ) - CPPUNIT_TEST( split_dyn_RCU_GPI_member_cmp ) - CPPUNIT_TEST(split_dyn_RCU_GPI_member_less) - CPPUNIT_TEST(split_dyn_RCU_GPI_member_cmpmix) - CPPUNIT_TEST( split_dyn_RCU_GPI_member_cmpmix_stat ) - CPPUNIT_TEST( split_st_RCU_GPI_base_cmp ) - CPPUNIT_TEST(split_st_RCU_GPI_base_less) - CPPUNIT_TEST(split_st_RCU_GPI_base_cmpmix) - CPPUNIT_TEST( split_st_RCU_GPI_base_cmpmix_stat ) - CPPUNIT_TEST( split_st_RCU_GPI_member_cmp ) - CPPUNIT_TEST(split_st_RCU_GPI_member_less) - CPPUNIT_TEST(split_st_RCU_GPI_member_cmpmix) - CPPUNIT_TEST( split_st_RCU_GPI_member_cmpmix_stat ) - - CPPUNIT_TEST(split_dyn_RCU_GPB_base_cmp) - CPPUNIT_TEST(split_dyn_RCU_GPB_base_less) - CPPUNIT_TEST(split_dyn_RCU_GPB_base_cmpmix) - CPPUNIT_TEST( split_dyn_RCU_GPB_base_cmpmix_stat ) - CPPUNIT_TEST( split_dyn_RCU_GPB_member_cmp ) - CPPUNIT_TEST(split_dyn_RCU_GPB_member_less) - CPPUNIT_TEST(split_dyn_RCU_GPB_member_cmpmix) - CPPUNIT_TEST( split_dyn_RCU_GPB_member_cmpmix_stat ) - CPPUNIT_TEST( split_st_RCU_GPB_base_cmp ) - CPPUNIT_TEST(split_st_RCU_GPB_base_less) - CPPUNIT_TEST(split_st_RCU_GPB_base_cmpmix) - CPPUNIT_TEST( split_st_RCU_GPB_base_cmpmix_stat ) - CPPUNIT_TEST( split_st_RCU_GPB_member_cmp ) - CPPUNIT_TEST(split_st_RCU_GPB_member_less) - CPPUNIT_TEST(split_st_RCU_GPB_member_cmpmix) - CPPUNIT_TEST( split_st_RCU_GPB_member_cmpmix_stat ) - - CPPUNIT_TEST(split_dyn_RCU_GPT_base_cmp) - CPPUNIT_TEST(split_dyn_RCU_GPT_base_less) - CPPUNIT_TEST(split_dyn_RCU_GPT_base_cmpmix) - CPPUNIT_TEST( split_dyn_RCU_GPT_base_cmpmix_stat ) - CPPUNIT_TEST( split_dyn_RCU_GPT_member_cmp ) - CPPUNIT_TEST(split_dyn_RCU_GPT_member_less) - CPPUNIT_TEST(split_dyn_RCU_GPT_member_cmpmix) - CPPUNIT_TEST( split_dyn_RCU_GPT_member_cmpmix_stat ) - CPPUNIT_TEST( split_st_RCU_GPT_base_cmp ) - CPPUNIT_TEST(split_st_RCU_GPT_base_less) - CPPUNIT_TEST(split_st_RCU_GPT_base_cmpmix) - CPPUNIT_TEST( split_st_RCU_GPT_base_cmpmix_stat ) - CPPUNIT_TEST( split_st_RCU_GPT_member_cmp ) - CPPUNIT_TEST(split_st_RCU_GPT_member_less) - CPPUNIT_TEST(split_st_RCU_GPT_member_cmpmix) - CPPUNIT_TEST( split_st_RCU_GPT_member_cmpmix_stat ) - - CPPUNIT_TEST(split_dyn_RCU_SHB_base_cmp) - CPPUNIT_TEST(split_dyn_RCU_SHB_base_less) - CPPUNIT_TEST(split_dyn_RCU_SHB_base_cmpmix) - CPPUNIT_TEST( split_dyn_RCU_SHB_base_cmpmix_stat ) - CPPUNIT_TEST( split_dyn_RCU_SHB_member_cmp ) - CPPUNIT_TEST(split_dyn_RCU_SHB_member_less) - CPPUNIT_TEST(split_dyn_RCU_SHB_member_cmpmix) - CPPUNIT_TEST( split_dyn_RCU_SHB_member_cmpmix_stat ) - CPPUNIT_TEST( split_st_RCU_SHB_base_cmp ) - CPPUNIT_TEST(split_st_RCU_SHB_base_less) - CPPUNIT_TEST(split_st_RCU_SHB_base_cmpmix) - CPPUNIT_TEST( split_st_RCU_SHB_base_cmpmix_stat ) - CPPUNIT_TEST( split_st_RCU_SHB_member_cmp ) - CPPUNIT_TEST(split_st_RCU_SHB_member_less) - CPPUNIT_TEST(split_st_RCU_SHB_member_cmpmix) - CPPUNIT_TEST( split_st_RCU_SHB_member_cmpmix_stat ) - - CPPUNIT_TEST(split_dyn_RCU_SHT_base_cmp) - CPPUNIT_TEST(split_dyn_RCU_SHT_base_less) - CPPUNIT_TEST(split_dyn_RCU_SHT_base_cmpmix) - CPPUNIT_TEST( split_dyn_RCU_SHT_base_cmpmix_stat ) - CPPUNIT_TEST( split_dyn_RCU_SHT_member_cmp ) - CPPUNIT_TEST(split_dyn_RCU_SHT_member_less) - CPPUNIT_TEST(split_dyn_RCU_SHT_member_cmpmix) - CPPUNIT_TEST( split_dyn_RCU_SHT_member_cmpmix_stat ) - CPPUNIT_TEST( split_st_RCU_SHT_base_cmp ) - CPPUNIT_TEST(split_st_RCU_SHT_base_less) - CPPUNIT_TEST(split_st_RCU_SHT_base_cmpmix) - CPPUNIT_TEST( split_st_RCU_SHT_base_cmpmix_stat ) - CPPUNIT_TEST( split_st_RCU_SHT_member_cmp ) - CPPUNIT_TEST(split_st_RCU_SHT_member_less) - CPPUNIT_TEST(split_st_RCU_SHT_member_cmpmix) - CPPUNIT_TEST( split_st_RCU_SHT_member_cmpmix_stat ) - - CPPUNIT_TEST(split_dyn_nogc_base_cmp) - CPPUNIT_TEST(split_dyn_nogc_base_less) - CPPUNIT_TEST(split_dyn_nogc_base_cmpmix) - CPPUNIT_TEST( split_dyn_nogc_base_cmpmix_stat ) - CPPUNIT_TEST( split_dyn_nogc_member_cmp ) - CPPUNIT_TEST(split_dyn_nogc_member_less) - CPPUNIT_TEST(split_dyn_nogc_member_cmpmix) - CPPUNIT_TEST( split_dyn_nogc_member_cmpmix_stat ) - CPPUNIT_TEST( split_st_nogc_base_cmp ) - CPPUNIT_TEST(split_st_nogc_base_less) - CPPUNIT_TEST(split_st_nogc_base_cmpmix) - CPPUNIT_TEST( split_st_nogc_base_cmpmix_stat ) - CPPUNIT_TEST( split_st_nogc_member_cmp ) - CPPUNIT_TEST(split_st_nogc_member_less) - CPPUNIT_TEST(split_st_nogc_member_cmpmix) - CPPUNIT_TEST( split_st_nogc_member_cmpmix_stat ) - - CPPUNIT_TEST(split_dyn_HP_base_cmp_lazy) - CPPUNIT_TEST(split_dyn_HP_base_less_lazy) - CPPUNIT_TEST(split_dyn_HP_base_cmpmix_lazy) - CPPUNIT_TEST( split_dyn_HP_base_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_dyn_HP_member_cmp_lazy ) - CPPUNIT_TEST(split_dyn_HP_member_less_lazy) - CPPUNIT_TEST(split_dyn_HP_member_cmpmix_lazy) - CPPUNIT_TEST( split_dyn_HP_member_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_st_HP_base_cmp_lazy ) - CPPUNIT_TEST(split_st_HP_base_less_lazy) - CPPUNIT_TEST(split_st_HP_base_cmpmix_lazy) - CPPUNIT_TEST( split_st_HP_base_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_st_HP_member_cmp_lazy ) - CPPUNIT_TEST(split_st_HP_member_less_lazy) - CPPUNIT_TEST(split_st_HP_member_cmpmix_lazy) - CPPUNIT_TEST( split_st_HP_member_cmpmix_stat_lazy ) - - CPPUNIT_TEST(split_dyn_DHP_base_cmp_lazy) - CPPUNIT_TEST(split_dyn_DHP_base_less_lazy) - CPPUNIT_TEST(split_dyn_DHP_base_cmpmix_lazy) - CPPUNIT_TEST( split_dyn_DHP_base_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_dyn_DHP_member_cmp_lazy ) - CPPUNIT_TEST(split_dyn_DHP_member_less_lazy) - CPPUNIT_TEST(split_dyn_DHP_member_cmpmix_lazy) - CPPUNIT_TEST( split_dyn_DHP_member_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_st_DHP_base_cmp_lazy ) - CPPUNIT_TEST(split_st_DHP_base_less_lazy) - CPPUNIT_TEST(split_st_DHP_base_cmpmix_lazy) - CPPUNIT_TEST( split_st_DHP_base_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_st_DHP_member_cmp_lazy ) - CPPUNIT_TEST(split_st_DHP_member_less_lazy) - CPPUNIT_TEST(split_st_DHP_member_cmpmix_lazy) - CPPUNIT_TEST( split_st_DHP_member_cmpmix_stat_lazy ) - - CPPUNIT_TEST(split_dyn_RCU_GPI_base_cmp_lazy) - CPPUNIT_TEST(split_dyn_RCU_GPI_base_less_lazy) - CPPUNIT_TEST(split_dyn_RCU_GPI_base_cmpmix_lazy) - CPPUNIT_TEST( split_dyn_RCU_GPI_base_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_dyn_RCU_GPI_member_cmp_lazy ) - CPPUNIT_TEST(split_dyn_RCU_GPI_member_less_lazy) - CPPUNIT_TEST(split_dyn_RCU_GPI_member_cmpmix_lazy) - CPPUNIT_TEST( split_dyn_RCU_GPI_member_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_st_RCU_GPI_base_cmp_lazy ) - CPPUNIT_TEST(split_st_RCU_GPI_base_less_lazy) - CPPUNIT_TEST(split_st_RCU_GPI_base_cmpmix_lazy) - CPPUNIT_TEST( split_st_RCU_GPI_base_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_st_RCU_GPI_member_cmp_lazy ) - CPPUNIT_TEST(split_st_RCU_GPI_member_less_lazy) - CPPUNIT_TEST(split_st_RCU_GPI_member_cmpmix_lazy) - CPPUNIT_TEST( split_st_RCU_GPI_member_cmpmix_stat_lazy ) - - CPPUNIT_TEST(split_dyn_RCU_GPB_base_cmp_lazy) - CPPUNIT_TEST(split_dyn_RCU_GPB_base_less_lazy) - CPPUNIT_TEST(split_dyn_RCU_GPB_base_cmpmix_lazy) - CPPUNIT_TEST( split_dyn_RCU_GPB_base_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_dyn_RCU_GPB_member_cmp_lazy ) - CPPUNIT_TEST(split_dyn_RCU_GPB_member_less_lazy) - CPPUNIT_TEST(split_dyn_RCU_GPB_member_cmpmix_lazy) - CPPUNIT_TEST( split_dyn_RCU_GPB_member_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_st_RCU_GPB_base_cmp_lazy ) - CPPUNIT_TEST(split_st_RCU_GPB_base_less_lazy) - CPPUNIT_TEST(split_st_RCU_GPB_base_cmpmix_lazy) - CPPUNIT_TEST( split_st_RCU_GPB_base_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_st_RCU_GPB_member_cmp_lazy ) - CPPUNIT_TEST(split_st_RCU_GPB_member_less_lazy) - CPPUNIT_TEST(split_st_RCU_GPB_member_cmpmix_lazy) - CPPUNIT_TEST( split_st_RCU_GPB_member_cmpmix_stat_lazy ) - - CPPUNIT_TEST(split_dyn_RCU_GPT_base_cmp_lazy) - CPPUNIT_TEST(split_dyn_RCU_GPT_base_less_lazy) - CPPUNIT_TEST(split_dyn_RCU_GPT_base_cmpmix_lazy) - CPPUNIT_TEST( split_dyn_RCU_GPT_base_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_dyn_RCU_GPT_member_cmp_lazy ) - CPPUNIT_TEST(split_dyn_RCU_GPT_member_less_lazy) - CPPUNIT_TEST(split_dyn_RCU_GPT_member_cmpmix_lazy) - CPPUNIT_TEST( split_dyn_RCU_GPT_member_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_st_RCU_GPT_base_cmp_lazy ) - CPPUNIT_TEST(split_st_RCU_GPT_base_less_lazy) - CPPUNIT_TEST(split_st_RCU_GPT_base_cmpmix_lazy) - CPPUNIT_TEST( split_st_RCU_GPT_base_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_st_RCU_GPT_member_cmp_lazy ) - CPPUNIT_TEST(split_st_RCU_GPT_member_less_lazy) - CPPUNIT_TEST(split_st_RCU_GPT_member_cmpmix_lazy) - CPPUNIT_TEST( split_st_RCU_GPT_member_cmpmix_stat_lazy ) - - CPPUNIT_TEST(split_dyn_RCU_SHB_base_cmp_lazy) - CPPUNIT_TEST(split_dyn_RCU_SHB_base_less_lazy) - CPPUNIT_TEST(split_dyn_RCU_SHB_base_cmpmix_lazy) - CPPUNIT_TEST( split_dyn_RCU_SHB_base_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_dyn_RCU_SHB_member_cmp_lazy ) - CPPUNIT_TEST(split_dyn_RCU_SHB_member_less_lazy) - CPPUNIT_TEST(split_dyn_RCU_SHB_member_cmpmix_lazy) - CPPUNIT_TEST( split_dyn_RCU_SHB_member_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_st_RCU_SHB_base_cmp_lazy ) - CPPUNIT_TEST(split_st_RCU_SHB_base_less_lazy) - CPPUNIT_TEST(split_st_RCU_SHB_base_cmpmix_lazy) - CPPUNIT_TEST( split_st_RCU_SHB_base_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_st_RCU_SHB_member_cmp_lazy ) - CPPUNIT_TEST(split_st_RCU_SHB_member_less_lazy) - CPPUNIT_TEST(split_st_RCU_SHB_member_cmpmix_lazy) - CPPUNIT_TEST( split_st_RCU_SHB_member_cmpmix_stat_lazy ) - - CPPUNIT_TEST(split_dyn_RCU_SHT_base_cmp_lazy) - CPPUNIT_TEST(split_dyn_RCU_SHT_base_less_lazy) - CPPUNIT_TEST(split_dyn_RCU_SHT_base_cmpmix_lazy) - CPPUNIT_TEST( split_dyn_RCU_SHT_base_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_dyn_RCU_SHT_member_cmp_lazy ) - CPPUNIT_TEST(split_dyn_RCU_SHT_member_less_lazy) - CPPUNIT_TEST(split_dyn_RCU_SHT_member_cmpmix_lazy) - CPPUNIT_TEST( split_dyn_RCU_SHT_member_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_st_RCU_SHT_base_cmp_lazy ) - CPPUNIT_TEST(split_st_RCU_SHT_base_less_lazy) - CPPUNIT_TEST(split_st_RCU_SHT_base_cmpmix_lazy) - CPPUNIT_TEST( split_st_RCU_SHT_base_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_st_RCU_SHT_member_cmp_lazy ) - CPPUNIT_TEST(split_st_RCU_SHT_member_less_lazy) - CPPUNIT_TEST(split_st_RCU_SHT_member_cmpmix_lazy) - CPPUNIT_TEST( split_st_RCU_SHT_member_cmpmix_stat_lazy ) - - CPPUNIT_TEST(split_dyn_nogc_base_cmp_lazy) - CPPUNIT_TEST(split_dyn_nogc_base_less_lazy) - CPPUNIT_TEST(split_dyn_nogc_base_cmpmix_lazy) - CPPUNIT_TEST( split_dyn_nogc_base_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_dyn_nogc_member_cmp_lazy ) - CPPUNIT_TEST(split_dyn_nogc_member_less_lazy) - CPPUNIT_TEST(split_dyn_nogc_member_cmpmix_lazy) - CPPUNIT_TEST( split_dyn_nogc_member_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_st_nogc_base_cmp_lazy ) - CPPUNIT_TEST(split_st_nogc_base_less_lazy) - CPPUNIT_TEST(split_st_nogc_base_cmpmix_lazy) - CPPUNIT_TEST( split_st_nogc_base_cmpmix_stat_lazy ) - CPPUNIT_TEST( split_st_nogc_member_cmp_lazy ) - CPPUNIT_TEST(split_st_nogc_member_less_lazy) - CPPUNIT_TEST(split_st_nogc_member_cmpmix_lazy) - CPPUNIT_TEST( split_st_nogc_member_cmpmix_stat_lazy ) - CPPUNIT_TEST_SUITE_END() - - }; - -} // namespace set - -#endif // #ifndef CDSTEST_HDR_INTRUSIVE_SET_H diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_dhp.cpp b/tests/test-hdr/set/hdr_intrusive_skiplist_dhp.cpp deleted file mode 100644 index 3c297b4e..00000000 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_dhp.cpp +++ /dev/null @@ -1,355 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_skiplist_set.h" - -#include -#include "map/print_skiplist_stat.h" - -namespace set { - - void IntrusiveSkipListSet::skiplist_dhp_base_cmp() - { - typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_base_less() - { - typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_base_cmpmix() - { - typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,co::compare< cmp > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_base_cmp_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_base_less_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_base_cmpmix_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_base_cmp_xorshift() - { - typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_base_less_xorshift() - { - typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_base_cmpmix_xorshift() - { - typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_base_cmp_xorshift_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_base_less_xorshift_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_base_cmpmix_xorshift_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - - //********* - void IntrusiveSkipListSet::skiplist_dhp_base_cmp_pascal() - { - typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_base_less_pascal() - { - typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_base_cmpmix_pascal() - { - typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_base_cmp_pascal_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_base_less_pascal_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_base_cmpmix_pascal_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_dhp_member.cpp b/tests/test-hdr/set/hdr_intrusive_skiplist_dhp_member.cpp deleted file mode 100644 index ec4f087b..00000000 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_dhp_member.cpp +++ /dev/null @@ -1,353 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_skiplist_set.h" - -#include -#include "map/print_skiplist_stat.h" - -namespace set { - void IntrusiveSkipListSet::skiplist_dhp_member_cmp() - { - typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_member_less() - { - typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_member_cmpmix() - { - typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_member_cmp_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_member_less_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_member_cmpmix_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_member_cmp_xorshift() - { - typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_member_less_xorshift() - { - typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_member_cmpmix_xorshift() - { - typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_member_cmp_xorshift_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_member_less_xorshift_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_member_cmpmix_xorshift_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - - void IntrusiveSkipListSet::skiplist_dhp_member_cmp_pascal() - { - typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_member_less_pascal() - { - typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_member_cmpmix_pascal() - { - typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_member_cmp_pascal_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_member_less_pascal_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_dhp_member_cmpmix_pascal_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item; - - typedef ci::SkipListSet< cds::gc::DHP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_hp.cpp b/tests/test-hdr/set/hdr_intrusive_skiplist_hp.cpp deleted file mode 100644 index 4defa416..00000000 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_hp.cpp +++ /dev/null @@ -1,356 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_skiplist_set.h" - -#include -#include "map/print_skiplist_stat.h" - -namespace set { - - void IntrusiveSkipListSet::skiplist_hp_base_cmp() - { - typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item; - struct set_traits : public ci::skip_list::traits - { - typedef ci::skip_list::base_hook< co::gc > hook; - typedef cmp compare; - typedef faked_disposer disposer; - typedef cds::atomicity::item_counter item_counter; - }; - typedef ci::SkipListSet< cds::gc::HP, item, set_traits > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_base_less() - { - typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_base_cmpmix() - { - typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_base_cmp_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_base_less_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_base_cmpmix_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_base_cmp_xorshift() - { - typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_base_less_xorshift() - { - typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_base_cmpmix_xorshift() - { - typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_base_cmp_xorshift_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_base_less_xorshift_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_base_cmpmix_xorshift_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - - //********* - void IntrusiveSkipListSet::skiplist_hp_base_cmp_pascal() - { - typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_base_less_pascal() - { - typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_base_cmpmix_pascal() - { - typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_base_cmp_pascal_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_base_less_pascal_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_base_cmpmix_pascal_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - -} // namespace set - -CPPUNIT_TEST_SUITE_REGISTRATION(set::IntrusiveSkipListSet); diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_hp_member.cpp b/tests/test-hdr/set/hdr_intrusive_skiplist_hp_member.cpp deleted file mode 100644 index 3b5de83b..00000000 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_hp_member.cpp +++ /dev/null @@ -1,353 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_skiplist_set.h" - -#include -#include "map/print_skiplist_stat.h" - -namespace set { - void IntrusiveSkipListSet::skiplist_hp_member_cmp() - { - typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_member_less() - { - typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_member_cmpmix() - { - typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_member_cmp_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_member_less_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_member_cmpmix_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_member_cmp_xorshift() - { - typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_member_less_xorshift() - { - typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_member_cmpmix_xorshift() - { - typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_member_cmp_xorshift_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_member_less_xorshift_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_member_cmpmix_xorshift_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - - void IntrusiveSkipListSet::skiplist_hp_member_cmp_pascal() - { - typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_member_less_pascal() - { - typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_member_cmpmix_pascal() - { - typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_member_cmp_pascal_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_member_less_pascal_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSet::skiplist_hp_member_cmpmix_pascal_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item; - - typedef ci::SkipListSet< cds::gc::HP, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_nogc.cpp b/tests/test-hdr/set/hdr_intrusive_skiplist_nogc.cpp deleted file mode 100644 index 689aa534..00000000 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_nogc.cpp +++ /dev/null @@ -1,337 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_skiplist_set.h" - -#include -#include "map/print_skiplist_stat.h" - -namespace set { - - void IntrusiveSkipListSet::skiplist_nogc_base_cmp() - { - typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_base_less() - { - typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_base_cmpmix() - { - typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,co::compare< cmp > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_base_cmp_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_base_less_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_base_cmpmix_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_base_cmp_xorshift() - { - typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_base_less_xorshift() - { - typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_base_cmpmix_xorshift() - { - typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_base_cmp_xorshift_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_base_less_xorshift_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_base_cmpmix_xorshift_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - - //********* - void IntrusiveSkipListSet::skiplist_nogc_base_cmp_pascal() - { - typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_base_less_pascal() - { - typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_base_cmpmix_pascal() - { - typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_base_cmp_pascal_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_base_less_pascal_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_base_cmpmix_pascal_stat() - { - typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist_nogc >(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_nogc_member.cpp b/tests/test-hdr/set/hdr_intrusive_skiplist_nogc_member.cpp deleted file mode 100644 index fc072624..00000000 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_nogc_member.cpp +++ /dev/null @@ -1,337 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_skiplist_set.h" - -#include -#include "map/print_skiplist_stat.h" - -namespace set { - - void IntrusiveSkipListSet::skiplist_nogc_member_cmp() - { - typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_member_less() - { - typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_member_cmpmix() - { - typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,co::compare< cmp > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_member_cmp_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_member_less_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_member_cmpmix_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_member_cmp_xorshift() - { - typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_member_less_xorshift() - { - typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_member_cmpmix_xorshift() - { - typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_member_cmp_xorshift_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_member_less_xorshift_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_member_cmpmix_xorshift_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - - //********* - void IntrusiveSkipListSet::skiplist_nogc_member_cmp_pascal() - { - typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_member_less_pascal() - { - typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_member_cmpmix_pascal() - { - typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_member_cmp_pascal_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_member_less_pascal_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist_nogc >(); - } - - void IntrusiveSkipListSet::skiplist_nogc_member_cmpmix_pascal_stat() - { - typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item; - - typedef ci::SkipListSet< cds::gc::nogc, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist_nogc >(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpb.cpp b/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpb.cpp deleted file mode 100644 index c8169175..00000000 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpb.cpp +++ /dev/null @@ -1,361 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_skiplist_set_rcu.h" - -#include -#include -#include "map/print_skiplist_stat.h" - -namespace set { - namespace { - typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmp() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_less() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmpmix() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,co::compare< cmp > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmp_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_less_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmpmix_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmp_xorshift() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_less_xorshift() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmpmix_xorshift() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmp_xorshift_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_less_xorshift_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmpmix_xorshift_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - - //********* - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmp_pascal() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_less_pascal() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmpmix_pascal() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmp_pascal_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_less_pascal_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmpmix_pascal_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - -} // namespace set - -CPPUNIT_TEST_SUITE_REGISTRATION(set::IntrusiveSkipListSetRCU); diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpb_member.cpp b/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpb_member.cpp deleted file mode 100644 index 2e0190c0..00000000 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpb_member.cpp +++ /dev/null @@ -1,358 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_skiplist_set_rcu.h" - -#include -#include -#include "map/print_skiplist_stat.h" - -namespace set { - namespace { - typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmp() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_less() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmpmix() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmp_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_less_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmpmix_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmp_xorshift() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_less_xorshift() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmpmix_xorshift() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmp_xorshift_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_less_xorshift_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmpmix_xorshift_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmp_pascal() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_less_pascal() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmpmix_pascal() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmp_pascal_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_less_pascal_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmpmix_pascal_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpi.cpp b/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpi.cpp deleted file mode 100644 index cbf80f97..00000000 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpi.cpp +++ /dev/null @@ -1,359 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_skiplist_set_rcu.h" - -#include -#include -#include "map/print_skiplist_stat.h" - -namespace set { - namespace { - typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmp() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_less() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmpmix() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,co::compare< cmp > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmp_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_less_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmpmix_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmp_xorshift() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_less_xorshift() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmpmix_xorshift() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmp_xorshift_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_less_xorshift_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmpmix_xorshift_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - - //********* - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmp_pascal() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_less_pascal() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmpmix_pascal() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmp_pascal_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_less_pascal_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmpmix_pascal_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpi_member.cpp b/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpi_member.cpp deleted file mode 100644 index 1b3d6213..00000000 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpi_member.cpp +++ /dev/null @@ -1,358 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_skiplist_set_rcu.h" - -#include -#include -#include "map/print_skiplist_stat.h" - -namespace set { - namespace { - typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmp() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_less() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmpmix() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmp_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_less_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmpmix_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmp_xorshift() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_less_xorshift() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmpmix_xorshift() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmp_xorshift_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_less_xorshift_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmpmix_xorshift_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmp_pascal() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_less_pascal() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmpmix_pascal() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmp_pascal_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_less_pascal_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmpmix_pascal_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpt.cpp b/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpt.cpp deleted file mode 100644 index 55d44d6c..00000000 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpt.cpp +++ /dev/null @@ -1,359 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_skiplist_set_rcu.h" - -#include -#include -#include "map/print_skiplist_stat.h" - -namespace set { - namespace { - typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmp() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_less() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmpmix() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,co::compare< cmp > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmp_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_less_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmpmix_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmp_xorshift() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_less_xorshift() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmpmix_xorshift() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmp_xorshift_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_less_xorshift_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmpmix_xorshift_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - - //********* - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmp_pascal() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_less_pascal() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmpmix_pascal() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmp_pascal_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_less_pascal_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmpmix_pascal_stat() - { - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpt_member.cpp b/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpt_member.cpp deleted file mode 100644 index 57249e2d..00000000 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpt_member.cpp +++ /dev/null @@ -1,358 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_skiplist_set_rcu.h" - -#include -#include -#include "map/print_skiplist_stat.h" - -namespace set { - namespace { - typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmp() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_less() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmpmix() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmp_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_less_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmpmix_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmp_xorshift() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_less_xorshift() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmpmix_xorshift() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmp_xorshift_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_less_xorshift_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmpmix_xorshift_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); - } - - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmp_pascal() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_less_pascal() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmpmix_pascal() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmp_pascal_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_less_pascal_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmpmix_pascal_stat() - { - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_shb.cpp b/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_shb.cpp deleted file mode 100644 index 92b12dbc..00000000 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_shb.cpp +++ /dev/null @@ -1,400 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_skiplist_set_rcu.h" - -#include -#include -#include "map/print_skiplist_stat.h" - -namespace set { - -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - } -#endif - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,co::compare< cmp > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmp_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmpmix_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmp_xorshift() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_less_xorshift() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmpmix_xorshift() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmp_xorshift_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_less_xorshift_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmpmix_xorshift_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - - //********* - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmp_pascal() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_less_pascal() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmpmix_pascal() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmp_pascal_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_less_pascal_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmpmix_pascal_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - -} // namespace set - -CPPUNIT_TEST_SUITE_REGISTRATION(set::IntrusiveSkipListSetRCU); diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_shb_member.cpp b/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_shb_member.cpp deleted file mode 100644 index b809bedd..00000000 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_shb_member.cpp +++ /dev/null @@ -1,396 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_skiplist_set_rcu.h" - -#include -#include -#include "map/print_skiplist_stat.h" - -namespace set { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - } -#endif - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmp_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmpmix_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmp_xorshift() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_less_xorshift() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmpmix_xorshift() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmp_xorshift_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_less_xorshift_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmpmix_xorshift_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmp_pascal() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_less_pascal() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmpmix_pascal() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmp_pascal_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_less_pascal_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmpmix_pascal_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_sht.cpp b/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_sht.cpp deleted file mode 100644 index 52e0df88..00000000 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_sht.cpp +++ /dev/null @@ -1,397 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_skiplist_set_rcu.h" - -#include -#include -#include "map/print_skiplist_stat.h" - -namespace set { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - } -#endif - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,co::compare< cmp > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmp_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmpmix_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmp_xorshift() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_less_xorshift() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmpmix_xorshift() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmp_xorshift_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_less_xorshift_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmpmix_xorshift_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - - //********* - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmp_pascal() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_less_pascal() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmpmix_pascal() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmp_pascal_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_less_pascal_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmpmix_pascal_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_sht_member.cpp b/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_sht_member.cpp deleted file mode 100644 index c843b54d..00000000 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_rcu_sht_member.cpp +++ /dev/null @@ -1,396 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_skiplist_set_rcu.h" - -#include -#include -#include "map/print_skiplist_stat.h" - -namespace set { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - } -#endif - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmp_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmpmix_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmp_xorshift() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_less_xorshift() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmpmix_xorshift() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmp_xorshift_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_less_xorshift_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmpmix_xorshift_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::xorshift > - ,co::stat< ci::skip_list::stat<> > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmp_pascal() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_less_pascal() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmpmix_pascal() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,co::item_counter< cds::atomicity::item_counter > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmp_pascal_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_less_pascal_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - - void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmpmix_pascal_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::skip_list::node< rcu_type> > item; - - typedef ci::SkipListSet< rcu_type, item, - ci::skip_list::make_traits< - ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - ,co::compare< cmp > - ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal > - ,co::stat< ci::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_skiplist >(); -#endif - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_set.h b/tests/test-hdr/set/hdr_intrusive_skiplist_set.h deleted file mode 100644 index 31947a54..00000000 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_set.h +++ /dev/null @@ -1,796 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_INTRUSIVE_SKIPLIST_SET_H -#define CDSTEST_HDR_INTRUSIVE_SKIPLIST_SET_H - -#include "set/hdr_intrusive_set.h" - -namespace set { - - class IntrusiveSkipListSet: public IntrusiveHashSetHdrTest - { - typedef IntrusiveHashSetHdrTest base_class; - - static size_t const c_nArrSize = 1000; - - protected: - struct other_key { - int nKey; - - other_key() - {} - - other_key( int key ) - : nKey(key) - {} - - template - other_key& operator=( Q const& src ) - { - nKey = src.nKey; - return *this; - } - }; - - template - struct other_key_less - { - bool operator ()( StoredType const& n, other_key k ) const - { - return n.nKey < k.nKey; - } - bool operator ()( other_key k, StoredType const& n ) const - { - return k.nKey < n.nKey; - } - }; - - struct copy_other_key - { - template - void operator()( other_key& dest, Q const& src ) const - { - dest.nKey = src.nKey; - } - }; - - protected: - template - void test_skiplist() - { - { - Set s; - base_class::test_int_with( s ); - } - - test_skiplist_(); - } - - template - void test_skiplist_() - { - Set s; - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - typedef typename Set::value_type value_type; - typedef typename Set::iterator set_iterator; - typedef typename Set::const_iterator const_set_iterator; - typedef typename base_class::less less; - - value_type v[c_nArrSize]; - int nCount = 0; - int nPrevKey = 0; - - // Test iterator - ascending order - for ( int i = 0; i < (int) (sizeof(v)/sizeof(v[0])); ++i ) { - v[i].nKey = i; - v[i].nVal = i * 2; - - CPPUNIT_ASSERT( s.insert( v[i] )); - } - CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) )); - //CPPUNIT_MSG( PrintStat()(s, "Iterator test, ascending insert order") ); - - nCount = 0; - nPrevKey = 0; - for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal ); - CPPUNIT_ASSERT( s.contains( it->nKey )); - it->nVal = (*it).nKey; - ++nCount; - if ( it != s.begin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) )); - CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0])); - - nCount = 0; - for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey == it->nVal ); - ++nCount; - if ( it != s.cbegin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) )); - CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0])); - - for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) { - CPPUNIT_ASSERT( v[i].nKey == v[i].nVal ); - CPPUNIT_ASSERT( s.contains( v[i].nKey, less() )); - } - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - Set::gc::force_dispose(); - - for ( size_t i = 0; i < (int) sizeof(v)/sizeof(v[0]); ++i ) { - CPPUNIT_ASSERT( v[i].nDisposeCount == 1 ); - } - - // Test iterator - descending order - for ( int i = (int) sizeof(v)/sizeof(v[0]) - 1; i >= 0; --i ) { - v[i].nKey = i; - v[i].nVal = i * 2; - - CPPUNIT_ASSERT( s.insert( v[i] )); - } - CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) )); - - //CPPUNIT_MSG( PrintStat()(s, "Iterator test, descending insert order") ); - - nCount = 0; - for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal ); - it->nVal = (*it).nKey; - ++nCount; - if ( it != s.begin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) )); - CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0])); - - nCount = 0; - for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey == it->nVal ); - ++nCount; - if ( it != s.cbegin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) )); - CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0])); - - for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) { - CPPUNIT_ASSERT( v[i].nKey == v[i].nVal ); - } - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - Set::gc::force_dispose(); - - for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) { - CPPUNIT_ASSERT( v[i].nDisposeCount == 2 ); - } - - // Test iterator - random order - fill_skiplist( s, v ); - //CPPUNIT_MSG( PrintStat()(s, "Iterator test, random insert order") ); - - nCount = 0; - for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal ); - it->nVal = (*it).nKey; - ++nCount; - if ( it != s.begin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) )); - CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0])); - - nCount = 0; - for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey == it->nVal ); - ++nCount; - if ( it != s.cbegin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) )); - CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0])); - - for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) { - CPPUNIT_ASSERT( v[i].nKey == v[i].nVal ); - } - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - Set::gc::force_dispose(); - - for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) { - CPPUNIT_ASSERT( v[i].nDisposeCount == 3 ); - } - - CPPUNIT_MSG( "extract test" ); - // extract/get test - { - typename Set::guarded_ptr gp; - - // extract - fill_skiplist( s, v ); - for ( int i = c_nArrSize - 1; i >= 0; i -= 1 ) { - gp = s.get( i ); - CPPUNIT_CHECK( gp ); - CPPUNIT_CHECK( gp->nKey == i ); - CPPUNIT_CHECK( gp->nVal == i * 2 ); - gp->nVal *= 2; - gp.release(); - - gp = s.extract( i ); - CPPUNIT_CHECK( gp ); - CPPUNIT_CHECK_EX( gp->nKey == i, "i=" << i << ", gp->nKey=" << gp->nKey); - CPPUNIT_CHECK_EX( (*gp).nVal == i * 4, "i=" << i << ", gp->nVal=" << gp->nVal ); - gp.release(); - - gp = s.extract( i ); - CPPUNIT_CHECK( !gp ); - CPPUNIT_CHECK( !s.get( i )); - } - CPPUNIT_CHECK( s.empty() ); - Set::gc::force_dispose(); - - // extract_with - fill_skiplist( s, v ); - for ( int i = c_nArrSize - 1; i >= 0; i -= 1 ) { - gp = s.get_with( other_key( i ), other_key_less() ); - CPPUNIT_CHECK( gp ); - CPPUNIT_CHECK( gp->nKey == i ); - CPPUNIT_CHECK( (*gp).nVal == i * 2 ); - gp->nVal *= 2; - gp.release(); - - gp = s.extract_with( other_key( i ), other_key_less() ); - CPPUNIT_CHECK( gp ); - CPPUNIT_CHECK_EX( gp->nKey == i, "i=" << i << ", gp->nKey=" << gp->nKey); - CPPUNIT_CHECK_EX( (*gp).nVal == i * 4, "i=" << i << ", gp->nVal=" << gp->nVal ); - gp.release(); - - gp = s.extract_with( other_key( i ), other_key_less() ); - CPPUNIT_CHECK( !gp ); - CPPUNIT_CHECK( !s.get_with( other_key(i), other_key_less() )); - } - CPPUNIT_CHECK( s.empty() ); - Set::gc::force_dispose(); - - // extract_min - { - fill_skiplist( s, v ); - int nPrevKey; - gp = s.extract_min(); - CPPUNIT_ASSERT( gp ); - nPrevKey = gp->nKey; - while ( !s.empty() ) { - gp = s.extract_min(); - CPPUNIT_CHECK( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == nPrevKey + 1 ); - CPPUNIT_CHECK( (*gp).nVal == (nPrevKey + 1) * 2 ); - nPrevKey = gp->nKey; - gp.release(); - } - gp.release(); - CPPUNIT_CHECK( !s.extract_min()); - CPPUNIT_CHECK( gp.empty()); - } - Set::gc::force_dispose(); - - // extract_max - { - fill_skiplist( s, v ); - int nPrevKey; - gp = s.extract_max(); - CPPUNIT_ASSERT( gp ); - nPrevKey = gp->nKey; - while ( !s.empty() ) { - gp = s.extract_max(); - CPPUNIT_CHECK( gp ); - CPPUNIT_ASSERT( !gp.empty() ); - CPPUNIT_CHECK( gp->nKey == nPrevKey - 1 ); - CPPUNIT_CHECK( (*gp).nVal == (nPrevKey - 1) * 2 ); - nPrevKey = gp->nKey; - gp.release(); - } - gp.release(); - CPPUNIT_CHECK( !s.extract_min()); - CPPUNIT_CHECK( gp.empty()); - - CPPUNIT_CHECK( !s.extract_max()); - } - Set::gc::force_dispose(); - } - - CPPUNIT_MSG( PrintStat()(s, nullptr) ); - } - - template - void fill_skiplist( Set& s, typename Set::value_type * pArr ) - { - int nRand[c_nArrSize]; - for ( int i = 0; i < (int) c_nArrSize; ++i ) { - nRand[i] = i; - } - shuffle( nRand, nRand + c_nArrSize ); - - for ( int i = 0; i < (int) c_nArrSize; ++i ) { - pArr[i].nKey = nRand[i]; - pArr[i].nVal = nRand[i] * 2; - CPPUNIT_ASSERT( s.insert( pArr[i] )); - } - CPPUNIT_CHECK( check_size( s, c_nArrSize )); - } - - template - void test_skiplist_nogc() - { - typedef typename Set::value_type value_type; - typedef typename Set::iterator set_iterator; - typedef typename Set::iterator const_set_iterator; - typedef typename base_class::less less; - - value_type v1( 10, 50 ); - value_type v2( 5, 25 ); - value_type v3( 20, 100 ); - int key; - - Set s; - - // insert test - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - // insert/find test - CPPUNIT_ASSERT( s.contains( v1.key() ) == nullptr ); - CPPUNIT_ASSERT( s.insert( v1 )); - CPPUNIT_ASSERT( s.contains( v1.key() ) == &v1 ); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( !s.empty() ); - - CPPUNIT_ASSERT( s.contains( v2.key(), less() ) == nullptr ); - CPPUNIT_ASSERT( s.insert( v2 )); - CPPUNIT_ASSERT( v2.nFindCount == 0 ); - CPPUNIT_ASSERT( s.find_with( key = v2.key(), less(), find_functor() )); - CPPUNIT_ASSERT( v2.nFindCount == 1 ); - v2.nFindCount = 0; - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( !s.empty() ); - - { - find_functor ff; - CPPUNIT_ASSERT( s.contains( v3 ) == nullptr ); - CPPUNIT_ASSERT( s.insert( v3 )); - CPPUNIT_ASSERT( v3.nFindCount == 0 ); - CPPUNIT_ASSERT( s.find( v3, std::ref(ff) )); - CPPUNIT_ASSERT( v3.nFindCount == 1 ); - v3.nFindCount = 0; - CPPUNIT_ASSERT( check_size( s, 3 )); - CPPUNIT_ASSERT( !s.empty() ); - } - - CPPUNIT_ASSERT( !s.empty() ); - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - //CPPUNIT_MSG( PrintStat()(s, "Insert test") ); - - update_functor f; - std::pair ret = s.update( v1, f, true ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( ret.second ); - CPPUNIT_ASSERT( v1.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v1.nUpdateCount == 0 ); - CPPUNIT_ASSERT( check_size( s, 1 )); - - ret = s.update( v2, f, false ); - CPPUNIT_ASSERT( !ret.first ); - CPPUNIT_ASSERT( !ret.second ); - CPPUNIT_ASSERT( v2.nUpdateNewCount == 0 ); - CPPUNIT_ASSERT( v2.nUpdateCount == 0 ); - CPPUNIT_ASSERT( check_size( s, 1 )); - - ret = s.update( v2, f ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( ret.second ); - CPPUNIT_ASSERT( v2.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v2.nUpdateCount == 0 ); - CPPUNIT_ASSERT( check_size( s, 2 )); - - ret = s.update( v3, f, true ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( ret.second ); - CPPUNIT_ASSERT( v3.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v3.nUpdateCount == 0 ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - CPPUNIT_ASSERT( s.contains( v1 ) == &v1 ); - CPPUNIT_ASSERT( s.contains( v2, base_class::less() ) == &v2 ); - CPPUNIT_ASSERT( s.contains( v3 ) == &v3 ); - - ret = s.update( v1, f, true ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( !ret.second ); - CPPUNIT_ASSERT( v1.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v1.nUpdateCount == 1 ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - ret = s.update( v2, f, false ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( !ret.second ); - CPPUNIT_ASSERT( v2.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v2.nUpdateCount == 1 ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - ret = s.update( v3, f ); - CPPUNIT_ASSERT( ret.first ); - CPPUNIT_ASSERT( !ret.second ); - CPPUNIT_ASSERT( v3.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( v3.nUpdateCount == 1 ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - CPPUNIT_ASSERT( s.contains( v1 ) == &v1 ); - CPPUNIT_ASSERT( s.contains( v2 ) == &v2 ); - CPPUNIT_ASSERT( s.contains( v3 ) == &v3 ); - - CPPUNIT_ASSERT( !s.empty() ); - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - // get_min test - CPPUNIT_CHECK( s.get_min() == nullptr ); - CPPUNIT_CHECK( s.get_max() == nullptr ); - - { - value_type v[1000]; - for ( int i = 999; i >= 0; --i ) { - v[i].nKey = i; - v[i].nVal = i * 2; - - CPPUNIT_ASSERT( s.insert( v[i] )); - value_type * pVal = s.get_min(); - CPPUNIT_ASSERT( pVal != nullptr ); - CPPUNIT_CHECK( pVal->nKey == i ); - CPPUNIT_CHECK( pVal->nVal == i * 2 ); - } - - CPPUNIT_ASSERT( !s.empty() ); - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - } - - // Iterator test - { - value_type v[500]; - - for ( int i = 0; unsigned(i) < sizeof(v)/sizeof(v[0]); ++i ) { - v[i].nKey = i; - v[i].nVal = i * 2; - - CPPUNIT_ASSERT( s.insert( v[i] )); - - value_type * pVal = s.get_max(); - CPPUNIT_ASSERT( pVal != nullptr ); - CPPUNIT_CHECK( pVal->nKey == i ); - CPPUNIT_CHECK( pVal->nVal == i * 2 ); - } - - int nCount = 0; - for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal ); - it->nVal = (*it).nKey; - ++nCount; - } - CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0])); - - nCount = 0; - for ( const_set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey == it->nVal ); - ++nCount; - } - CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0])); - - for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) { - CPPUNIT_ASSERT( v[i].nKey == v[i].nVal ); - } - - //CPPUNIT_MSG( PrintStat()(s, "Iterator test") ); - s.clear(); - } - - // Test empty set - CPPUNIT_ASSERT( s.begin() == s.end() ); - CPPUNIT_ASSERT( s.cbegin() == s.cend() ); - - CPPUNIT_MSG( PrintStat()(s, nullptr) ); - } - - public: - // Skip-list - gc::HP - void skiplist_hp_base_cmp(); - void skiplist_hp_base_less(); - void skiplist_hp_base_cmpmix(); - void skiplist_hp_base_cmp_stat(); - void skiplist_hp_base_less_stat(); - void skiplist_hp_base_cmpmix_stat(); - void skiplist_hp_base_cmp_xorshift(); - void skiplist_hp_base_less_xorshift(); - void skiplist_hp_base_cmpmix_xorshift(); - void skiplist_hp_base_cmp_xorshift_stat(); - void skiplist_hp_base_less_xorshift_stat(); - void skiplist_hp_base_cmpmix_xorshift_stat(); - void skiplist_hp_base_cmp_pascal(); - void skiplist_hp_base_less_pascal(); - void skiplist_hp_base_cmpmix_pascal(); - void skiplist_hp_base_cmp_pascal_stat(); - void skiplist_hp_base_less_pascal_stat(); - void skiplist_hp_base_cmpmix_pascal_stat(); - - void skiplist_hp_member_cmp(); - void skiplist_hp_member_less(); - void skiplist_hp_member_cmpmix(); - void skiplist_hp_member_cmp_stat(); - void skiplist_hp_member_less_stat(); - void skiplist_hp_member_cmpmix_stat(); - void skiplist_hp_member_cmp_xorshift(); - void skiplist_hp_member_less_xorshift(); - void skiplist_hp_member_cmpmix_xorshift(); - void skiplist_hp_member_cmp_xorshift_stat(); - void skiplist_hp_member_less_xorshift_stat(); - void skiplist_hp_member_cmpmix_xorshift_stat(); - void skiplist_hp_member_cmp_pascal(); - void skiplist_hp_member_less_pascal(); - void skiplist_hp_member_cmpmix_pascal(); - void skiplist_hp_member_cmp_pascal_stat(); - void skiplist_hp_member_less_pascal_stat(); - void skiplist_hp_member_cmpmix_pascal_stat(); - - // Skip-list - gc::DHP - void skiplist_dhp_base_cmp(); - void skiplist_dhp_base_less(); - void skiplist_dhp_base_cmpmix(); - void skiplist_dhp_base_cmp_stat(); - void skiplist_dhp_base_less_stat(); - void skiplist_dhp_base_cmpmix_stat(); - void skiplist_dhp_base_cmp_xorshift(); - void skiplist_dhp_base_less_xorshift(); - void skiplist_dhp_base_cmpmix_xorshift(); - void skiplist_dhp_base_cmp_xorshift_stat(); - void skiplist_dhp_base_less_xorshift_stat(); - void skiplist_dhp_base_cmpmix_xorshift_stat(); - void skiplist_dhp_base_cmp_pascal(); - void skiplist_dhp_base_less_pascal(); - void skiplist_dhp_base_cmpmix_pascal(); - void skiplist_dhp_base_cmp_pascal_stat(); - void skiplist_dhp_base_less_pascal_stat(); - void skiplist_dhp_base_cmpmix_pascal_stat(); - - void skiplist_dhp_member_cmp(); - void skiplist_dhp_member_less(); - void skiplist_dhp_member_cmpmix(); - void skiplist_dhp_member_cmp_stat(); - void skiplist_dhp_member_less_stat(); - void skiplist_dhp_member_cmpmix_stat(); - void skiplist_dhp_member_cmp_xorshift(); - void skiplist_dhp_member_less_xorshift(); - void skiplist_dhp_member_cmpmix_xorshift(); - void skiplist_dhp_member_cmp_xorshift_stat(); - void skiplist_dhp_member_less_xorshift_stat(); - void skiplist_dhp_member_cmpmix_xorshift_stat(); - void skiplist_dhp_member_cmp_pascal(); - void skiplist_dhp_member_less_pascal(); - void skiplist_dhp_member_cmpmix_pascal(); - void skiplist_dhp_member_cmp_pascal_stat(); - void skiplist_dhp_member_less_pascal_stat(); - void skiplist_dhp_member_cmpmix_pascal_stat(); - - // Skip-list - gc::nogc - void skiplist_nogc_base_cmp(); - void skiplist_nogc_base_less(); - void skiplist_nogc_base_cmpmix(); - void skiplist_nogc_base_cmp_stat(); - void skiplist_nogc_base_less_stat(); - void skiplist_nogc_base_cmpmix_stat(); - void skiplist_nogc_base_cmp_xorshift(); - void skiplist_nogc_base_less_xorshift(); - void skiplist_nogc_base_cmpmix_xorshift(); - void skiplist_nogc_base_cmp_xorshift_stat(); - void skiplist_nogc_base_less_xorshift_stat(); - void skiplist_nogc_base_cmpmix_xorshift_stat(); - void skiplist_nogc_base_cmp_pascal(); - void skiplist_nogc_base_less_pascal(); - void skiplist_nogc_base_cmpmix_pascal(); - void skiplist_nogc_base_cmp_pascal_stat(); - void skiplist_nogc_base_less_pascal_stat(); - void skiplist_nogc_base_cmpmix_pascal_stat(); - - void skiplist_nogc_member_cmp(); - void skiplist_nogc_member_less(); - void skiplist_nogc_member_cmpmix(); - void skiplist_nogc_member_cmp_stat(); - void skiplist_nogc_member_less_stat(); - void skiplist_nogc_member_cmpmix_stat(); - void skiplist_nogc_member_cmp_xorshift(); - void skiplist_nogc_member_less_xorshift(); - void skiplist_nogc_member_cmpmix_xorshift(); - void skiplist_nogc_member_cmp_xorshift_stat(); - void skiplist_nogc_member_less_xorshift_stat(); - void skiplist_nogc_member_cmpmix_xorshift_stat(); - void skiplist_nogc_member_cmp_pascal(); - void skiplist_nogc_member_less_pascal(); - void skiplist_nogc_member_cmpmix_pascal(); - void skiplist_nogc_member_cmp_pascal_stat(); - void skiplist_nogc_member_less_pascal_stat(); - void skiplist_nogc_member_cmpmix_pascal_stat(); - - CPPUNIT_TEST_SUITE(IntrusiveSkipListSet) - CPPUNIT_TEST(skiplist_hp_base_cmp) - CPPUNIT_TEST(skiplist_hp_base_less) - CPPUNIT_TEST(skiplist_hp_base_cmpmix) - CPPUNIT_TEST(skiplist_hp_base_cmp_stat) - CPPUNIT_TEST(skiplist_hp_base_less_stat) - CPPUNIT_TEST(skiplist_hp_base_cmpmix_stat) - CPPUNIT_TEST(skiplist_hp_base_cmp_xorshift) - CPPUNIT_TEST(skiplist_hp_base_less_xorshift) - CPPUNIT_TEST(skiplist_hp_base_cmpmix_xorshift) - CPPUNIT_TEST(skiplist_hp_base_cmp_xorshift_stat) - CPPUNIT_TEST(skiplist_hp_base_less_xorshift_stat) - CPPUNIT_TEST(skiplist_hp_base_cmpmix_xorshift_stat) - CPPUNIT_TEST(skiplist_hp_base_cmp_pascal) - CPPUNIT_TEST(skiplist_hp_base_less_pascal) - CPPUNIT_TEST(skiplist_hp_base_cmpmix_pascal) - CPPUNIT_TEST(skiplist_hp_base_cmp_pascal_stat) - CPPUNIT_TEST(skiplist_hp_base_less_pascal_stat) - CPPUNIT_TEST(skiplist_hp_base_cmpmix_pascal_stat) - - CPPUNIT_TEST(skiplist_hp_member_cmp) - CPPUNIT_TEST(skiplist_hp_member_less) - CPPUNIT_TEST(skiplist_hp_member_cmpmix) - CPPUNIT_TEST(skiplist_hp_member_cmp_stat) - CPPUNIT_TEST(skiplist_hp_member_less_stat) - CPPUNIT_TEST(skiplist_hp_member_cmpmix_stat) - CPPUNIT_TEST(skiplist_hp_member_cmp_xorshift) - CPPUNIT_TEST(skiplist_hp_member_less_xorshift) - CPPUNIT_TEST(skiplist_hp_member_cmpmix_xorshift) - CPPUNIT_TEST(skiplist_hp_member_cmp_xorshift_stat) - CPPUNIT_TEST(skiplist_hp_member_less_xorshift_stat) - CPPUNIT_TEST(skiplist_hp_member_cmpmix_xorshift_stat) - CPPUNIT_TEST(skiplist_hp_member_cmp_pascal) - CPPUNIT_TEST(skiplist_hp_member_less_pascal) - CPPUNIT_TEST(skiplist_hp_member_cmpmix_pascal) - CPPUNIT_TEST(skiplist_hp_member_cmp_pascal_stat) - CPPUNIT_TEST(skiplist_hp_member_less_pascal_stat) - CPPUNIT_TEST(skiplist_hp_member_cmpmix_pascal_stat) - - CPPUNIT_TEST(skiplist_dhp_base_cmp) - CPPUNIT_TEST(skiplist_dhp_base_less) - CPPUNIT_TEST(skiplist_dhp_base_cmpmix) - CPPUNIT_TEST(skiplist_dhp_base_cmp_stat) - CPPUNIT_TEST(skiplist_dhp_base_less_stat) - CPPUNIT_TEST(skiplist_dhp_base_cmpmix_stat) - CPPUNIT_TEST(skiplist_dhp_base_cmp_xorshift) - CPPUNIT_TEST(skiplist_dhp_base_less_xorshift) - CPPUNIT_TEST(skiplist_dhp_base_cmpmix_xorshift) - CPPUNIT_TEST(skiplist_dhp_base_cmp_xorshift_stat) - CPPUNIT_TEST(skiplist_dhp_base_less_xorshift_stat) - CPPUNIT_TEST(skiplist_dhp_base_cmpmix_xorshift_stat) - CPPUNIT_TEST(skiplist_dhp_base_cmp_pascal) - CPPUNIT_TEST(skiplist_dhp_base_less_pascal) - CPPUNIT_TEST(skiplist_dhp_base_cmpmix_pascal) - CPPUNIT_TEST(skiplist_dhp_base_cmp_pascal_stat) - CPPUNIT_TEST(skiplist_dhp_base_less_pascal_stat) - CPPUNIT_TEST(skiplist_dhp_base_cmpmix_pascal_stat) - - CPPUNIT_TEST(skiplist_dhp_member_cmp) - CPPUNIT_TEST(skiplist_dhp_member_less) - CPPUNIT_TEST(skiplist_dhp_member_cmpmix) - CPPUNIT_TEST(skiplist_dhp_member_cmp_stat) - CPPUNIT_TEST(skiplist_dhp_member_less_stat) - CPPUNIT_TEST(skiplist_dhp_member_cmpmix_stat) - CPPUNIT_TEST(skiplist_dhp_member_cmp_xorshift) - CPPUNIT_TEST(skiplist_dhp_member_less_xorshift) - CPPUNIT_TEST(skiplist_dhp_member_cmpmix_xorshift) - CPPUNIT_TEST(skiplist_dhp_member_cmp_xorshift_stat) - CPPUNIT_TEST(skiplist_dhp_member_less_xorshift_stat) - CPPUNIT_TEST(skiplist_dhp_member_cmpmix_xorshift_stat) - CPPUNIT_TEST(skiplist_dhp_member_cmp_pascal) - CPPUNIT_TEST(skiplist_dhp_member_less_pascal) - CPPUNIT_TEST(skiplist_dhp_member_cmpmix_pascal) - CPPUNIT_TEST(skiplist_dhp_member_cmp_pascal_stat) - CPPUNIT_TEST(skiplist_dhp_member_less_pascal_stat) - CPPUNIT_TEST(skiplist_dhp_member_cmpmix_pascal_stat) - - CPPUNIT_TEST(skiplist_nogc_base_cmp) - CPPUNIT_TEST(skiplist_nogc_base_less) - CPPUNIT_TEST(skiplist_nogc_base_cmpmix) - CPPUNIT_TEST(skiplist_nogc_base_cmp_stat) - CPPUNIT_TEST(skiplist_nogc_base_less_stat) - CPPUNIT_TEST(skiplist_nogc_base_cmpmix_stat) - CPPUNIT_TEST(skiplist_nogc_base_cmp_xorshift) - CPPUNIT_TEST(skiplist_nogc_base_less_xorshift) - CPPUNIT_TEST(skiplist_nogc_base_cmpmix_xorshift) - CPPUNIT_TEST(skiplist_nogc_base_cmp_xorshift_stat) - CPPUNIT_TEST(skiplist_nogc_base_less_xorshift_stat) - CPPUNIT_TEST(skiplist_nogc_base_cmpmix_xorshift_stat) - CPPUNIT_TEST(skiplist_nogc_base_cmp_pascal) - CPPUNIT_TEST(skiplist_nogc_base_less_pascal) - CPPUNIT_TEST(skiplist_nogc_base_cmpmix_pascal) - CPPUNIT_TEST(skiplist_nogc_base_cmp_pascal_stat) - CPPUNIT_TEST(skiplist_nogc_base_less_pascal_stat) - CPPUNIT_TEST(skiplist_nogc_base_cmpmix_pascal_stat) - - CPPUNIT_TEST(skiplist_nogc_member_cmp) - CPPUNIT_TEST(skiplist_nogc_member_less) - CPPUNIT_TEST(skiplist_nogc_member_cmpmix) - CPPUNIT_TEST(skiplist_nogc_member_cmp_stat) - CPPUNIT_TEST(skiplist_nogc_member_less_stat) - CPPUNIT_TEST(skiplist_nogc_member_cmpmix_stat) - CPPUNIT_TEST(skiplist_nogc_member_cmp_xorshift) - CPPUNIT_TEST(skiplist_nogc_member_less_xorshift) - CPPUNIT_TEST(skiplist_nogc_member_cmpmix_xorshift) - CPPUNIT_TEST(skiplist_nogc_member_cmp_xorshift_stat) - CPPUNIT_TEST(skiplist_nogc_member_less_xorshift_stat) - CPPUNIT_TEST(skiplist_nogc_member_cmpmix_xorshift_stat) - CPPUNIT_TEST(skiplist_nogc_member_cmp_pascal) - CPPUNIT_TEST(skiplist_nogc_member_less_pascal) - CPPUNIT_TEST(skiplist_nogc_member_cmpmix_pascal) - CPPUNIT_TEST(skiplist_nogc_member_cmp_pascal_stat) - CPPUNIT_TEST(skiplist_nogc_member_less_pascal_stat) - CPPUNIT_TEST(skiplist_nogc_member_cmpmix_pascal_stat) - - CPPUNIT_TEST_SUITE_END() - }; -} // namespace set - -#endif // #ifndef CDSTEST_HDR_INTRUSIVE_SKIPLIST_SET_H diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_set_rcu.h b/tests/test-hdr/set/hdr_intrusive_skiplist_set_rcu.h deleted file mode 100644 index a9c5f757..00000000 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_set_rcu.h +++ /dev/null @@ -1,824 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_INTRUSIVE_SKIPLIST_SET_RCU_H -#define CDSTEST_HDR_INTRUSIVE_SKIPLIST_SET_RCU_H - -#include "set/hdr_intrusive_set.h" - -namespace set { - - class IntrusiveSkipListSetRCU: public IntrusiveHashSetHdrTest - { - typedef IntrusiveHashSetHdrTest base_class; - - static size_t const c_nArrSize = 1000; - - template - struct extract_disposer { - void operator()( typename Set::value_type * pVal ) const - { - pVal->nVal = 0; - } - }; - - protected: - struct other_key { - int nKey; - - other_key() - {} - - other_key( int key ) - : nKey(key) - {} - - template - other_key& operator=( Q const& src ) - { - nKey = src.nKey; - return *this; - } - }; - - template - struct other_key_less - { - bool operator ()( StoredType const& n, other_key k ) const - { - return n.nKey < k.nKey; - } - bool operator ()( other_key k, StoredType const& n ) const - { - return k.nKey < n.nKey; - } - }; - - struct copy_other_key - { - template - void operator()( other_key& dest, Q const& src ) const - { - dest.nKey = src.nKey; - } - }; - - protected: - - template - void test_skiplist() - { - { - Set s; - base_class::test_int_with( s ); - } - - test_skiplist_(); - } - - template - void test_skiplist_() - { - Set s; - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - typedef typename Set::gc::scoped_lock rcu_lock; - typedef typename Set::value_type value_type; - typedef typename Set::iterator set_iterator; - typedef typename Set::const_iterator const_set_iterator; - - value_type v[c_nArrSize]; - int nCount = 0; - int nPrevKey = 0; - - // Test iterator - ascending order - for ( int i = 0; i < (int) (sizeof(v)/sizeof(v[0])); ++i ) { - v[i].nKey = i; - v[i].nVal = i * 2; - - CPPUNIT_ASSERT( s.insert( v[i] )); - } - CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) )); - - //CPPUNIT_MSG( PrintStat()(s, "Iterator test, ascending insert order") ); - - nCount = 0; - nPrevKey = 0; - { - rcu_lock l; - for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal ); - CPPUNIT_ASSERT( s.contains( it->nKey )); - it->nVal = (*it).nKey; - ++nCount; - if ( it != s.begin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - } - CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) )); - CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0])); - - nCount = 0; - { - rcu_lock l; - for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey == it->nVal ); - ++nCount; - if ( it != s.cbegin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - } - CPPUNIT_CHECK( check_size( s, sizeof(v)/sizeof(v[0]) )); - CPPUNIT_CHECK( nCount == sizeof(v)/sizeof(v[0])); - - for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) { - CPPUNIT_ASSERT( v[i].nKey == v[i].nVal ); - CPPUNIT_ASSERT( s.contains( v[i].nKey )); - } - - s.clear(); - CPPUNIT_CHECK( s.empty() ); - CPPUNIT_CHECK( check_size( s, 0)); - Set::gc::force_dispose(); - - for ( size_t i = 0; i < (int) sizeof(v)/sizeof(v[0]); ++i ) { - CPPUNIT_CHECK( v[i].nDisposeCount == 1 ); - } - - // Test iterator - descending order - for ( int i = (int) sizeof(v)/sizeof(v[0]) - 1; i >= 0; --i ) { - v[i].nKey = i; - v[i].nVal = i * 2; - - CPPUNIT_ASSERT( s.insert( v[i] )); - } - CPPUNIT_CHECK( check_size( s, sizeof(v)/sizeof(v[0]) )); - - //CPPUNIT_MSG( PrintStat()(s, "Iterator test, descending insert order") ); - - nCount = 0; - { - rcu_lock l; - for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal ); - it->nVal = (*it).nKey; - ++nCount; - if ( it != s.begin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - } - CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) )); - CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0])); - - nCount = 0; - { - rcu_lock l; - for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey == it->nVal ); - ++nCount; - if ( it != s.cbegin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - } - CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) )); - CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0])); - - for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) { - CPPUNIT_ASSERT( v[i].nKey == v[i].nVal ); - } - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - Set::gc::force_dispose(); - - for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) { - CPPUNIT_ASSERT( v[i].nDisposeCount == 2 ); - } - - // Test iterator - random order - fill_skiplist( s, v ); - CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) )); - //CPPUNIT_MSG( PrintStat()(s, "Iterator test, random insert order") ); - - nCount = 0; - { - rcu_lock l; - for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal ); - it->nVal = (*it).nKey; - ++nCount; - if ( it != s.begin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - } - CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) )); - CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0])); - - nCount = 0; - { - rcu_lock l; - for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey == it->nVal ); - ++nCount; - if ( it != s.cbegin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - } - CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) )); - CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0])); - - for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) { - CPPUNIT_ASSERT( v[i].nKey == v[i].nVal ); - } - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - Set::gc::force_dispose(); - - for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) { - CPPUNIT_ASSERT( v[i].nDisposeCount == 3 ); - } - - // extract/get test - { - typename Set::exempt_ptr ep; - typename Set::raw_ptr rp; - // extract - { - fill_skiplist( s, v ); - - for ( int i = c_nArrSize - 1; i >= 0; i -= 1 ) { - { - rcu_lock l; - rp = s.get( i ); - CPPUNIT_ASSERT( rp ); - CPPUNIT_CHECK( rp->nKey == i ); - CPPUNIT_CHECK( rp->nVal == i * 2 ); - rp->nVal *= 2; - } - rp.release(); - - ep = s.extract( i ); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty() ); - CPPUNIT_CHECK( ep->nKey == i ); - CPPUNIT_CHECK( ep->nVal == i * 4 ); - ep.release(); - - { - rcu_lock l; - CPPUNIT_CHECK( !s.get( i )); - } - ep = s.extract( i ); - CPPUNIT_CHECK( !ep ); - CPPUNIT_ASSERT( ep.empty() ); - } - CPPUNIT_CHECK( s.empty() ); - } - Set::gc::force_dispose(); - - // extract_with - { - fill_skiplist( s, v ); - for ( int i = c_nArrSize - 1; i >= 0; i -= 1 ) { - { - rcu_lock l; - rp = s.get_with( other_key(i), other_key_less() ); - CPPUNIT_ASSERT( rp ); - CPPUNIT_CHECK( rp->nKey == i ); - CPPUNIT_CHECK( rp->nVal == i * 2 ); - rp->nVal *= 2; - } - rp.release(); - - ep = s.extract_with( other_key( i ), other_key_less() ); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty() ); - CPPUNIT_CHECK( ep->nKey == i ); - CPPUNIT_CHECK( ep->nVal == i * 4 ); - ep.release(); - - { - rcu_lock l; - CPPUNIT_CHECK( !s.get_with( other_key( i ), other_key_less() )); - } - ep = s.extract_with( other_key( i ), other_key_less() ); - CPPUNIT_CHECK( !ep ); - } - CPPUNIT_CHECK( s.empty() ); - } - Set::gc::force_dispose(); - - // extract_min - { - fill_skiplist( s, v ); - int nPrevKey; - - ep = s.extract_min(); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty()); - nPrevKey = ep->nKey; - ep.release(); - - while ( !s.empty() ) { - ep = s.extract_min(); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty()); - CPPUNIT_CHECK( ep->nKey == nPrevKey + 1 ); - CPPUNIT_CHECK( ep->nVal == (nPrevKey + 1) * 2 ); - nPrevKey = ep->nKey; - ep.release(); - } - ep = s.extract_min(); - CPPUNIT_CHECK( !ep ); - CPPUNIT_CHECK( !s.extract_max() ); - } - Set::gc::force_dispose(); - - // extract_max - { - fill_skiplist( s, v ); - int nPrevKey; - - ep = s.extract_max(); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty()); - nPrevKey = ep->nKey; - ep.release(); - - while ( !s.empty() ) { - ep = s.extract_max(); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty()); - CPPUNIT_CHECK( ep->nKey == nPrevKey - 1 ); - CPPUNIT_CHECK( ep->nVal == (nPrevKey - 1) * 2 ); - nPrevKey = ep->nKey; - ep.release(); - } - ep = s.extract_min(); - CPPUNIT_CHECK( !ep ); - CPPUNIT_CHECK( !s.extract_max() ); - } - Set::gc::force_dispose(); - } - - CPPUNIT_MSG( PrintStat()(s, nullptr) ); - } - - template - void fill_skiplist( Set& s, typename Set::value_type * pArr ) - { - int nRand[c_nArrSize]; - for ( int i = 0; i < (int) c_nArrSize; ++i ) { - nRand[i] = i; - } - shuffle( nRand, nRand + c_nArrSize ); - - for ( int i = 0; i < (int) c_nArrSize; ++i ) { - pArr[i].nKey = nRand[i]; - pArr[i].nVal = nRand[i] * 2; - CPPUNIT_ASSERT( s.insert( pArr[i] )); - } - CPPUNIT_CHECK( check_size( s, c_nArrSize )); - } - - public: - - // Skip-list RCU - void skiplist_rcu_gpi_base_cmp(); - void skiplist_rcu_gpi_base_less(); - void skiplist_rcu_gpi_base_cmpmix(); - void skiplist_rcu_gpi_base_cmp_stat(); - void skiplist_rcu_gpi_base_less_stat(); - void skiplist_rcu_gpi_base_cmpmix_stat(); - void skiplist_rcu_gpi_base_cmp_xorshift(); - void skiplist_rcu_gpi_base_less_xorshift(); - void skiplist_rcu_gpi_base_cmpmix_xorshift(); - void skiplist_rcu_gpi_base_cmp_xorshift_stat(); - void skiplist_rcu_gpi_base_less_xorshift_stat(); - void skiplist_rcu_gpi_base_cmpmix_xorshift_stat(); - void skiplist_rcu_gpi_base_cmp_pascal(); - void skiplist_rcu_gpi_base_less_pascal(); - void skiplist_rcu_gpi_base_cmpmix_pascal(); - void skiplist_rcu_gpi_base_cmp_pascal_stat(); - void skiplist_rcu_gpi_base_less_pascal_stat(); - void skiplist_rcu_gpi_base_cmpmix_pascal_stat(); - - void skiplist_rcu_gpi_member_cmp(); - void skiplist_rcu_gpi_member_less(); - void skiplist_rcu_gpi_member_cmpmix(); - void skiplist_rcu_gpi_member_cmp_stat(); - void skiplist_rcu_gpi_member_less_stat(); - void skiplist_rcu_gpi_member_cmpmix_stat(); - void skiplist_rcu_gpi_member_cmp_xorshift(); - void skiplist_rcu_gpi_member_less_xorshift(); - void skiplist_rcu_gpi_member_cmpmix_xorshift(); - void skiplist_rcu_gpi_member_cmp_xorshift_stat(); - void skiplist_rcu_gpi_member_less_xorshift_stat(); - void skiplist_rcu_gpi_member_cmpmix_xorshift_stat(); - void skiplist_rcu_gpi_member_cmp_pascal(); - void skiplist_rcu_gpi_member_less_pascal(); - void skiplist_rcu_gpi_member_cmpmix_pascal(); - void skiplist_rcu_gpi_member_cmp_pascal_stat(); - void skiplist_rcu_gpi_member_less_pascal_stat(); - void skiplist_rcu_gpi_member_cmpmix_pascal_stat(); - - // general_buffered - void skiplist_rcu_gpb_base_cmp(); - void skiplist_rcu_gpb_base_less(); - void skiplist_rcu_gpb_base_cmpmix(); - void skiplist_rcu_gpb_base_cmp_stat(); - void skiplist_rcu_gpb_base_less_stat(); - void skiplist_rcu_gpb_base_cmpmix_stat(); - void skiplist_rcu_gpb_base_cmp_xorshift(); - void skiplist_rcu_gpb_base_less_xorshift(); - void skiplist_rcu_gpb_base_cmpmix_xorshift(); - void skiplist_rcu_gpb_base_cmp_xorshift_stat(); - void skiplist_rcu_gpb_base_less_xorshift_stat(); - void skiplist_rcu_gpb_base_cmpmix_xorshift_stat(); - void skiplist_rcu_gpb_base_cmp_pascal(); - void skiplist_rcu_gpb_base_less_pascal(); - void skiplist_rcu_gpb_base_cmpmix_pascal(); - void skiplist_rcu_gpb_base_cmp_pascal_stat(); - void skiplist_rcu_gpb_base_less_pascal_stat(); - void skiplist_rcu_gpb_base_cmpmix_pascal_stat(); - - void skiplist_rcu_gpb_member_cmp(); - void skiplist_rcu_gpb_member_less(); - void skiplist_rcu_gpb_member_cmpmix(); - void skiplist_rcu_gpb_member_cmp_stat(); - void skiplist_rcu_gpb_member_less_stat(); - void skiplist_rcu_gpb_member_cmpmix_stat(); - void skiplist_rcu_gpb_member_cmp_xorshift(); - void skiplist_rcu_gpb_member_less_xorshift(); - void skiplist_rcu_gpb_member_cmpmix_xorshift(); - void skiplist_rcu_gpb_member_cmp_xorshift_stat(); - void skiplist_rcu_gpb_member_less_xorshift_stat(); - void skiplist_rcu_gpb_member_cmpmix_xorshift_stat(); - void skiplist_rcu_gpb_member_cmp_pascal(); - void skiplist_rcu_gpb_member_less_pascal(); - void skiplist_rcu_gpb_member_cmpmix_pascal(); - void skiplist_rcu_gpb_member_cmp_pascal_stat(); - void skiplist_rcu_gpb_member_less_pascal_stat(); - void skiplist_rcu_gpb_member_cmpmix_pascal_stat(); - - // general_threaded - void skiplist_rcu_gpt_base_cmp(); - void skiplist_rcu_gpt_base_less(); - void skiplist_rcu_gpt_base_cmpmix(); - void skiplist_rcu_gpt_base_cmp_stat(); - void skiplist_rcu_gpt_base_less_stat(); - void skiplist_rcu_gpt_base_cmpmix_stat(); - void skiplist_rcu_gpt_base_cmp_xorshift(); - void skiplist_rcu_gpt_base_less_xorshift(); - void skiplist_rcu_gpt_base_cmpmix_xorshift(); - void skiplist_rcu_gpt_base_cmp_xorshift_stat(); - void skiplist_rcu_gpt_base_less_xorshift_stat(); - void skiplist_rcu_gpt_base_cmpmix_xorshift_stat(); - void skiplist_rcu_gpt_base_cmp_pascal(); - void skiplist_rcu_gpt_base_less_pascal(); - void skiplist_rcu_gpt_base_cmpmix_pascal(); - void skiplist_rcu_gpt_base_cmp_pascal_stat(); - void skiplist_rcu_gpt_base_less_pascal_stat(); - void skiplist_rcu_gpt_base_cmpmix_pascal_stat(); - - void skiplist_rcu_gpt_member_cmp(); - void skiplist_rcu_gpt_member_less(); - void skiplist_rcu_gpt_member_cmpmix(); - void skiplist_rcu_gpt_member_cmp_stat(); - void skiplist_rcu_gpt_member_less_stat(); - void skiplist_rcu_gpt_member_cmpmix_stat(); - void skiplist_rcu_gpt_member_cmp_xorshift(); - void skiplist_rcu_gpt_member_less_xorshift(); - void skiplist_rcu_gpt_member_cmpmix_xorshift(); - void skiplist_rcu_gpt_member_cmp_xorshift_stat(); - void skiplist_rcu_gpt_member_less_xorshift_stat(); - void skiplist_rcu_gpt_member_cmpmix_xorshift_stat(); - void skiplist_rcu_gpt_member_cmp_pascal(); - void skiplist_rcu_gpt_member_less_pascal(); - void skiplist_rcu_gpt_member_cmpmix_pascal(); - void skiplist_rcu_gpt_member_cmp_pascal_stat(); - void skiplist_rcu_gpt_member_less_pascal_stat(); - void skiplist_rcu_gpt_member_cmpmix_pascal_stat(); - - // signal_buffered - void skiplist_rcu_shb_base_cmp(); - void skiplist_rcu_shb_base_less(); - void skiplist_rcu_shb_base_cmpmix(); - void skiplist_rcu_shb_base_cmp_stat(); - void skiplist_rcu_shb_base_less_stat(); - void skiplist_rcu_shb_base_cmpmix_stat(); - void skiplist_rcu_shb_base_cmp_xorshift(); - void skiplist_rcu_shb_base_less_xorshift(); - void skiplist_rcu_shb_base_cmpmix_xorshift(); - void skiplist_rcu_shb_base_cmp_xorshift_stat(); - void skiplist_rcu_shb_base_less_xorshift_stat(); - void skiplist_rcu_shb_base_cmpmix_xorshift_stat(); - void skiplist_rcu_shb_base_cmp_pascal(); - void skiplist_rcu_shb_base_less_pascal(); - void skiplist_rcu_shb_base_cmpmix_pascal(); - void skiplist_rcu_shb_base_cmp_pascal_stat(); - void skiplist_rcu_shb_base_less_pascal_stat(); - void skiplist_rcu_shb_base_cmpmix_pascal_stat(); - - void skiplist_rcu_shb_member_cmp(); - void skiplist_rcu_shb_member_less(); - void skiplist_rcu_shb_member_cmpmix(); - void skiplist_rcu_shb_member_cmp_stat(); - void skiplist_rcu_shb_member_less_stat(); - void skiplist_rcu_shb_member_cmpmix_stat(); - void skiplist_rcu_shb_member_cmp_xorshift(); - void skiplist_rcu_shb_member_less_xorshift(); - void skiplist_rcu_shb_member_cmpmix_xorshift(); - void skiplist_rcu_shb_member_cmp_xorshift_stat(); - void skiplist_rcu_shb_member_less_xorshift_stat(); - void skiplist_rcu_shb_member_cmpmix_xorshift_stat(); - void skiplist_rcu_shb_member_cmp_pascal(); - void skiplist_rcu_shb_member_less_pascal(); - void skiplist_rcu_shb_member_cmpmix_pascal(); - void skiplist_rcu_shb_member_cmp_pascal_stat(); - void skiplist_rcu_shb_member_less_pascal_stat(); - void skiplist_rcu_shb_member_cmpmix_pascal_stat(); - - // signal_threaded - void skiplist_rcu_sht_base_cmp(); - void skiplist_rcu_sht_base_less(); - void skiplist_rcu_sht_base_cmpmix(); - void skiplist_rcu_sht_base_cmp_stat(); - void skiplist_rcu_sht_base_less_stat(); - void skiplist_rcu_sht_base_cmpmix_stat(); - void skiplist_rcu_sht_base_cmp_xorshift(); - void skiplist_rcu_sht_base_less_xorshift(); - void skiplist_rcu_sht_base_cmpmix_xorshift(); - void skiplist_rcu_sht_base_cmp_xorshift_stat(); - void skiplist_rcu_sht_base_less_xorshift_stat(); - void skiplist_rcu_sht_base_cmpmix_xorshift_stat(); - void skiplist_rcu_sht_base_cmp_pascal(); - void skiplist_rcu_sht_base_less_pascal(); - void skiplist_rcu_sht_base_cmpmix_pascal(); - void skiplist_rcu_sht_base_cmp_pascal_stat(); - void skiplist_rcu_sht_base_less_pascal_stat(); - void skiplist_rcu_sht_base_cmpmix_pascal_stat(); - - void skiplist_rcu_sht_member_cmp(); - void skiplist_rcu_sht_member_less(); - void skiplist_rcu_sht_member_cmpmix(); - void skiplist_rcu_sht_member_cmp_stat(); - void skiplist_rcu_sht_member_less_stat(); - void skiplist_rcu_sht_member_cmpmix_stat(); - void skiplist_rcu_sht_member_cmp_xorshift(); - void skiplist_rcu_sht_member_less_xorshift(); - void skiplist_rcu_sht_member_cmpmix_xorshift(); - void skiplist_rcu_sht_member_cmp_xorshift_stat(); - void skiplist_rcu_sht_member_less_xorshift_stat(); - void skiplist_rcu_sht_member_cmpmix_xorshift_stat(); - void skiplist_rcu_sht_member_cmp_pascal(); - void skiplist_rcu_sht_member_less_pascal(); - void skiplist_rcu_sht_member_cmpmix_pascal(); - void skiplist_rcu_sht_member_cmp_pascal_stat(); - void skiplist_rcu_sht_member_less_pascal_stat(); - void skiplist_rcu_sht_member_cmpmix_pascal_stat(); - - CPPUNIT_TEST_SUITE(IntrusiveSkipListSetRCU) - CPPUNIT_TEST(skiplist_rcu_gpi_base_cmp) - CPPUNIT_TEST(skiplist_rcu_gpi_base_less) - CPPUNIT_TEST(skiplist_rcu_gpi_base_cmpmix) - CPPUNIT_TEST(skiplist_rcu_gpi_base_cmp_stat) - CPPUNIT_TEST(skiplist_rcu_gpi_base_less_stat) - CPPUNIT_TEST(skiplist_rcu_gpi_base_cmpmix_stat) - CPPUNIT_TEST(skiplist_rcu_gpi_base_cmp_xorshift) - CPPUNIT_TEST(skiplist_rcu_gpi_base_less_xorshift) - CPPUNIT_TEST(skiplist_rcu_gpi_base_cmpmix_xorshift) - CPPUNIT_TEST(skiplist_rcu_gpi_base_cmp_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_gpi_base_less_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_gpi_base_cmpmix_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_gpi_base_cmp_pascal) - CPPUNIT_TEST(skiplist_rcu_gpi_base_less_pascal) - CPPUNIT_TEST(skiplist_rcu_gpi_base_cmpmix_pascal) - CPPUNIT_TEST(skiplist_rcu_gpi_base_cmp_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_gpi_base_less_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_gpi_base_cmpmix_pascal_stat) - - CPPUNIT_TEST(skiplist_rcu_gpi_member_cmp) - CPPUNIT_TEST(skiplist_rcu_gpi_member_less) - CPPUNIT_TEST(skiplist_rcu_gpi_member_cmpmix) - CPPUNIT_TEST(skiplist_rcu_gpi_member_cmp_stat) - CPPUNIT_TEST(skiplist_rcu_gpi_member_less_stat) - CPPUNIT_TEST(skiplist_rcu_gpi_member_cmpmix_stat) - CPPUNIT_TEST(skiplist_rcu_gpi_member_cmp_xorshift) - CPPUNIT_TEST(skiplist_rcu_gpi_member_less_xorshift) - CPPUNIT_TEST(skiplist_rcu_gpi_member_cmpmix_xorshift) - CPPUNIT_TEST(skiplist_rcu_gpi_member_cmp_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_gpi_member_less_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_gpi_member_cmpmix_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_gpi_member_cmp_pascal) - CPPUNIT_TEST(skiplist_rcu_gpi_member_less_pascal) - CPPUNIT_TEST(skiplist_rcu_gpi_member_cmpmix_pascal) - CPPUNIT_TEST(skiplist_rcu_gpi_member_cmp_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_gpi_member_less_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_gpi_member_cmpmix_pascal_stat) - - // - CPPUNIT_TEST(skiplist_rcu_gpb_base_cmp) - CPPUNIT_TEST(skiplist_rcu_gpb_base_less) - CPPUNIT_TEST(skiplist_rcu_gpb_base_cmpmix) - CPPUNIT_TEST(skiplist_rcu_gpb_base_cmp_stat) - CPPUNIT_TEST(skiplist_rcu_gpb_base_less_stat) - CPPUNIT_TEST(skiplist_rcu_gpb_base_cmpmix_stat) - CPPUNIT_TEST(skiplist_rcu_gpb_base_cmp_xorshift) - CPPUNIT_TEST(skiplist_rcu_gpb_base_less_xorshift) - CPPUNIT_TEST(skiplist_rcu_gpb_base_cmpmix_xorshift) - CPPUNIT_TEST(skiplist_rcu_gpb_base_cmp_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_gpb_base_less_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_gpb_base_cmpmix_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_gpb_base_cmp_pascal) - CPPUNIT_TEST(skiplist_rcu_gpb_base_less_pascal) - CPPUNIT_TEST(skiplist_rcu_gpb_base_cmpmix_pascal) - CPPUNIT_TEST(skiplist_rcu_gpb_base_cmp_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_gpb_base_less_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_gpb_base_cmpmix_pascal_stat) - - CPPUNIT_TEST(skiplist_rcu_gpb_member_cmp) - CPPUNIT_TEST(skiplist_rcu_gpb_member_less) - CPPUNIT_TEST(skiplist_rcu_gpb_member_cmpmix) - CPPUNIT_TEST(skiplist_rcu_gpb_member_cmp_stat) - CPPUNIT_TEST(skiplist_rcu_gpb_member_less_stat) - CPPUNIT_TEST(skiplist_rcu_gpb_member_cmpmix_stat) - CPPUNIT_TEST(skiplist_rcu_gpb_member_cmp_xorshift) - CPPUNIT_TEST(skiplist_rcu_gpb_member_less_xorshift) - CPPUNIT_TEST(skiplist_rcu_gpb_member_cmpmix_xorshift) - CPPUNIT_TEST(skiplist_rcu_gpb_member_cmp_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_gpb_member_less_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_gpb_member_cmpmix_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_gpb_member_cmp_pascal) - CPPUNIT_TEST(skiplist_rcu_gpb_member_less_pascal) - CPPUNIT_TEST(skiplist_rcu_gpb_member_cmpmix_pascal) - CPPUNIT_TEST(skiplist_rcu_gpb_member_cmp_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_gpb_member_less_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_gpb_member_cmpmix_pascal_stat) - - // - CPPUNIT_TEST(skiplist_rcu_gpt_base_cmp) - CPPUNIT_TEST(skiplist_rcu_gpt_base_less) - CPPUNIT_TEST(skiplist_rcu_gpt_base_cmpmix) - CPPUNIT_TEST(skiplist_rcu_gpt_base_cmp_stat) - CPPUNIT_TEST(skiplist_rcu_gpt_base_less_stat) - CPPUNIT_TEST(skiplist_rcu_gpt_base_cmpmix_stat) - CPPUNIT_TEST(skiplist_rcu_gpt_base_cmp_xorshift) - CPPUNIT_TEST(skiplist_rcu_gpt_base_less_xorshift) - CPPUNIT_TEST(skiplist_rcu_gpt_base_cmpmix_xorshift) - CPPUNIT_TEST(skiplist_rcu_gpt_base_cmp_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_gpt_base_less_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_gpt_base_cmpmix_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_gpt_base_cmp_pascal) - CPPUNIT_TEST(skiplist_rcu_gpt_base_less_pascal) - CPPUNIT_TEST(skiplist_rcu_gpt_base_cmpmix_pascal) - CPPUNIT_TEST(skiplist_rcu_gpt_base_cmp_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_gpt_base_less_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_gpt_base_cmpmix_pascal_stat) - - CPPUNIT_TEST(skiplist_rcu_gpt_member_cmp) - CPPUNIT_TEST(skiplist_rcu_gpt_member_less) - CPPUNIT_TEST(skiplist_rcu_gpt_member_cmpmix) - CPPUNIT_TEST(skiplist_rcu_gpt_member_cmp_stat) - CPPUNIT_TEST(skiplist_rcu_gpt_member_less_stat) - CPPUNIT_TEST(skiplist_rcu_gpt_member_cmpmix_stat) - CPPUNIT_TEST(skiplist_rcu_gpt_member_cmp_xorshift) - CPPUNIT_TEST(skiplist_rcu_gpt_member_less_xorshift) - CPPUNIT_TEST(skiplist_rcu_gpt_member_cmpmix_xorshift) - CPPUNIT_TEST(skiplist_rcu_gpt_member_cmp_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_gpt_member_less_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_gpt_member_cmpmix_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_gpt_member_cmp_pascal) - CPPUNIT_TEST(skiplist_rcu_gpt_member_less_pascal) - CPPUNIT_TEST(skiplist_rcu_gpt_member_cmpmix_pascal) - CPPUNIT_TEST(skiplist_rcu_gpt_member_cmp_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_gpt_member_less_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_gpt_member_cmpmix_pascal_stat) - - // - CPPUNIT_TEST(skiplist_rcu_shb_base_cmp) - CPPUNIT_TEST(skiplist_rcu_shb_base_less) - CPPUNIT_TEST(skiplist_rcu_shb_base_cmpmix) - CPPUNIT_TEST(skiplist_rcu_shb_base_cmp_stat) - CPPUNIT_TEST(skiplist_rcu_shb_base_less_stat) - CPPUNIT_TEST(skiplist_rcu_shb_base_cmpmix_stat) - CPPUNIT_TEST(skiplist_rcu_shb_base_cmp_xorshift) - CPPUNIT_TEST(skiplist_rcu_shb_base_less_xorshift) - CPPUNIT_TEST(skiplist_rcu_shb_base_cmpmix_xorshift) - CPPUNIT_TEST(skiplist_rcu_shb_base_cmp_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_shb_base_less_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_shb_base_cmpmix_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_shb_base_cmp_pascal) - CPPUNIT_TEST(skiplist_rcu_shb_base_less_pascal) - CPPUNIT_TEST(skiplist_rcu_shb_base_cmpmix_pascal) - CPPUNIT_TEST(skiplist_rcu_shb_base_cmp_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_shb_base_less_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_shb_base_cmpmix_pascal_stat) - - CPPUNIT_TEST(skiplist_rcu_shb_member_cmp) - CPPUNIT_TEST(skiplist_rcu_shb_member_less) - CPPUNIT_TEST(skiplist_rcu_shb_member_cmpmix) - CPPUNIT_TEST(skiplist_rcu_shb_member_cmp_stat) - CPPUNIT_TEST(skiplist_rcu_shb_member_less_stat) - CPPUNIT_TEST(skiplist_rcu_shb_member_cmpmix_stat) - CPPUNIT_TEST(skiplist_rcu_shb_member_cmp_xorshift) - CPPUNIT_TEST(skiplist_rcu_shb_member_less_xorshift) - CPPUNIT_TEST(skiplist_rcu_shb_member_cmpmix_xorshift) - CPPUNIT_TEST(skiplist_rcu_shb_member_cmp_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_shb_member_less_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_shb_member_cmpmix_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_shb_member_cmp_pascal) - CPPUNIT_TEST(skiplist_rcu_shb_member_less_pascal) - CPPUNIT_TEST(skiplist_rcu_shb_member_cmpmix_pascal) - CPPUNIT_TEST(skiplist_rcu_shb_member_cmp_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_shb_member_less_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_shb_member_cmpmix_pascal_stat) - - // - CPPUNIT_TEST(skiplist_rcu_sht_base_cmp) - CPPUNIT_TEST(skiplist_rcu_sht_base_less) - CPPUNIT_TEST(skiplist_rcu_sht_base_cmpmix) - CPPUNIT_TEST(skiplist_rcu_sht_base_cmp_stat) - CPPUNIT_TEST(skiplist_rcu_sht_base_less_stat) - CPPUNIT_TEST(skiplist_rcu_sht_base_cmpmix_stat) - CPPUNIT_TEST(skiplist_rcu_sht_base_cmp_xorshift) - CPPUNIT_TEST(skiplist_rcu_sht_base_less_xorshift) - CPPUNIT_TEST(skiplist_rcu_sht_base_cmpmix_xorshift) - CPPUNIT_TEST(skiplist_rcu_sht_base_cmp_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_sht_base_less_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_sht_base_cmpmix_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_sht_base_cmp_pascal) - CPPUNIT_TEST(skiplist_rcu_sht_base_less_pascal) - CPPUNIT_TEST(skiplist_rcu_sht_base_cmpmix_pascal) - CPPUNIT_TEST(skiplist_rcu_sht_base_cmp_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_sht_base_less_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_sht_base_cmpmix_pascal_stat) - - CPPUNIT_TEST(skiplist_rcu_sht_member_cmp) - CPPUNIT_TEST(skiplist_rcu_sht_member_less) - CPPUNIT_TEST(skiplist_rcu_sht_member_cmpmix) - CPPUNIT_TEST(skiplist_rcu_sht_member_cmp_stat) - CPPUNIT_TEST(skiplist_rcu_sht_member_less_stat) - CPPUNIT_TEST(skiplist_rcu_sht_member_cmpmix_stat) - CPPUNIT_TEST(skiplist_rcu_sht_member_cmp_xorshift) - CPPUNIT_TEST(skiplist_rcu_sht_member_less_xorshift) - CPPUNIT_TEST(skiplist_rcu_sht_member_cmpmix_xorshift) - CPPUNIT_TEST(skiplist_rcu_sht_member_cmp_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_sht_member_less_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_sht_member_cmpmix_xorshift_stat) - CPPUNIT_TEST(skiplist_rcu_sht_member_cmp_pascal) - CPPUNIT_TEST(skiplist_rcu_sht_member_less_pascal) - CPPUNIT_TEST(skiplist_rcu_sht_member_cmpmix_pascal) - CPPUNIT_TEST(skiplist_rcu_sht_member_cmp_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_sht_member_less_pascal_stat) - CPPUNIT_TEST(skiplist_rcu_sht_member_cmpmix_pascal_stat) - - CPPUNIT_TEST_SUITE_END() - }; -} // namespace set - -#endif // #ifndef CDSTEST_HDR_INTRUSIVE_SKIPLIST_SET_RCU_H diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_dhp.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_dhp.cpp deleted file mode 100644 index 9d54e91a..00000000 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_dhp.cpp +++ /dev/null @@ -1,452 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include - -namespace set { - - void IntrusiveHashSetHdrTest::split_dyn_DHP_base_cmp() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_DHP_base_less() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_DHP_base_cmpmix() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_DHP_base_cmpmix_stat() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_DHP_member_cmp() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_DHP_member_less() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_DHP_member_cmpmix() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_DHP_member_cmpmix_stat() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - struct list_traits : public ci::michael_list::traits - { - typedef ci::michael_list::member_hook< offsetof( item, hMember ), co::gc > hook; - typedef cmp compare; - typedef IntrusiveHashSetHdrTest::less less; - typedef faked_disposer disposer; - }; - typedef ci::MichaelList< cds::gc::DHP, item, list_traits > ord_list; - - struct set_traits : public ci::split_list::traits { - typedef hash_int hash; - typedef simple_item_counter item_counter; - typedef co::v::sequential_consistent memory_model; - typedef ci::split_list::stat<> stat; - }; - typedef ci::SplitListSet< cds::gc::DHP, ord_list, set_traits > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - - // Static bucket table - void IntrusiveHashSetHdrTest::split_st_DHP_base_cmp() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_DHP_base_less() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_DHP_base_cmpmix() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_DHP_base_cmpmix_stat() - { - typedef base_int_item< ci::split_list::node > > item; - struct list_traits : - public ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - {}; - typedef ci::MichaelList< cds::gc::DHP, item, list_traits > ord_list; - - struct set_traits : - public ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - {}; - typedef ci::SplitListSet< cds::gc::DHP, ord_list, set_traits > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_DHP_member_cmp() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_DHP_member_less() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - ci::split_list::dynamic_bucket_table - ,co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_DHP_member_cmpmix() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_DHP_member_cmpmix_stat() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::DHP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_dhp_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_dhp_lazy.cpp deleted file mode 100644 index 01072164..00000000 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_dhp_lazy.cpp +++ /dev/null @@ -1,449 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include - -namespace set { - - void IntrusiveHashSetHdrTest::split_dyn_DHP_base_cmp_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_DHP_base_less_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_DHP_base_cmpmix_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_DHP_base_cmpmix_stat_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_DHP_member_cmp_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_DHP_member_less_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_DHP_member_cmpmix_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_DHP_member_cmpmix_stat_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - struct list_traits : public ci::lazy_list::traits - { - typedef ci::lazy_list::member_hook< offsetof( item, hMember ), co::gc> hook; - typedef cmp compare; - typedef IntrusiveHashSetHdrTest::less less; - typedef faked_disposer disposer; - }; - typedef ci::LazyList< cds::gc::DHP, item, list_traits > ord_list; - - struct set_traits : public ci::split_list::traits { - typedef hash_int hash; - typedef simple_item_counter item_counter; - typedef ci::split_list::stat<> stat; - }; - typedef ci::SplitListSet< cds::gc::DHP, ord_list, set_traits > set; - - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - // Static bucket table - void IntrusiveHashSetHdrTest::split_st_DHP_base_cmp_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_DHP_base_less_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_DHP_base_cmpmix_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_DHP_base_cmpmix_stat_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_DHP_member_cmp_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_DHP_member_less_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - ci::split_list::dynamic_bucket_table - ,co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_DHP_member_cmpmix_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_DHP_member_cmpmix_stat_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::DHP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::DHP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_hp.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_hp.cpp deleted file mode 100644 index 85bbf109..00000000 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_hp.cpp +++ /dev/null @@ -1,451 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include - -namespace set { - - void IntrusiveHashSetHdrTest::split_dyn_HP_base_cmp() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_HP_base_less() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_HP_base_cmpmix() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_HP_base_cmpmix_stat() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_HP_member_cmp() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_HP_member_less() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_HP_member_cmpmix() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - , ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_HP_member_cmpmix_stat() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - struct list_traits : public ci::michael_list::traits { - typedef ci::michael_list::member_hook< offsetof( item, hMember ), co::gc> hook; - typedef cmp compare; - typedef IntrusiveHashSetHdrTest::less less; - typedef faked_disposer disposer; - }; - typedef ci::MichaelList< cds::gc::HP, item, list_traits > ord_list; - - struct set_traits : public ci::split_list::traits { - typedef hash_int hash; - typedef simple_item_counter item_counter; - typedef ci::split_list::stat<> stat; - }; - typedef ci::SplitListSet< cds::gc::HP, ord_list, set_traits > set; - - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - // Static bucket table - void IntrusiveHashSetHdrTest::split_st_HP_base_cmp() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_HP_base_less() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_HP_base_cmpmix() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_HP_base_cmpmix_stat() - { - typedef base_int_item< ci::split_list::node > > item; - struct list_traits : - public ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - {}; - typedef ci::MichaelList< cds::gc::HP, item, list_traits > ord_list; - - struct set_traits : - public ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - {}; - typedef ci::SplitListSet< cds::gc::HP, ord_list, set_traits > set; - - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_HP_member_cmp() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_HP_member_less() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - ci::split_list::dynamic_bucket_table - ,co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_HP_member_cmpmix() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_HP_member_cmpmix_stat() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::HP - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_hp_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_hp_lazy.cpp deleted file mode 100644 index f3e0cfcb..00000000 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_hp_lazy.cpp +++ /dev/null @@ -1,456 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include - -namespace set { - - void IntrusiveHashSetHdrTest::split_dyn_HP_base_cmp_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::opt::back_off< cds::backoff::empty > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_HP_base_less_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_HP_base_cmpmix_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_HP_base_cmpmix_stat_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_HP_member_cmp_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_HP_member_less_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_HP_member_cmpmix_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_HP_member_cmpmix_stat_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - struct list_traits : public ci::lazy_list::traits - { - typedef ci::lazy_list::member_hook< offsetof( item, hMember ), co::gc> hook; - typedef cmp compare; - typedef IntrusiveHashSetHdrTest::less less; - typedef faked_disposer disposer; - }; - typedef ci::LazyList< cds::gc::HP, item, list_traits > ord_list; - - struct set_traits : public ci::split_list::traits - { - typedef hash_int hash; - typedef simple_item_counter item_counter; - typedef ci::split_list::stat<> stat; - }; - typedef ci::SplitListSet< cds::gc::HP, ord_list, set_traits > set; - - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_int(); - } - - - // Static bucket table - void IntrusiveHashSetHdrTest::split_st_HP_base_cmp_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_HP_base_less_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_HP_base_cmpmix_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_HP_base_cmpmix_stat_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - struct list_traits : - public ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - {}; - typedef ci::LazyList< cds::gc::HP, item, list_traits > ord_list; - - struct set_traits : - public ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - { - typedef ci::split_list::stat<> stat; - }; - typedef ci::SplitListSet< cds::gc::HP, ord_list, set_traits > set; - - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_HP_member_cmp_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_HP_member_less_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - ci::split_list::dynamic_bucket_table - ,co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_HP_member_cmpmix_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - - void IntrusiveHashSetHdrTest::split_st_HP_member_cmpmix_stat_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::HP - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< cds::gc::HP, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - > set; - - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_int(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_nogc.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_nogc.cpp deleted file mode 100644 index c8eb9576..00000000 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_nogc.cpp +++ /dev/null @@ -1,441 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include - -namespace set { - - void IntrusiveHashSetHdrTest::split_dyn_nogc_base_cmp() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_dyn_nogc_base_less() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_dyn_nogc_base_cmpmix() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_dyn_nogc_base_cmpmix_stat() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - struct list_traits : public ci::michael_list::traits - { - typedef ci::michael_list::base_hook< co::gc > hook; - typedef cmp compare; - typedef IntrusiveHashSetHdrTest::less less; - typedef faked_disposer disposer; - }; - typedef ci::MichaelList< cds::gc::nogc, item, list_traits > bucket_type; - - struct set_traits : public ci::split_list::make_traits< ci::split_list::dynamic_bucket_table >::type - { - typedef hash_int hash; - typedef simple_item_counter item_counter; - typedef ci::split_list::stat<> stat; - }; - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, set_traits > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_dyn_nogc_member_cmp() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_dyn_nogc_member_less() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_dyn_nogc_member_cmpmix() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_dyn_nogc_member_cmpmix_stat() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - struct list_traits: - public ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - {}; - typedef ci::MichaelList< cds::gc::nogc, item, list_traits > bucket_type; - - struct set_traits : - public ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - {}; - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, set_traits > set; - - test_int_nogc(); - } - - // Static bucket table - void IntrusiveHashSetHdrTest::split_st_nogc_base_cmp() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_st_nogc_base_less() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_st_nogc_base_cmpmix() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_st_nogc_base_cmpmix_stat() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_st_nogc_member_cmp() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_st_nogc_member_less() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_st_nogc_member_cmpmix() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_st_nogc_member_cmpmix_stat() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< cds::gc::nogc - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - > set; - - test_int_nogc(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_nogc_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_nogc_lazy.cpp deleted file mode 100644 index 454e6730..00000000 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_nogc_lazy.cpp +++ /dev/null @@ -1,442 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include - -namespace set { - - void IntrusiveHashSetHdrTest::split_dyn_nogc_base_cmp_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - ,ci::opt::back_off< cds::backoff::empty > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_dyn_nogc_base_less_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_dyn_nogc_base_cmpmix_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_dyn_nogc_base_cmpmix_stat_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - struct list_traits : public ci::lazy_list::traits - { - typedef ci::lazy_list::base_hook< co::gc > hook; - typedef IntrusiveHashSetHdrTest::less less; - typedef cmp compare; - typedef faked_disposer disposer; - }; - typedef ci::LazyList< cds::gc::nogc, item, list_traits > bucket_type; - - struct set_traits : public ci::split_list::make_traits>::type - { - typedef hash_int hash; - typedef simple_item_counter item_counter; - typedef ci::split_list::stat<> stat; - }; - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, set_traits > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_dyn_nogc_member_cmp_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_dyn_nogc_member_less_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_dyn_nogc_member_cmpmix_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_dyn_nogc_member_cmpmix_stat_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - struct list_traits : - public ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - {}; - typedef ci::LazyList< cds::gc::nogc, item, list_traits > bucket_type; - - struct set_traits : - public ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - {}; - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, set_traits > set; - - test_int_nogc(); - } - - // Static bucket table - void IntrusiveHashSetHdrTest::split_st_nogc_base_cmp_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_st_nogc_base_less_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_st_nogc_base_cmpmix_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_st_nogc_base_cmpmix_stat_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_st_nogc_member_cmp_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_st_nogc_member_less_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_st_nogc_member_cmpmix_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - - test_int_nogc(); - } - - void IntrusiveHashSetHdrTest::split_st_nogc_member_cmpmix_stat_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< cds::gc::nogc - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > bucket_type; - - typedef ci::SplitListSet< cds::gc::nogc, bucket_type, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - > set; - - test_int_nogc(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb.cpp deleted file mode 100644 index da19a5ad..00000000 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb.cpp +++ /dev/null @@ -1,457 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { - namespace { - typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_cmp() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList < rcu_type - , item - , ci::michael_list::make_traits < - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - , co::compare< cmp > - , ci::opt::disposer < faked_disposer > - > ::type - > ord_list; - - typedef ci::SplitListSet < rcu_type, ord_list, - ci::split_list::make_traits < - co::hash< hash_int > - , ci::split_list::dynamic_bucket_table - , co::memory_model < co::v::relaxed_ordering > - > ::type - > set; - static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table"); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_less() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList < rcu_type - , item - , ci::michael_list::make_traits < - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - , co::less< less > - , ci::opt::disposer < faked_disposer > - > ::type - > ord_list; - - typedef ci::SplitListSet < rcu_type, ord_list, - ci::split_list::make_traits < - co::hash< hash_int > - , co::memory_model < co::v::sequential_consistent > - > ::type - > set; - static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table"); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_cmpmix() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList < rcu_type - , item - , ci::michael_list::make_traits < - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - , co::less< less > - , co::compare< cmp > - , ci::opt::disposer < faked_disposer > - > ::type - > ord_list; - - typedef ci::SplitListSet < rcu_type, ord_list, - ci::split_list::make_traits < - co::hash< hash_int > - , co::item_counter< simple_item_counter > - , ci::split_list::dynamic_bucket_table < true > - > ::type - > set; - static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table"); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_cmpmix_stat() - { - typedef base_int_item< ci::split_list::node > > item; - struct list_traits : public ci::michael_list::traits - { - typedef ci::michael_list::base_hook< co::gc > hook; - typedef IntrusiveHashSetHdrTest::less less; - typedef cmp compare; - typedef faked_disposer disposer; - }; - typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; - - struct set_traits : public ci::split_list::make_traits >::type - { - typedef hash_int hash; - typedef simple_item_counter item_counter; - typedef ci::split_list::stat<> stat; - }; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - - static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table"); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_cmp() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList < rcu_type - , item - , ci::michael_list::make_traits < - ci::opt::hook< ci::michael_list::member_hook < - offsetof( item, hMember ), - co::gc - > > - , co::compare< cmp > - , ci::opt::disposer < faked_disposer > - > ::type - > ord_list; - - typedef ci::SplitListSet < rcu_type, ord_list, - ci::split_list::make_traits < - co::hash < hash_int > - > ::type - > set; - static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table"); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_less() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList < rcu_type - , item - , ci::michael_list::make_traits < - ci::opt::hook< ci::michael_list::member_hook < - offsetof( item, hMember ), - co::gc - > > - , co::less< less > - , ci::opt::disposer < faked_disposer > - > ::type - > ord_list; - - typedef ci::SplitListSet < rcu_type, ord_list, - ci::split_list::make_traits < - co::hash< hash_int > - , co::memory_model < co::v::relaxed_ordering > - > ::type - > set; - static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table"); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_cmpmix() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList < rcu_type - , item - , ci::michael_list::make_traits < - ci::opt::hook< ci::michael_list::member_hook < - offsetof( item, hMember ), - co::gc - > > - , co::compare< cmp > - , co::less< less > - , ci::opt::disposer < faked_disposer > - > ::type - > ord_list; - - typedef ci::SplitListSet < rcu_type, ord_list, - ci::split_list::make_traits < - co::hash< hash_int > - , co::item_counter< simple_item_counter > - , co::memory_model < co::v::sequential_consistent > - > ::type - > set; - static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table"); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_cmpmix_stat() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - struct list_traits : - public ci::michael_list::make_traits < - ci::opt::hook< ci::michael_list::member_hook < - offsetof( item, hMember ), - co::gc - > > - , co::compare< cmp > - , co::less< less > - , ci::opt::disposer < faked_disposer > - > ::type - {}; - typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; - - struct set_traits : - public ci::split_list::make_traits < - co::hash< hash_int > - , co::item_counter< simple_item_counter > - , co::memory_model - , co::stat < ci::split_list::stat<> > - > ::type - {}; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table"); - - test_rcu_int_michael_list(); - } - - // Static bucket table - void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_cmp() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList < rcu_type - , item - , ci::michael_list::make_traits < - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - , co::compare< cmp > - , ci::opt::disposer < faked_disposer > - > ::type - > ord_list; - - typedef ci::SplitListSet < rcu_type, ord_list, - ci::split_list::make_traits < - co::hash< hash_int > - , ci::split_list::dynamic_bucket_table - , co::memory_model < co::v::relaxed_ordering > - > ::type - > set; - static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table"); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_less() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList < rcu_type - , item - , ci::michael_list::make_traits < - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - , co::less< less > - , ci::opt::disposer < faked_disposer > - > ::type - > ord_list; - - typedef ci::SplitListSet < rcu_type, ord_list, - ci::split_list::make_traits < - co::hash< hash_int > - , ci::split_list::dynamic_bucket_table - , co::memory_model < co::v::sequential_consistent > - > ::type - > set; - static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table"); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_cmpmix() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList < rcu_type - , item - , ci::michael_list::make_traits < - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - , co::less< less > - , co::compare< cmp > - , ci::opt::disposer < faked_disposer > - > ::type - > ord_list; - - typedef ci::SplitListSet < rcu_type, ord_list, - ci::split_list::make_traits < - co::hash< hash_int > - , co::item_counter< simple_item_counter > - , ci::split_list::dynamic_bucket_table < false > - > ::type - > set; - static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table"); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_cmpmix_stat() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList < rcu_type - , item - , ci::michael_list::make_traits < - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - , co::less< less > - , co::compare< cmp > - , ci::opt::disposer < faked_disposer > - > ::type - > ord_list; - - typedef ci::SplitListSet < rcu_type, ord_list, - ci::split_list::make_traits < - co::hash< hash_int > - , co::item_counter< simple_item_counter > - , ci::split_list::dynamic_bucket_table - , co::stat < ci::split_list::stat<> > - > ::type - > set; - static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table"); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_cmp() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList < rcu_type - , item - , ci::michael_list::make_traits < - ci::opt::hook< ci::michael_list::member_hook < - offsetof( item, hMember ), - co::gc - > > - , co::compare< cmp > - , ci::opt::disposer < faked_disposer > - > ::type - > ord_list; - - typedef ci::SplitListSet < rcu_type, ord_list, - ci::split_list::make_traits < - co::hash< hash_int > - , ci::split_list::dynamic_bucket_table - , co::memory_model < co::v::relaxed_ordering > - > ::type - > set; - static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table"); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_less() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList < rcu_type - , item - , ci::michael_list::make_traits < - ci::opt::hook< ci::michael_list::member_hook < - offsetof( item, hMember ), - co::gc - > > - , co::less< less > - , ci::opt::disposer < faked_disposer > - > ::type - > ord_list; - - typedef ci::SplitListSet < rcu_type, ord_list, - ci::split_list::make_traits < - ci::split_list::dynamic_bucket_table - , co::hash< hash_int > - , co::memory_model < co::v::sequential_consistent > - > ::type - > set; - static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table"); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_cmpmix() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList < rcu_type - , item - , ci::michael_list::make_traits < - ci::opt::hook< ci::michael_list::member_hook < - offsetof( item, hMember ), - co::gc - > > - , co::compare< cmp > - , co::less< less > - , ci::opt::disposer < faked_disposer > - > ::type - > ord_list; - - typedef ci::SplitListSet < rcu_type, ord_list, - ci::split_list::make_traits < - co::hash< hash_int > - , co::item_counter< simple_item_counter > - , ci::split_list::dynamic_bucket_table < false > - > ::type - > set; - static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table"); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_cmpmix_stat() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList < rcu_type - , item - , ci::michael_list::make_traits < - ci::opt::hook< ci::michael_list::member_hook < - offsetof( item, hMember ), - co::gc - > > - , co::compare< cmp > - , co::less< less > - , ci::opt::disposer < faked_disposer > - > ::type - > ord_list; - - typedef ci::SplitListSet < rcu_type, ord_list, - ci::split_list::make_traits < - co::hash< hash_int > - , co::item_counter< simple_item_counter > - , ci::split_list::dynamic_bucket_table - , co::stat < ci::split_list::stat<> > - > ::type - > set; - static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table"); - - test_rcu_int_michael_list(); - } -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb_lazy.cpp deleted file mode 100644 index c360fbcb..00000000 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb_lazy.cpp +++ /dev/null @@ -1,456 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { - namespace { - typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_cmp_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_less_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_cmpmix_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_cmpmix_stat_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - struct list_traits : public ci::lazy_list::traits - { - typedef ci::lazy_list::base_hook< co::gc > hook; - typedef IntrusiveHashSetHdrTest::less< item > less; - typedef cmp compare; - typedef faked_disposer disposer; - }; - typedef ci::LazyList< rcu_type, item, list_traits > ord_list; - - struct set_traits : public ci::split_list::make_traits>::type - { - typedef hash_int hash; - typedef simple_item_counter item_counter; - typedef ci::split_list::stat<> stat; - }; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_cmp_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_less_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_cmpmix_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_cmpmix_stat_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - struct list_traits : - public ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - {}; - typedef ci::LazyList< rcu_type, item, list_traits > ord_list; - - struct set_traits : - public ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,co::stat< ci::split_list::stat<> > - >::type - {}; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - // Static bucket table - void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_cmp_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_less_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_cmpmix_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_cmpmix_stat_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<>> - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_cmp_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_less_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - ci::split_list::dynamic_bucket_table - ,co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_cmpmix_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_cmpmix_stat_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<>> - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi.cpp deleted file mode 100644 index d21ec235..00000000 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi.cpp +++ /dev/null @@ -1,460 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { - namespace { - typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_base_cmp() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_base_less() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_base_cmpmix() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_member_cmp() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_member_less() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_member_cmpmix() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); - } - - - // Static bucket table - void IntrusiveHashSetHdrTest::split_st_RCU_GPI_base_cmp() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPI_base_less() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPI_base_cmpmix() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPI_member_cmp() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPI_member_less() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - ci::split_list::dynamic_bucket_table - ,co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPI_member_cmpmix() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_base_cmpmix_stat() - { - typedef base_int_item< ci::split_list::node > > item; - struct list_traits : public ci::michael_list::traits - { - typedef ci::michael_list::base_hook< co::gc > hook; - typedef IntrusiveHashSetHdrTest::less less; - typedef cmp compare; - typedef faked_disposer disposer; - }; - typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; - - struct set_traits : public ci::split_list::make_traits >::type - { - typedef hash_int hash; - typedef simple_item_counter item_counter; - typedef ci::split_list::stat<> stat; - }; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_member_cmpmix_stat() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - struct list_traits : - public ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - {}; - typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; - - struct set_traits : - public ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,co::memory_model - ,co::stat< ci::split_list::stat<>> - >::type - {}; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPI_base_cmpmix_stat() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<>> - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPI_member_cmpmix_stat() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi_lazy.cpp deleted file mode 100644 index 2bb9c0d6..00000000 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi_lazy.cpp +++ /dev/null @@ -1,459 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { - namespace { - typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_base_cmp_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_base_less_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_base_cmpmix_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_member_cmp_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_member_less_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_member_cmpmix_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - - // Static bucket table - void IntrusiveHashSetHdrTest::split_st_RCU_GPI_base_cmp_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPI_base_less_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPI_base_cmpmix_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPI_member_cmp_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPI_member_less_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - ci::split_list::dynamic_bucket_table - ,co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPI_member_cmpmix_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_base_cmpmix_stat_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - struct list_traits : public ci::lazy_list::traits - { - typedef ci::lazy_list::base_hook< co::gc > hook; - typedef IntrusiveHashSetHdrTest::less< item > less; - typedef cmp compare; - typedef faked_disposer disposer; - }; - typedef ci::LazyList< rcu_type, item, list_traits > ord_list; - - struct set_traits : public ci::split_list::make_traits>::type - { - typedef hash_int hash; - typedef simple_item_counter item_counter; - typedef ci::split_list::stat<> stat; - }; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_member_cmpmix_stat_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - struct list_traits : - public ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - {}; - typedef ci::LazyList< rcu_type, item, list_traits > ord_list; - - struct set_traits : - public ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,co::stat< ci::split_list::stat<> > - >::type - {}; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPI_base_cmpmix_stat_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<>> - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPI_member_cmpmix_stat_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<>> - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt.cpp deleted file mode 100644 index 8135df6a..00000000 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt.cpp +++ /dev/null @@ -1,460 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { - namespace { - typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_base_cmp() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_base_less() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_base_cmpmix() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_member_cmp() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_member_less() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_member_cmpmix() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); - } - - - // Static bucket table - void IntrusiveHashSetHdrTest::split_st_RCU_GPT_base_cmp() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPT_base_less() - { - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPT_base_cmpmix() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPT_member_cmp() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPT_member_less() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - ci::split_list::dynamic_bucket_table - ,co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPT_member_cmpmix() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_base_cmpmix_stat() - { - typedef base_int_item< ci::split_list::node > > item; - struct list_traits : public ci::michael_list::traits - { - typedef ci::michael_list::base_hook< co::gc > hook; - typedef IntrusiveHashSetHdrTest::less less; - typedef cmp compare; - typedef faked_disposer disposer; - }; - typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; - - struct set_traits : public ci::split_list::make_traits >::type - { - typedef hash_int hash; - typedef simple_item_counter item_counter; - typedef ci::split_list::stat<> stat; - }; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_member_cmpmix_stat() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - struct list_traits : - public ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - {}; - typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; - - struct set_traits : - public ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,co::memory_model - ,co::stat< ci::split_list::stat<>> - >::type - {}; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPT_base_cmpmix_stat() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<>> - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPT_member_cmpmix_stat() - { - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt_lazy.cpp deleted file mode 100644 index be363a59..00000000 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt_lazy.cpp +++ /dev/null @@ -1,458 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { - namespace { - typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_base_cmp_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_base_less_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_base_cmpmix_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_member_cmp_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_member_less_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_member_cmpmix_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - - // Static bucket table - void IntrusiveHashSetHdrTest::split_st_RCU_GPT_base_cmp_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPT_base_less_lazy() - { - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPT_base_cmpmix_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPT_member_cmp_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPT_member_less_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - ci::split_list::dynamic_bucket_table - ,co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPT_member_cmpmix_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_base_cmpmix_stat_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - struct list_traits : public ci::lazy_list::traits - { - typedef ci::lazy_list::base_hook< co::gc > hook; - typedef IntrusiveHashSetHdrTest::less< item > less; - typedef cmp compare; - typedef faked_disposer disposer; - }; - typedef ci::LazyList< rcu_type, item, list_traits > ord_list; - - struct set_traits : public ci::split_list::make_traits>::type - { - typedef hash_int hash; - typedef simple_item_counter item_counter; - typedef ci::split_list::stat<> stat; - }; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_member_cmpmix_stat_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - struct list_traits : - public ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - {}; - typedef ci::LazyList< rcu_type, item, list_traits > ord_list; - - struct set_traits : - public ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,co::stat< ci::split_list::stat<> > - >::type - {}; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPT_base_cmpmix_stat_lazy() - { - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<>> - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - void IntrusiveHashSetHdrTest::split_st_RCU_GPT_member_cmpmix_stat_lazy() - { - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<>> - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb.cpp deleted file mode 100644 index c4c53ece..00000000 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb.cpp +++ /dev/null @@ -1,493 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - } -#endif - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_base_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_base_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_base_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_member_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_member_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_member_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - - // Static bucket table - void IntrusiveHashSetHdrTest::split_st_RCU_SHB_base_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHB_base_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHB_base_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHB_member_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHB_member_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - ci::split_list::dynamic_bucket_table - ,co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHB_member_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_base_cmpmix_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node > > item; - struct list_traits : public ci::michael_list::traits - { - typedef ci::michael_list::base_hook< co::gc > hook; - typedef IntrusiveHashSetHdrTest::less less; - typedef cmp compare; - typedef faked_disposer disposer; - }; - typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; - - struct set_traits : public ci::split_list::make_traits >::type - { - typedef hash_int hash; - typedef simple_item_counter item_counter; - typedef ci::split_list::stat<> stat; - }; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_member_cmpmix_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - struct list_traits : - public ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - {}; - typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; - - struct set_traits : - public ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,co::memory_model - ,co::stat< ci::split_list::stat<>> - >::type - {}; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHB_base_cmpmix_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<>> - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHB_member_cmpmix_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb_lazy.cpp deleted file mode 100644 index 410acea0..00000000 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb_lazy.cpp +++ /dev/null @@ -1,492 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - } -#endif - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_base_cmp_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_base_less_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_base_cmpmix_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_member_cmp_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_member_less_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_member_cmpmix_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); -#endif - } - - - // Static bucket table - void IntrusiveHashSetHdrTest::split_st_RCU_SHB_base_cmp_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHB_base_less_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHB_base_cmpmix_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHB_member_cmp_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHB_member_less_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - ci::split_list::dynamic_bucket_table - ,co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHB_member_cmpmix_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_base_cmpmix_stat_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node > > item; - struct list_traits : public ci::lazy_list::traits - { - typedef ci::lazy_list::base_hook< co::gc > hook; - typedef IntrusiveHashSetHdrTest::less< item > less; - typedef cmp compare; - typedef faked_disposer disposer; - }; - typedef ci::LazyList< rcu_type, item, list_traits > ord_list; - - struct set_traits : public ci::split_list::make_traits>::type - { - typedef hash_int hash; - typedef simple_item_counter item_counter; - typedef ci::split_list::stat<> stat; - }; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_member_cmpmix_stat_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - struct list_traits : - public ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - {}; - typedef ci::LazyList< rcu_type, item, list_traits > ord_list; - - struct set_traits : - public ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,co::stat< ci::split_list::stat<> > - >::type - {}; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHB_base_cmpmix_stat_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<>> - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHB_member_cmpmix_stat_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<>> - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); -#endif - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht.cpp deleted file mode 100644 index 1e6a212f..00000000 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht.cpp +++ /dev/null @@ -1,494 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - } -#endif - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - - // Static bucket table - void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - ci::split_list::dynamic_bucket_table - ,co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_cmpmix_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node > > item; - struct list_traits : public ci::michael_list::traits - { - typedef ci::michael_list::base_hook< co::gc > hook; - typedef IntrusiveHashSetHdrTest::less less; - typedef cmp compare; - typedef faked_disposer disposer; - }; - typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; - - struct set_traits : public ci::split_list::make_traits >::type - { - typedef hash_int hash; - typedef simple_item_counter item_counter; - typedef ci::split_list::stat<> stat; - }; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_cmpmix_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - struct list_traits : - public ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - {}; - typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; - - struct set_traits : - public ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,co::memory_model - ,co::stat< ci::split_list::stat<>> - >::type - {}; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_cmpmix_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<>> - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_cmpmix_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<> > - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int_michael_list(); -#endif - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht_lazy.cpp deleted file mode 100644 index d413a4b4..00000000 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht_lazy.cpp +++ /dev/null @@ -1,491 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_set.h" -#include -#include -#include - -namespace set { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - } -#endif - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_cmp_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_less_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_cmpmix_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_cmp_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_less_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_cmpmix_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - >::type - > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); -#endif - } - - - // Static bucket table - void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_cmp_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_less_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_cmpmix_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_cmp_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_less_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - ci::split_list::dynamic_bucket_table - ,co::hash< hash_int > - ,co::memory_model - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_cmpmix_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_cmpmix_stat_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node > > item; - struct list_traits : public ci::lazy_list::traits - { - typedef ci::lazy_list::base_hook< co::gc > hook; - typedef IntrusiveHashSetHdrTest::less< item > less; - typedef cmp compare; - typedef faked_disposer disposer; - }; - typedef ci::LazyList< rcu_type, item, list_traits > ord_list; - - struct set_traits : public ci::split_list::make_traits>::type - { - typedef hash_int hash; - typedef simple_item_counter item_counter; - typedef ci::split_list::stat<> stat; - }; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_cmpmix_stat_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - struct list_traits : - public ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - {}; - typedef ci::LazyList< rcu_type, item, list_traits > ord_list; - - struct set_traits : - public ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,co::stat< ci::split_list::stat<> > - >::type - {}; - typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; - static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_cmpmix_stat_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef base_int_item< ci::split_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<>> - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); -#endif - } - - void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_cmpmix_stat_lazy() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; - typedef ci::LazyList< rcu_type - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - ,co::stat< ci::split_list::stat<>> - >::type - > set; - static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); - - test_rcu_int(); -#endif - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_striped_hashset_avlset.cpp b/tests/test-hdr/set/hdr_intrusive_striped_hashset_avlset.cpp deleted file mode 100644 index a4d1d32b..00000000 --- a/tests/test-hdr/set/hdr_intrusive_striped_hashset_avlset.cpp +++ /dev/null @@ -1,153 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_striped_set.h" -#include -#include - -namespace set { - namespace bi = boost::intrusive; - - namespace { - typedef IntrusiveStripedSetHdrTest::base_item< bi::avl_set_base_hook<> > base_item_type; - typedef IntrusiveStripedSetHdrTest::member_item< bi::avl_set_member_hook<> > member_item_type; - - template - struct get_key - { - typedef T type; - - type const& operator()( Node const& v ) const - { - return v.nKey; - } - }; - } - -#if BOOST_VERSION >= 105900 -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>> -#else -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) -#endif - - void IntrusiveStripedSetHdrTest::Striped_avl_set_basehook() - { - typedef ci::StripedSet< - bi::avl_set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::mutex_policy< ci::striped_set::striping<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_avl_set_basehook_bucket_threshold() - { - typedef ci::StripedSet< - bi::avl_set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_avl_set_basehook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::avl_set > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - - void IntrusiveStripedSetHdrTest::Striped_avl_set_memberhook() - { - typedef ci::StripedSet< - bi::avl_set< - member_item_type - , bi::member_hook< member_item_type, bi::avl_set_member_hook<>, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_avl_set_memberhook_bucket_threshold() - { - typedef ci::StripedSet< - bi::avl_set< - member_item_type - , bi::member_hook< member_item_type, bi::avl_set_member_hook<>, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_avl_set_memberhook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::avl_set< - member_item_type - , bi::member_hook< member_item_type, bi::avl_set_member_hook<>, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_intrusive_striped_hashset_list.cpp b/tests/test-hdr/set/hdr_intrusive_striped_hashset_list.cpp deleted file mode 100644 index 762d7dae..00000000 --- a/tests/test-hdr/set/hdr_intrusive_striped_hashset_list.cpp +++ /dev/null @@ -1,215 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_striped_set.h" -#include -#include - -#include // std::is_same - -namespace set { - namespace bi = boost::intrusive; - - namespace { - typedef IntrusiveStripedSetHdrTest::base_item< bi::list_base_hook<> > base_item_type; - typedef IntrusiveStripedSetHdrTest::member_item< bi::list_member_hook<> > member_item_type; - } - - void IntrusiveStripedSetHdrTest::Striped_list_basehook_cmp() - { - typedef ci::StripedSet< - bi::list - ,co::mutex_policy< ci::striped_set::striping<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_list_basehook_less() - { - typedef ci::StripedSet< - bi::list - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_list_basehook_cmpmix() - { - typedef ci::StripedSet< - bi::list - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_list_basehook_bucket_threshold() - { - typedef ci::StripedSet< - bi::list - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<8> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_list_basehook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::list - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - set_type s( 128, ci::striped_set::single_bucket_size_threshold<0>(4) ); - test_with( s ); - } - - void IntrusiveStripedSetHdrTest::Striped_list_memberhook_cmp() - { - typedef ci::StripedSet< - bi::list< - member_item_type - , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember> - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_list_memberhook_less() - { - typedef ci::StripedSet< - bi::list< - member_item_type - , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember> - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_list_memberhook_cmpmix() - { - typedef ci::StripedSet< - bi::list< - member_item_type - , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember> - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_list_memberhook_bucket_threshold() - { - typedef ci::StripedSet< - bi::list< - member_item_type - , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember> - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<8> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_list_memberhook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::list< - member_item_type - , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember> - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - set_type s( 128, ci::striped_set::single_bucket_size_threshold<0>(4) ); - test_with( s ); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_intrusive_striped_hashset_set.cpp b/tests/test-hdr/set/hdr_intrusive_striped_hashset_set.cpp deleted file mode 100644 index 3ff23de5..00000000 --- a/tests/test-hdr/set/hdr_intrusive_striped_hashset_set.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_striped_set.h" -#include -#include - -namespace set { - namespace bi = boost::intrusive; - - namespace { - typedef IntrusiveStripedSetHdrTest::base_item< bi::set_base_hook<> > base_item_type; - typedef IntrusiveStripedSetHdrTest::member_item< bi::set_member_hook<> > member_item_type; - - template - struct get_key - { - typedef T type; - - type const& operator()( Node const& v ) const - { - return v.nKey; - } - }; - } - -#if BOOST_VERSION >= 105900 -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>> -#else -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) -#endif - - - void IntrusiveStripedSetHdrTest::Striped_set_basehook() - { - typedef ci::StripedSet< - bi::set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::mutex_policy< ci::striped_set::striping<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_set_basehook_bucket_threshold() - { - typedef ci::StripedSet< - bi::set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_set_basehook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - - void IntrusiveStripedSetHdrTest::Striped_set_memberhook() - { - typedef ci::StripedSet< - bi::set< - member_item_type - , bi::member_hook< member_item_type, bi::set_member_hook<>, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_set_memberhook_bucket_threshold() - { - typedef ci::StripedSet< - bi::set< - member_item_type - , bi::member_hook< member_item_type, bi::set_member_hook<>, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_set_memberhook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::set< - member_item_type - , bi::member_hook< member_item_type, bi::set_member_hook<>, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_intrusive_striped_hashset_sgset.cpp b/tests/test-hdr/set/hdr_intrusive_striped_hashset_sgset.cpp deleted file mode 100644 index 2b5d3823..00000000 --- a/tests/test-hdr/set/hdr_intrusive_striped_hashset_sgset.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_striped_set.h" -#include -#include - -namespace set { - namespace bi = boost::intrusive; - - namespace { - typedef IntrusiveStripedSetHdrTest::base_item< bi::bs_set_base_hook<> > base_item_type; - typedef IntrusiveStripedSetHdrTest::member_item< bi::bs_set_member_hook<> > member_item_type; - - template - struct get_key - { - typedef T type; - - type const& operator()( Node const& v ) const - { - return v.nKey; - } - }; - } - -#if BOOST_VERSION >= 105900 -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>> -#else -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) -#endif - - - void IntrusiveStripedSetHdrTest::Striped_sg_set_basehook() - { - typedef ci::StripedSet< - bi::sg_set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::mutex_policy< ci::striped_set::striping<> > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_sg_set_basehook_bucket_threshold() - { - typedef ci::StripedSet< - bi::sg_set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_sg_set_basehook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::sg_set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - - void IntrusiveStripedSetHdrTest::Striped_sg_set_memberhook() - { - typedef ci::StripedSet< - bi::sg_set< - member_item_type - , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_sg_set_memberhook_bucket_threshold() - { - typedef ci::StripedSet< - bi::sg_set< - member_item_type - , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_sg_set_memberhook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::sg_set< - member_item_type - , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_intrusive_striped_hashset_slist.cpp b/tests/test-hdr/set/hdr_intrusive_striped_hashset_slist.cpp deleted file mode 100644 index 92e60df8..00000000 --- a/tests/test-hdr/set/hdr_intrusive_striped_hashset_slist.cpp +++ /dev/null @@ -1,215 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_striped_set.h" -#include -#include - -#include // std::is_same - -namespace set { - namespace bi = boost::intrusive; - - namespace { - typedef IntrusiveStripedSetHdrTest::base_item< bi::slist_base_hook<> > base_item_type; - typedef IntrusiveStripedSetHdrTest::member_item< bi::slist_member_hook<> > member_item_type; - } - - void IntrusiveStripedSetHdrTest::Striped_slist_basehook_cmp() - { - typedef ci::StripedSet< - bi::slist - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::mutex_policy< ci::striped_set::striping<> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_slist_basehook_less() - { - typedef ci::StripedSet< - bi::slist - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_slist_basehook_cmpmix() - { - typedef ci::StripedSet< - bi::slist - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_slist_basehook_bucket_threshold() - { - typedef ci::StripedSet< - bi::slist - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<8> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_slist_basehook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::slist - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - set_type s( 128, ci::striped_set::single_bucket_size_threshold<0>(4) ); - test_with( s ); - } - - void IntrusiveStripedSetHdrTest::Striped_slist_memberhook_cmp() - { - typedef ci::StripedSet< - bi::slist< - member_item_type - , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember> - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_slist_memberhook_less() - { - typedef ci::StripedSet< - bi::slist< - member_item_type - , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember> - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_slist_memberhook_cmpmix() - { - typedef ci::StripedSet< - bi::slist< - member_item_type - , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember> - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_slist_memberhook_bucket_threshold() - { - typedef ci::StripedSet< - bi::slist< - member_item_type - , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember> - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<8> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_slist_memberhook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::slist< - member_item_type - , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember> - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::less< IntrusiveStripedSetHdrTest::less > - ,co::compare< IntrusiveStripedSetHdrTest::cmp > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - static_assert( (std::is_same< - IntrusiveStripedSetHdrTest::cmp - ,set_type::bucket_type::key_comparator - >::value), "Key compare function selection error" ); - - set_type s( 128, ci::striped_set::single_bucket_size_threshold<0>(4) ); - test_with( s ); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_intrusive_striped_hashset_splayset.cpp b/tests/test-hdr/set/hdr_intrusive_striped_hashset_splayset.cpp deleted file mode 100644 index 286836b2..00000000 --- a/tests/test-hdr/set/hdr_intrusive_striped_hashset_splayset.cpp +++ /dev/null @@ -1,163 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_striped_set.h" -#include -#include -#include - -namespace set { - namespace bi = boost::intrusive; - - namespace { -# if BOOST_VERSION < 105600 - typedef bi::splay_set_member_hook<> splay_set_member_hook; - typedef bi::splay_set_base_hook<> splay_set_base_hook; -#else - typedef bi::bs_set_base_hook<> splay_set_base_hook; - typedef bi::bs_set_member_hook<> splay_set_member_hook; -#endif - - typedef IntrusiveStripedSetHdrTest::base_item< splay_set_base_hook> base_item_type; - typedef IntrusiveStripedSetHdrTest::member_item< splay_set_member_hook > member_item_type; - - template - struct get_key - { - typedef T type; - - type const& operator()( Node const& v ) const - { - return v.nKey; - } - }; - } - -#if BOOST_VERSION >= 105900 -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>> -#else -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) -#endif - - - void IntrusiveStripedSetHdrTest::Striped_splay_set_basehook() - { - typedef ci::StripedSet< - bi::splay_set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::mutex_policy< ci::striped_set::striping<> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_splay_set_basehook_bucket_threshold() - { - typedef ci::StripedSet< - bi::splay_set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_splay_set_basehook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::splay_set> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - - void IntrusiveStripedSetHdrTest::Striped_splay_set_memberhook() - { - typedef ci::StripedSet< - bi::splay_set< - member_item_type - , bi::member_hook< member_item_type, splay_set_member_hook, &member_item_type::hMember> - , bi::compare > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_splay_set_memberhook_bucket_threshold() - { - typedef ci::StripedSet< - bi::splay_set< - member_item_type - , bi::member_hook< member_item_type, splay_set_member_hook, &member_item_type::hMember> - , bi::compare> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_splay_set_memberhook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::splay_set< - member_item_type - , bi::member_hook< member_item_type, splay_set_member_hook, &member_item_type::hMember> - , bi::compare> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_intrusive_striped_hashset_treapset.cpp b/tests/test-hdr/set/hdr_intrusive_striped_hashset_treapset.cpp deleted file mode 100644 index 9fce0975..00000000 --- a/tests/test-hdr/set/hdr_intrusive_striped_hashset_treapset.cpp +++ /dev/null @@ -1,171 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_striped_set.h" -#include -#include - -namespace set { - namespace bi = boost::intrusive; - - namespace { - typedef IntrusiveStripedSetHdrTest::base_item< bi::bs_set_base_hook<> > base_item_type; - typedef IntrusiveStripedSetHdrTest::member_item< bi::bs_set_member_hook<> > member_item_type; - - template - struct priority_cmp: private IntrusiveStripedSetHdrTest::less - { - typedef IntrusiveStripedSetHdrTest::less base_class; - - template - bool operator()( A const& a, B const& b ) const - { - return base_class::operator()( b, a ); - } - }; - - template - struct get_key - { - typedef T type; - - type const& operator()( Node const& v ) const - { - return v.nKey; - } - }; - } - -#if BOOST_VERSION >= 105900 -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>> -#else -# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) -#endif - - void IntrusiveStripedSetHdrTest::Striped_treap_set_basehook() - { - typedef ci::StripedSet< - bi::treap_set < base_item_type, - bi::compare>, - bi::priority> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::mutex_policy< ci::striped_set::striping<> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_treap_set_basehook_bucket_threshold() - { - typedef ci::StripedSet< - bi::treap_set >, - bi::priority> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_treap_set_basehook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::treap_set>, - bi::priority> - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - - void IntrusiveStripedSetHdrTest::Striped_treap_set_memberhook() - { - typedef ci::StripedSet< - bi::treap_set< - member_item_type - , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember> - , bi::compare > - , bi::priority > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_treap_set_memberhook_bucket_threshold() - { - typedef ci::StripedSet< - bi::treap_set< - member_item_type - , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember> - , bi::compare > - , bi::priority > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_treap_set_memberhook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::treap_set< - member_item_type - , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember> - , bi::compare > - , bi::priority > - CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type ) - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_intrusive_striped_hashset_uset.cpp b/tests/test-hdr/set/hdr_intrusive_striped_hashset_uset.cpp deleted file mode 100644 index 15f1adc7..00000000 --- a/tests/test-hdr/set/hdr_intrusive_striped_hashset_uset.cpp +++ /dev/null @@ -1,206 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_intrusive_striped_set.h" -#include -#include - -namespace set { - namespace bi = boost::intrusive; - - namespace { - typedef IntrusiveStripedSetHdrTest::base_item< bi::unordered_set_base_hook<> > base_item_type; - typedef IntrusiveStripedSetHdrTest::member_item< bi::unordered_set_member_hook<> > member_item_type; - - struct hasher: private IntrusiveStripedSetHdrTest::hash_int - { - typedef IntrusiveStripedSetHdrTest::hash_int base_class; - - size_t operator()( int i ) const - { - return ~( base_class::operator()(i)); - } - template - size_t operator()( const Item& i ) const - { - return ~( base_class::operator()(i)); - } - size_t operator()( IntrusiveStripedSetHdrTest::find_key const& i) const - { - return ~( base_class::operator()(i)); - } - }; - - template - struct is_equal: private IntrusiveStripedSetHdrTest::cmp - { - typedef IntrusiveStripedSetHdrTest::cmp base_class; - - bool operator ()(const T& v1, const T& v2 ) const - { - return base_class::operator()( v1, v2 ) == 0; - } - - template - bool operator ()(const T& v1, const Q& v2 ) const - { - return base_class::operator()( v1, v2 ) == 0; - } - - template - bool operator ()(const Q& v1, const T& v2 ) const - { - return base_class::operator()( v1, v2 ) == 0; - } - }; - - template - struct dyn_buffer: public co::v::dynamic_buffer< T, Alloc > - { - typedef co::v::dynamic_buffer< T, Alloc > base_class; - public: - template - struct rebind { - typedef dyn_buffer other ; ///< Rebinding result type - }; - - dyn_buffer() - : base_class( Capacity ) - {} - }; - } - - void IntrusiveStripedSetHdrTest::Striped_unordered_set_basehook() - { - typedef ci::StripedSet< - bi::unordered_set - , bi::equal< is_equal > - , bi::power_2_buckets - , bi::incremental - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_unordered_set_basehook_bucket_threshold() - { - typedef ci::StripedSet< - bi::unordered_set - , bi::equal< is_equal > - , bi::power_2_buckets - , bi::incremental - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::buffer< co::v::static_buffer< cds::any_type, 64 > > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_unordered_set_basehook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::unordered_set - , bi::equal< is_equal > - , bi::power_2_buckets - , bi::incremental - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::buffer< dyn_buffer< 256, cds::any_type, std::allocator > > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(512) ); - test_with( s ); - } - - void IntrusiveStripedSetHdrTest::Striped_unordered_set_memberhook() - { - typedef ci::StripedSet< - bi::unordered_set, &member_item_type::hMember> - , bi::hash< hasher > - , bi::equal< is_equal > - , bi::power_2_buckets - , bi::incremental - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_unordered_set_memberhook_bucket_threshold() - { - typedef ci::StripedSet< - bi::unordered_set, &member_item_type::hMember> - , bi::hash< hasher > - , bi::equal< is_equal > - , bi::power_2_buckets - , bi::incremental - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::buffer< dyn_buffer< 64, cds::any_type, std::allocator > > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> > - ,co::mutex_policy< ci::striped_set::striping<> > - > set_type; - - test(); - } - - void IntrusiveStripedSetHdrTest::Striped_unordered_set_memberhook_bucket_threshold_rt() - { - typedef ci::StripedSet< - bi::unordered_set, &member_item_type::hMember> - , bi::hash< hasher > - , bi::equal< is_equal > - , bi::power_2_buckets - , bi::incremental - > - ,co::hash< IntrusiveStripedSetHdrTest::hash_int > - ,co::buffer< co::v::static_buffer< cds::any_type, 128 > > - ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> > - > set_type; - - set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) ); - test_with( s ); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_intrusive_striped_set.cpp b/tests/test-hdr/set/hdr_intrusive_striped_set.cpp deleted file mode 100644 index fd565eda..00000000 --- a/tests/test-hdr/set/hdr_intrusive_striped_set.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#include "set/hdr_intrusive_striped_set.h" -CPPUNIT_TEST_SUITE_REGISTRATION(set::IntrusiveStripedSetHdrTest); diff --git a/tests/test-hdr/set/hdr_intrusive_striped_set.h b/tests/test-hdr/set/hdr_intrusive_striped_set.h deleted file mode 100644 index 4cba53fb..00000000 --- a/tests/test-hdr/set/hdr_intrusive_striped_set.h +++ /dev/null @@ -1,823 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_INTRUSIVE_STRIPED_SET_H -#define CDSTEST_HDR_INTRUSIVE_STRIPED_SET_H - -#include "cppunit/cppunit_proxy.h" -#include - -#include - -// boost 1.59 bug: intrusive containers require implicit conversion from value_type to key_type -// Fixed in boost 1.60+ -#if BOOST_VERSION == 105900 -# define CDSTEST_BOOST_INTRUSIVE_REQUIRES_IMPLICIT_CONVERSION_WORKAROUND -#else -# define CDSTEST_BOOST_INTRUSIVE_REQUIRES_IMPLICIT_CONVERSION_WORKAROUND explicit -#endif - -// cds::intrusive namespace forward declaration -namespace cds { namespace intrusive {}} - -namespace set { - namespace ci = cds::intrusive; - namespace co = cds::opt; - - template - struct get_int_key - { - int operator()( T const & v ) const - { - return v.key(); - } - }; - - template <> - struct get_int_key - { - int operator()( int i ) const - { - return i; - } - }; - - // MichaelHashSet - class IntrusiveStripedSetHdrTest: public CppUnitMini::TestCase - { - public: - struct stat - { - unsigned int nDisposeCount ; // count of disposer calling - unsigned int nFindCount ; // count of find-functor calling - unsigned int nFindArgCount; - unsigned int nInsertCount; - unsigned int nUpdateNewCount; - unsigned int nUpdateCount; - unsigned int nEraseCount; - - stat() - { - memset( this, 0, sizeof(*this)); - } - - stat& operator=( stat const& s) - { - memcpy( this, &s, sizeof(*this)); - return *this; - } - }; - - struct item - { - int nKey; - int nVal; - - item() - {} - - explicit item( int key ) - : nKey( key ) - , nVal(0) - {} - - item(int key, int val) - : nKey( key ) - , nVal(val) - {} - - item(const item& v ) - : nKey( v.nKey ) - , nVal( v.nVal ) - {} - - int key() const - { - return nKey; - } - - int val() const - { - return nVal; - } - }; - - template - struct base_item - : public item - , public Hook - , public stat - - { - base_item() - {} - - CDSTEST_BOOST_INTRUSIVE_REQUIRES_IMPLICIT_CONVERSION_WORKAROUND - base_item( int key ) - : item( key ) - {} - - base_item(int key, int val) - : item( key, val ) - {} - - base_item(const base_item& v ) - : item( static_cast(v) ) - , stat() - {} - - operator int() const - { - return key(); - } - }; - - template - struct member_item - : public item - , public stat - { - Hook hMember; - - member_item() - {} - - CDSTEST_BOOST_INTRUSIVE_REQUIRES_IMPLICIT_CONVERSION_WORKAROUND - member_item( int key ) - : item( key ) - {} - - member_item(int key, int val) - : item( key, val ) - {} - - member_item(const member_item& v ) - : item( static_cast(v)) - , stat() - {} - - operator int() const - { - return key(); - } - }; - - struct find_key { - int nKey; - - find_key( int key ) - : nKey(key) - {} - }; - - struct hash_int { - size_t operator()( int i ) const - { - return co::v::hash()( i ); - } - template - size_t operator()( const Item& i ) const - { - return (*this)( i.key() ); - } - size_t operator()( find_key const& i) const - { - return co::v::hash()( i.nKey ); - } - }; - - template - struct less - { - bool operator ()(const T& v1, const T& v2 ) const - { - return v1.key() < v2.key(); - } - - template - bool operator ()(const T& v1, const Q& v2 ) const - { - return v1.key() < v2; - } - - template - bool operator ()(const Q& v1, const T& v2 ) const - { - return v1 < v2.key(); - } - - bool operator()( int i1, int i2 ) const - { - return i1 < i2; - } - }; - - template - struct cmp { - int operator ()(const T& v1, const T& v2 ) const - { - if ( v1.key() < v2.key() ) - return -1; - return v1.key() > v2.key() ? 1 : 0; - } - - template - int operator ()(const T& v1, const Q& v2 ) const - { - if ( v1.key() < v2 ) - return -1; - return v1.key() > v2 ? 1 : 0; - } - - template - int operator ()(const Q& v1, const T& v2 ) const - { - if ( v1 < v2.key() ) - return -1; - return v1 > v2.key() ? 1 : 0; - } - }; - - struct faked_disposer - { - template - void operator ()( T * p ) - { - ++p->nDisposeCount; - } - }; - - struct insert_functor { - template - void operator()( Item& e) - { - ++e.nInsertCount; - } - }; - - struct update_functor { - template - void operator()( bool bNew, Item& e, Item& arg ) - { - if ( bNew ) { - ++e.nUpdateNewCount; - CPPUNIT_ASSERT_CURRENT( &e == &arg ); - } - else - ++e.nUpdateCount; - } - }; - - struct erase_functor { - template< typename Item > - void operator()( Item& e ) - { - ++e.nEraseCount; - } - }; - - struct find_functor { - template - void operator()( Item& e, What& ) - { - ++e.nFindCount; - } - - template - void operator()( Item& e, Item& w ) - { - ++e.nFindCount; - ++w.nFindArgCount; - } - }; - - struct less2 { - template - bool operator()( Item const& e, find_key const& k ) const - { - return get_int_key()(e) < k.nKey; - } - template - bool operator()( find_key const& k, Item const& e ) const - { - return k.nKey < get_int_key()(e); - } - template - bool operator()( Item1 const& e, Item2 const& k ) const - { - return get_int_key()(e) < get_int_key()(k); - } - }; - - template - struct auto_dispose { - T * m_pArr; - auto_dispose( T * pArr ): m_pArr( pArr ) {} - ~auto_dispose() { delete[] m_pArr; } - }; - - template - void test_with(Set& s) - { - typedef typename Set::value_type value_type; - - int const k1 = 10; - int const k2 = 25; - int const k3 = 51; - - int const v1 = 25; - int const v2 = 56; - int const v3 = 23; - - value_type e1( k1, v1 ); - value_type e2( k2, v2 ); - value_type e3( k3, v3); - - stat s1 = e1; - stat s2 = e2; - stat s3 = e3; - - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( s.size() == 0 ); - - CPPUNIT_ASSERT( !s.contains(k1)); - CPPUNIT_ASSERT( !s.contains(k2)); - CPPUNIT_ASSERT( !s.contains(k3)); - - CPPUNIT_ASSERT( s.insert(e1)); - CPPUNIT_ASSERT( s.contains(e1)); - CPPUNIT_ASSERT( s.contains(k1)); - CPPUNIT_ASSERT( !s.contains(e2)); - CPPUNIT_ASSERT( !s.contains(e3)); - - CPPUNIT_ASSERT( e2.nInsertCount == 0 ); - CPPUNIT_ASSERT( s.insert(e2, insert_functor() )); - CPPUNIT_ASSERT( e2.nInsertCount == 1 ); - CPPUNIT_ASSERT( s.find(e1, find_functor() )); - CPPUNIT_ASSERT( e1.nFindCount == 1 ); - CPPUNIT_ASSERT( e1.nFindArgCount == 1 ); - CPPUNIT_ASSERT( s.find(k1, find_functor() )); - CPPUNIT_ASSERT( e1.nFindCount == 2 ); - CPPUNIT_ASSERT( e1.nFindArgCount == 1 ); - CPPUNIT_ASSERT( s.find(k2, find_functor() )); - CPPUNIT_ASSERT( e2.nFindCount == 1 ); - CPPUNIT_ASSERT( e2.nFindArgCount == 0 ); - CPPUNIT_ASSERT( s.find(e2, find_functor() )); - CPPUNIT_ASSERT( e2.nFindCount == 2 ); - CPPUNIT_ASSERT( e2.nFindArgCount == 1 ); - CPPUNIT_ASSERT( !s.find(k3, find_functor())); - CPPUNIT_ASSERT( e3.nFindCount == 0 ); - CPPUNIT_ASSERT( e3.nFindArgCount == 0 ); - CPPUNIT_ASSERT( !s.find(e3, find_functor())); - CPPUNIT_ASSERT( e3.nFindCount == 0 ); - CPPUNIT_ASSERT( e3.nFindArgCount == 0 ); - - s1 = e1 ; s2 = e2 ; s3 = e3; - - CPPUNIT_ASSERT( e3.nUpdateNewCount == 0 ); - CPPUNIT_ASSERT( e3.nUpdateCount == 0 ); - CPPUNIT_ASSERT(s.update(e3, update_functor(), false) == std::make_pair(false, false)); - CPPUNIT_ASSERT(e3.nUpdateNewCount == 0); - CPPUNIT_ASSERT(e3.nUpdateCount == 0); - CPPUNIT_ASSERT( s.update( e3, update_functor() ) == std::make_pair(true, true)); - CPPUNIT_ASSERT( e3.nUpdateNewCount == 1 ); - CPPUNIT_ASSERT( e3.nUpdateCount == 0 ); - CPPUNIT_ASSERT( s.find_with(find_key(k1), less2(), find_functor() )); - CPPUNIT_ASSERT( e1.nFindCount == s1.nFindCount + 1 ); - CPPUNIT_ASSERT( e1.nFindArgCount == s1.nFindArgCount ); - CPPUNIT_ASSERT( s.find_with(k1, less2(), find_functor() )); - CPPUNIT_ASSERT( e1.nFindCount == s1.nFindCount + 2 ); - CPPUNIT_ASSERT( e1.nFindArgCount == s1.nFindArgCount ); - CPPUNIT_ASSERT( s.find_with(k2, less2(), find_functor() )); - CPPUNIT_ASSERT( e2.nFindCount == s2.nFindCount + 1 ); - CPPUNIT_ASSERT( e2.nFindArgCount == s2.nFindArgCount ); - CPPUNIT_ASSERT( s.contains(find_key(k2), less2() )); - CPPUNIT_ASSERT( e2.nFindCount == s2.nFindCount + 1 ) ; // unchanged, no find_functor - CPPUNIT_ASSERT( e2.nFindArgCount == s2.nFindArgCount ); - CPPUNIT_ASSERT( s.contains(k3, less2() )); - CPPUNIT_ASSERT( e3.nFindCount == s3.nFindCount ) ; // unchanged, no find_functor - CPPUNIT_ASSERT( e3.nFindArgCount == s3.nFindArgCount ); - CPPUNIT_ASSERT( s.find_with(find_key(k3), less2(), find_functor() )); - CPPUNIT_ASSERT( e3.nFindCount == s3.nFindCount + 1 ); - CPPUNIT_ASSERT( e3.nFindArgCount == s3.nFindArgCount ); - - s1 = e1 ; s2 = e2 ; s3 = e3; - - // insert existing elements - { - value_type eu( k2, 1000 ); - CPPUNIT_ASSERT( !s.insert( eu )); - CPPUNIT_ASSERT( !s.insert( eu, insert_functor() )); - CPPUNIT_ASSERT( e2.nInsertCount == s2.nInsertCount ); - - CPPUNIT_ASSERT( s.update( eu, update_functor()) == std::make_pair(true, false)); - CPPUNIT_ASSERT( e2.nInsertCount == s2.nInsertCount ); - CPPUNIT_ASSERT( e2.nUpdateCount == s2.nUpdateCount + 1 ); - CPPUNIT_ASSERT( e2.nUpdateNewCount == s2.nUpdateNewCount ); - } - - s1 = e1 ; s2 = e2 ; s3 = e3; - - // unlink & erase test - { - value_type eu( k2, 10 ); - CPPUNIT_ASSERT( !s.unlink(eu)); - } - - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( s.size() == 3 ); - - CPPUNIT_ASSERT( s.unlink( e1 ) ); - CPPUNIT_ASSERT( s.erase_with( k2, less2() ) == &e2 ); - CPPUNIT_ASSERT( s.erase( e2 ) == nullptr ); - CPPUNIT_ASSERT( e3.nEraseCount == 0 ); - CPPUNIT_ASSERT( s.erase_with( k3, less2(), erase_functor()) == &e3 ); - CPPUNIT_ASSERT( e3.nEraseCount == 1 ); - CPPUNIT_ASSERT( s.erase( k3, erase_functor() ) == nullptr ); - CPPUNIT_ASSERT( e3.nEraseCount == 1 ); - - CPPUNIT_ASSERT( s.insert( e3 ) ); - CPPUNIT_ASSERT( s.erase( e3 ) == &e3 ); - CPPUNIT_ASSERT( e3.nEraseCount == 1 ); - - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( s.size() == 0 ); - - s1 = e1 ; s2 = e2 ; s3 = e3; - - // clear & clear_and_dispose test - CPPUNIT_ASSERT( s.insert(e1)); - CPPUNIT_ASSERT( s.insert(e2)); - CPPUNIT_ASSERT( s.insert(e3)); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( s.size() == 3 ); - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( s.size() == 0 ); - - CPPUNIT_ASSERT( s.insert(e1)); - CPPUNIT_ASSERT( s.insert(e2)); - CPPUNIT_ASSERT( s.insert(e3)); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( s.size() == 3 ); - - CPPUNIT_ASSERT( e1.nDisposeCount == 0 ); - CPPUNIT_ASSERT( e2.nDisposeCount == 0 ); - CPPUNIT_ASSERT( e3.nDisposeCount == 0 ); - s.clear_and_dispose( faked_disposer() ); - CPPUNIT_ASSERT( e1.nDisposeCount == 1 ); - CPPUNIT_ASSERT( e2.nDisposeCount == 1 ); - CPPUNIT_ASSERT( e3.nDisposeCount == 1 ); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( s.size() == 0 ); - - // resize test (up to 64K elements) - size_t const nSize = 64 * 1024; - value_type * arr = new value_type[nSize]; - auto_dispose ad(arr); - for ( size_t i = 0; i < nSize; ++i ) { - value_type * p = new (arr + i) value_type( (int) i, (int) i * 2 ); - CPPUNIT_ASSERT_EX( s.insert( *p, insert_functor() ), "i=" << i ); - CPPUNIT_ASSERT_EX( p->nInsertCount == 1, "i=" << i ); - //for ( size_t j = 0; j <= i; ++j ) { - // if ( !s.contains((int) j) ) { - // CPPUNIT_MSG( "Key " << j << " is not found after inserting key " << i ); - // } - //} - } - - for ( size_t i = 0; i < nSize; ++i ) - CPPUNIT_ASSERT_EX( s.contains((int) i), "Key " << i << " is not found" ); - - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( s.size() == nSize ); - s.clear_and_dispose( faked_disposer() ); - for ( size_t i = 0; i < nSize; ++i ) { - CPPUNIT_ASSERT_EX( arr[i].nDisposeCount == 1, "i=" << i ); - } - } - - template - void test() - { - // default ctor - { - Set s; - test_with(s); - } - - // ctor with explicit initial capacity - { - Set s(256); - test_with(s); - } - } - - template - void test_cuckoo() - { - unsigned int nProbesetSize = Set::node_type::probeset_size ? Set::node_type::probeset_size : 4; - Set s( 256, nProbesetSize, nProbesetSize / 2 ); - test_with( s ); - } - - // *********************************************************** - // Striped set - - void Striped_list_basehook_cmp(); - void Striped_list_basehook_less(); - void Striped_list_basehook_cmpmix(); - void Striped_list_basehook_bucket_threshold(); - void Striped_list_basehook_bucket_threshold_rt(); - void Striped_list_memberhook_cmp(); - void Striped_list_memberhook_less(); - void Striped_list_memberhook_cmpmix(); - void Striped_list_memberhook_bucket_threshold(); - void Striped_list_memberhook_bucket_threshold_rt(); - - void Striped_slist_basehook_cmp(); - void Striped_slist_basehook_less(); - void Striped_slist_basehook_cmpmix(); - void Striped_slist_basehook_bucket_threshold(); - void Striped_slist_basehook_bucket_threshold_rt(); - void Striped_slist_memberhook_cmp(); - void Striped_slist_memberhook_less(); - void Striped_slist_memberhook_cmpmix(); - void Striped_slist_memberhook_bucket_threshold(); - void Striped_slist_memberhook_bucket_threshold_rt(); - - void Striped_set_basehook(); - void Striped_set_basehook_bucket_threshold(); - void Striped_set_basehook_bucket_threshold_rt(); - void Striped_set_memberhook(); - void Striped_set_memberhook_bucket_threshold(); - void Striped_set_memberhook_bucket_threshold_rt(); - - void Striped_unordered_set_basehook(); - void Striped_unordered_set_basehook_bucket_threshold(); - void Striped_unordered_set_basehook_bucket_threshold_rt(); - void Striped_unordered_set_memberhook(); - void Striped_unordered_set_memberhook_bucket_threshold(); - void Striped_unordered_set_memberhook_bucket_threshold_rt(); - - void Striped_avl_set_basehook(); - void Striped_avl_set_basehook_bucket_threshold(); - void Striped_avl_set_basehook_bucket_threshold_rt(); - void Striped_avl_set_memberhook(); - void Striped_avl_set_memberhook_bucket_threshold(); - void Striped_avl_set_memberhook_bucket_threshold_rt(); - - void Striped_sg_set_basehook(); - void Striped_sg_set_basehook_bucket_threshold(); - void Striped_sg_set_basehook_bucket_threshold_rt(); - void Striped_sg_set_memberhook(); - void Striped_sg_set_memberhook_bucket_threshold(); - void Striped_sg_set_memberhook_bucket_threshold_rt(); - - void Striped_splay_set_basehook(); - void Striped_splay_set_basehook_bucket_threshold(); - void Striped_splay_set_basehook_bucket_threshold_rt(); - void Striped_splay_set_memberhook(); - void Striped_splay_set_memberhook_bucket_threshold(); - void Striped_splay_set_memberhook_bucket_threshold_rt(); - - void Striped_treap_set_basehook(); - void Striped_treap_set_basehook_bucket_threshold(); - void Striped_treap_set_basehook_bucket_threshold_rt(); - void Striped_treap_set_memberhook(); - void Striped_treap_set_memberhook_bucket_threshold(); - void Striped_treap_set_memberhook_bucket_threshold_rt(); - - // *********************************************************** - // Refinable set - - void Refinable_list_basehook_cmp(); - void Refinable_list_basehook_less(); - void Refinable_list_basehook_cmpmix(); - void Refinable_list_basehook_bucket_threshold(); - void Refinable_list_basehook_bucket_threshold_rt(); - void Refinable_list_memberhook_cmp(); - void Refinable_list_memberhook_less(); - void Refinable_list_memberhook_cmpmix(); - void Refinable_list_memberhook_bucket_threshold(); - void Refinable_list_memberhook_bucket_threshold_rt(); - - void Refinable_slist_basehook_cmp(); - void Refinable_slist_basehook_less(); - void Refinable_slist_basehook_cmpmix(); - void Refinable_slist_basehook_bucket_threshold(); - void Refinable_slist_basehook_bucket_threshold_rt(); - void Refinable_slist_memberhook_cmp(); - void Refinable_slist_memberhook_less(); - void Refinable_slist_memberhook_cmpmix(); - void Refinable_slist_memberhook_bucket_threshold(); - void Refinable_slist_memberhook_bucket_threshold_rt(); - - void Refinable_set_basehook(); - void Refinable_set_basehook_bucket_threshold(); - void Refinable_set_basehook_bucket_threshold_rt(); - void Refinable_set_memberhook(); - void Refinable_set_memberhook_bucket_threshold(); - void Refinable_set_memberhook_bucket_threshold_rt(); - - void Refinable_unordered_set_basehook(); - void Refinable_unordered_set_basehook_bucket_threshold(); - void Refinable_unordered_set_basehook_bucket_threshold_rt(); - void Refinable_unordered_set_memberhook(); - void Refinable_unordered_set_memberhook_bucket_threshold(); - void Refinable_unordered_set_memberhook_bucket_threshold_rt(); - - void Refinable_avl_set_basehook(); - void Refinable_avl_set_basehook_bucket_threshold(); - void Refinable_avl_set_basehook_bucket_threshold_rt(); - void Refinable_avl_set_memberhook(); - void Refinable_avl_set_memberhook_bucket_threshold(); - void Refinable_avl_set_memberhook_bucket_threshold_rt(); - - void Refinable_sg_set_basehook(); - void Refinable_sg_set_basehook_bucket_threshold(); - void Refinable_sg_set_basehook_bucket_threshold_rt(); - void Refinable_sg_set_memberhook(); - void Refinable_sg_set_memberhook_bucket_threshold(); - void Refinable_sg_set_memberhook_bucket_threshold_rt(); - - void Refinable_splay_set_basehook(); - void Refinable_splay_set_basehook_bucket_threshold(); - void Refinable_splay_set_basehook_bucket_threshold_rt(); - void Refinable_splay_set_memberhook(); - void Refinable_splay_set_memberhook_bucket_threshold(); - void Refinable_splay_set_memberhook_bucket_threshold_rt(); - - void Refinable_treap_set_basehook(); - void Refinable_treap_set_basehook_bucket_threshold(); - void Refinable_treap_set_basehook_bucket_threshold_rt(); - void Refinable_treap_set_memberhook(); - void Refinable_treap_set_memberhook_bucket_threshold(); - void Refinable_treap_set_memberhook_bucket_threshold_rt(); - - CPPUNIT_TEST_SUITE(IntrusiveStripedSetHdrTest) - // *********************************************************** - // Striped set - - CPPUNIT_TEST( Striped_list_basehook_cmp) - CPPUNIT_TEST( Striped_list_basehook_less) - CPPUNIT_TEST( Striped_list_basehook_cmpmix) - CPPUNIT_TEST( Striped_list_basehook_bucket_threshold) - CPPUNIT_TEST( Striped_list_basehook_bucket_threshold_rt) - CPPUNIT_TEST( Striped_list_memberhook_cmp) - CPPUNIT_TEST( Striped_list_memberhook_less) - CPPUNIT_TEST( Striped_list_memberhook_cmpmix) - CPPUNIT_TEST( Striped_list_memberhook_bucket_threshold) - CPPUNIT_TEST( Striped_list_memberhook_bucket_threshold_rt) - - CPPUNIT_TEST( Striped_slist_basehook_cmp) - CPPUNIT_TEST( Striped_slist_basehook_less) - CPPUNIT_TEST( Striped_slist_basehook_cmpmix) - CPPUNIT_TEST( Striped_slist_basehook_bucket_threshold) - CPPUNIT_TEST( Striped_slist_basehook_bucket_threshold_rt) - CPPUNIT_TEST( Striped_slist_memberhook_cmp) - CPPUNIT_TEST( Striped_slist_memberhook_less) - CPPUNIT_TEST( Striped_slist_memberhook_cmpmix) - CPPUNIT_TEST( Striped_slist_memberhook_bucket_threshold) - CPPUNIT_TEST( Striped_slist_memberhook_bucket_threshold_rt) - - CPPUNIT_TEST( Striped_set_basehook ) - CPPUNIT_TEST( Striped_set_basehook_bucket_threshold ) - CPPUNIT_TEST( Striped_set_basehook_bucket_threshold_rt ) - CPPUNIT_TEST( Striped_set_memberhook) - CPPUNIT_TEST( Striped_set_memberhook_bucket_threshold ) - CPPUNIT_TEST( Striped_set_memberhook_bucket_threshold_rt ) - - CPPUNIT_TEST( Striped_unordered_set_basehook ) - CPPUNIT_TEST( Striped_unordered_set_basehook_bucket_threshold ) - CPPUNIT_TEST( Striped_unordered_set_basehook_bucket_threshold_rt ) - CPPUNIT_TEST( Striped_unordered_set_memberhook) - CPPUNIT_TEST( Striped_unordered_set_memberhook_bucket_threshold ) - CPPUNIT_TEST( Striped_unordered_set_memberhook_bucket_threshold_rt ) - - CPPUNIT_TEST( Striped_avl_set_basehook ) - CPPUNIT_TEST( Striped_avl_set_basehook_bucket_threshold ) - CPPUNIT_TEST( Striped_avl_set_basehook_bucket_threshold_rt ) - CPPUNIT_TEST( Striped_avl_set_memberhook) - CPPUNIT_TEST( Striped_avl_set_memberhook_bucket_threshold ) - CPPUNIT_TEST( Striped_avl_set_memberhook_bucket_threshold_rt ) - - CPPUNIT_TEST( Striped_sg_set_basehook ) - CPPUNIT_TEST( Striped_sg_set_basehook_bucket_threshold ) - CPPUNIT_TEST( Striped_sg_set_basehook_bucket_threshold_rt ) - CPPUNIT_TEST( Striped_sg_set_memberhook) - CPPUNIT_TEST( Striped_sg_set_memberhook_bucket_threshold ) - CPPUNIT_TEST( Striped_sg_set_memberhook_bucket_threshold_rt ) - - CPPUNIT_TEST( Striped_splay_set_basehook ) - CPPUNIT_TEST( Striped_splay_set_basehook_bucket_threshold ) - CPPUNIT_TEST( Striped_splay_set_basehook_bucket_threshold_rt ) - CPPUNIT_TEST( Striped_splay_set_memberhook) - CPPUNIT_TEST( Striped_splay_set_memberhook_bucket_threshold ) - CPPUNIT_TEST( Striped_splay_set_memberhook_bucket_threshold_rt ) - - CPPUNIT_TEST( Striped_treap_set_basehook ) - CPPUNIT_TEST( Striped_treap_set_basehook_bucket_threshold ) - CPPUNIT_TEST( Striped_treap_set_basehook_bucket_threshold_rt ) - CPPUNIT_TEST( Striped_treap_set_memberhook) - CPPUNIT_TEST( Striped_treap_set_memberhook_bucket_threshold ) - CPPUNIT_TEST( Striped_treap_set_memberhook_bucket_threshold_rt ) - - // *********************************************************** - // Refinable set - - CPPUNIT_TEST( Refinable_list_basehook_cmp) - CPPUNIT_TEST( Refinable_list_basehook_less) - CPPUNIT_TEST( Refinable_list_basehook_cmpmix) - CPPUNIT_TEST( Refinable_list_basehook_bucket_threshold) - CPPUNIT_TEST( Refinable_list_basehook_bucket_threshold_rt) - CPPUNIT_TEST( Refinable_list_memberhook_cmp) - CPPUNIT_TEST( Refinable_list_memberhook_less) - CPPUNIT_TEST( Refinable_list_memberhook_cmpmix) - CPPUNIT_TEST( Refinable_list_memberhook_bucket_threshold) - CPPUNIT_TEST( Refinable_list_memberhook_bucket_threshold_rt) - - CPPUNIT_TEST( Refinable_slist_basehook_cmp) - CPPUNIT_TEST( Refinable_slist_basehook_less) - CPPUNIT_TEST( Refinable_slist_basehook_cmpmix) - CPPUNIT_TEST( Refinable_slist_basehook_bucket_threshold) - CPPUNIT_TEST( Refinable_slist_basehook_bucket_threshold_rt) - CPPUNIT_TEST( Refinable_slist_memberhook_cmp) - CPPUNIT_TEST( Refinable_slist_memberhook_less) - CPPUNIT_TEST( Refinable_slist_memberhook_cmpmix) - CPPUNIT_TEST( Refinable_slist_memberhook_bucket_threshold) - CPPUNIT_TEST( Refinable_slist_memberhook_bucket_threshold_rt) - - CPPUNIT_TEST( Refinable_set_basehook ) - CPPUNIT_TEST( Refinable_set_basehook_bucket_threshold ) - CPPUNIT_TEST( Refinable_set_basehook_bucket_threshold_rt ) - CPPUNIT_TEST( Refinable_set_memberhook) - CPPUNIT_TEST( Refinable_set_memberhook_bucket_threshold ) - CPPUNIT_TEST( Refinable_set_memberhook_bucket_threshold_rt ) - - CPPUNIT_TEST( Refinable_unordered_set_basehook ) - CPPUNIT_TEST( Refinable_unordered_set_basehook_bucket_threshold ) - CPPUNIT_TEST( Refinable_unordered_set_basehook_bucket_threshold_rt ) - CPPUNIT_TEST( Refinable_unordered_set_memberhook) - CPPUNIT_TEST( Refinable_unordered_set_memberhook_bucket_threshold ) - CPPUNIT_TEST( Refinable_unordered_set_memberhook_bucket_threshold_rt ) - - CPPUNIT_TEST( Refinable_avl_set_basehook ) - CPPUNIT_TEST( Refinable_avl_set_basehook_bucket_threshold ) - CPPUNIT_TEST( Refinable_avl_set_basehook_bucket_threshold_rt ) - CPPUNIT_TEST( Refinable_avl_set_memberhook) - CPPUNIT_TEST( Refinable_avl_set_memberhook_bucket_threshold ) - CPPUNIT_TEST( Refinable_avl_set_memberhook_bucket_threshold_rt ) - - CPPUNIT_TEST( Refinable_sg_set_basehook ) - CPPUNIT_TEST( Refinable_sg_set_basehook_bucket_threshold ) - CPPUNIT_TEST( Refinable_sg_set_basehook_bucket_threshold_rt ) - CPPUNIT_TEST( Refinable_sg_set_memberhook) - CPPUNIT_TEST( Refinable_sg_set_memberhook_bucket_threshold ) - CPPUNIT_TEST( Refinable_sg_set_memberhook_bucket_threshold_rt ) - - CPPUNIT_TEST( Refinable_splay_set_basehook ) - CPPUNIT_TEST( Refinable_splay_set_basehook_bucket_threshold ) - CPPUNIT_TEST( Refinable_splay_set_basehook_bucket_threshold_rt ) - CPPUNIT_TEST( Refinable_splay_set_memberhook) - CPPUNIT_TEST( Refinable_splay_set_memberhook_bucket_threshold ) - CPPUNIT_TEST( Refinable_splay_set_memberhook_bucket_threshold_rt ) - - CPPUNIT_TEST( Refinable_treap_set_basehook ) - CPPUNIT_TEST( Refinable_treap_set_basehook_bucket_threshold ) - CPPUNIT_TEST( Refinable_treap_set_basehook_bucket_threshold_rt ) - CPPUNIT_TEST( Refinable_treap_set_memberhook) - CPPUNIT_TEST( Refinable_treap_set_memberhook_bucket_threshold ) - CPPUNIT_TEST( Refinable_treap_set_memberhook_bucket_threshold_rt ) - CPPUNIT_TEST_SUITE_END() - }; -} // namespace set - -#endif // #ifndef CDSTEST_HDR_INTRUSIVE_STRIPED_SET_H diff --git a/tests/test-hdr/set/hdr_michael_set_dhp.cpp b/tests/test-hdr/set/hdr_michael_set_dhp.cpp deleted file mode 100644 index 3f19e03c..00000000 --- a/tests/test-hdr/set/hdr_michael_set_dhp.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include - -namespace set { - - namespace { - struct set_traits: public cc::michael_set::traits - { - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - }; - - struct DHP_cmp_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - - struct DHP_less_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::less less; - }; - - struct DHP_cmpmix_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - } - - void HashSetHdrTest::Michael_DHP_cmp() - { - typedef cc::MichaelList< cds::gc::DHP, item, DHP_cmp_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::DHP, list, set_traits > set; - test_int< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::DHP, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Michael_DHP_less() - { - typedef cc::MichaelList< cds::gc::DHP, item, DHP_less_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::DHP, list, set_traits > set; - test_int< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::DHP, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Michael_DHP_cmpmix() - { - typedef cc::MichaelList< cds::gc::DHP, item, DHP_cmpmix_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::DHP, list, set_traits > set; - test_int< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::DHP, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int< opt_set >(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_michael_set_hp.cpp b/tests/test-hdr/set/hdr_michael_set_hp.cpp deleted file mode 100644 index 7b44461f..00000000 --- a/tests/test-hdr/set/hdr_michael_set_hp.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include - -namespace set { - - namespace { - struct set_traits: public cc::michael_set::traits - { - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - }; - - struct HP_cmp_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - - struct HP_less_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::less less; - }; - - struct HP_cmpmix_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - } - - void HashSetHdrTest::Michael_HP_cmp() - { - typedef cc::MichaelList< cds::gc::HP, item, HP_cmp_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::HP, list, set_traits > set; - test_int< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::HP, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Michael_HP_less() - { - typedef cc::MichaelList< cds::gc::HP, item, HP_less_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::HP, list, set_traits > set; - test_int< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::HP, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Michael_HP_cmpmix() - { - typedef cc::MichaelList< cds::gc::HP, item, HP_cmpmix_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::HP, list, set_traits > set; - test_int< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::HP, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int< opt_set >(); - } - - -} // namespace set - -CPPUNIT_TEST_SUITE_REGISTRATION(set::HashSetHdrTest); - diff --git a/tests/test-hdr/set/hdr_michael_set_lazy_dhp.cpp b/tests/test-hdr/set/hdr_michael_set_lazy_dhp.cpp deleted file mode 100644 index 0f14571d..00000000 --- a/tests/test-hdr/set/hdr_michael_set_lazy_dhp.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include - -namespace set { - - namespace { - struct set_traits: public cc::michael_set::traits - { - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - }; - - struct DHP_cmp_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - - struct DHP_less_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::less less; - }; - - struct DHP_cmpmix_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - } - - void HashSetHdrTest::Lazy_DHP_cmp() - { - typedef cc::LazyList< cds::gc::DHP, item, DHP_cmp_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::DHP, list, set_traits > set; - test_int< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::DHP, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Lazy_DHP_less() - { - typedef cc::LazyList< cds::gc::DHP, item, DHP_less_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::DHP, list, set_traits > set; - test_int< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::DHP, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Lazy_DHP_cmpmix() - { - typedef cc::LazyList< cds::gc::DHP, item, DHP_cmpmix_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::DHP, list, set_traits > set; - test_int< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::DHP, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int< opt_set >(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_michael_set_lazy_hp.cpp b/tests/test-hdr/set/hdr_michael_set_lazy_hp.cpp deleted file mode 100644 index edb4f91e..00000000 --- a/tests/test-hdr/set/hdr_michael_set_lazy_hp.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include - -namespace set { - - namespace { - struct set_traits: public cc::michael_set::traits - { - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - }; - - struct HP_cmp_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - - struct HP_less_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::less less; - }; - - struct HP_cmpmix_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - } - - void HashSetHdrTest::Lazy_HP_cmp() - { - typedef cc::LazyList< cds::gc::HP, item, HP_cmp_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::HP, list, set_traits > set; - test_int< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::HP, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Lazy_HP_less() - { - typedef cc::LazyList< cds::gc::HP, item, HP_less_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::HP, list, set_traits > set; - test_int< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::HP, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Lazy_HP_cmpmix() - { - typedef cc::LazyList< cds::gc::HP, item, HP_cmpmix_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::HP, list, set_traits > set; - test_int< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::HP, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int< opt_set >(); - } - - -} // namespace set - diff --git a/tests/test-hdr/set/hdr_michael_set_lazy_nogc.cpp b/tests/test-hdr/set/hdr_michael_set_lazy_nogc.cpp deleted file mode 100644 index b74adca3..00000000 --- a/tests/test-hdr/set/hdr_michael_set_lazy_nogc.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include - -namespace set { - - namespace { - struct set_traits: public cc::michael_set::traits - { - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - }; - - struct nogc_cmp_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - - struct nogc_less_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::less less; - }; - - struct nogc_equal_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::equal equal_to; - static const bool sort = false; - }; - - struct nogc_cmpmix_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - } - - void HashSetHdrTest::Lazy_nogc_cmp() - { - typedef cc::LazyList< cds::gc::nogc, item, nogc_cmp_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::nogc, list, set_traits > set; - test_int_nogc< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::nogc, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_nogc< opt_set >(); - } - - void HashSetHdrTest::Lazy_nogc_less() - { - typedef cc::LazyList< cds::gc::nogc, item, nogc_less_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::nogc, list, set_traits > set; - test_int_nogc< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::nogc, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_nogc< opt_set >(); - } - - void HashSetHdrTest::Lazy_nogc_equal() - { - typedef cc::LazyList< cds::gc::nogc, item, nogc_equal_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::nogc, list, set_traits > set; - test_int_nogc_unordered< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::nogc, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_nogc_unordered< opt_set >(); - } - - void HashSetHdrTest::Lazy_nogc_cmpmix() - { - typedef cc::LazyList< cds::gc::nogc, item, nogc_cmpmix_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::nogc, list, set_traits > set; - test_int_nogc< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::nogc, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_nogc< opt_set >(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_michael_set_lazy_rcu_gpb.cpp b/tests/test-hdr/set/hdr_michael_set_lazy_rcu_gpb.cpp deleted file mode 100644 index 0b3163d2..00000000 --- a/tests/test-hdr/set/hdr_michael_set_lazy_rcu_gpb.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - - namespace { - typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - - struct set_traits: public cc::michael_set::traits - { - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - }; - - struct RCU_GPB_cmp_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - - struct RCU_GPB_less_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::less less; - }; - - struct RCU_GPB_cmpmix_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - } - - void HashSetHdrTest::Lazy_RCU_GPB_cmp() - { - typedef cc::LazyList< rcu_type, item, RCU_GPB_cmp_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - - void HashSetHdrTest::Lazy_RCU_GPB_less() - { - typedef cc::LazyList< rcu_type, item, RCU_GPB_less_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - - void HashSetHdrTest::Lazy_RCU_GPB_cmpmix() - { - typedef cc::LazyList< rcu_type, item, RCU_GPB_cmpmix_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_michael_set_lazy_rcu_gpi.cpp b/tests/test-hdr/set/hdr_michael_set_lazy_rcu_gpi.cpp deleted file mode 100644 index faf540ce..00000000 --- a/tests/test-hdr/set/hdr_michael_set_lazy_rcu_gpi.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - - namespace { - typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - - struct set_traits: public cc::michael_set::traits - { - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - }; - - struct RCU_GPI_cmp_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - - struct RCU_GPI_less_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::less less; - }; - - struct RCU_GPI_cmpmix_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - } - - void HashSetHdrTest::Lazy_RCU_GPI_cmp() - { - typedef cc::LazyList< rcu_type, item, RCU_GPI_cmp_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - - void HashSetHdrTest::Lazy_RCU_GPI_less() - { - typedef cc::LazyList< rcu_type, item, RCU_GPI_less_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - - void HashSetHdrTest::Lazy_RCU_GPI_cmpmix() - { - typedef cc::LazyList< rcu_type, item, RCU_GPI_cmpmix_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_michael_set_lazy_rcu_gpt.cpp b/tests/test-hdr/set/hdr_michael_set_lazy_rcu_gpt.cpp deleted file mode 100644 index 6aff4ceb..00000000 --- a/tests/test-hdr/set/hdr_michael_set_lazy_rcu_gpt.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - - namespace { - typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - - struct set_traits: public cc::michael_set::traits - { - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - }; - - struct RCU_GPT_cmp_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - - struct RCU_GPT_less_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::less less; - }; - - struct RCU_GPT_cmpmix_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - } - - void HashSetHdrTest::Lazy_RCU_GPT_cmp() - { - typedef cc::LazyList< rcu_type, item, RCU_GPT_cmp_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - - void HashSetHdrTest::Lazy_RCU_GPT_less() - { - typedef cc::LazyList< rcu_type, item, RCU_GPT_less_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - - void HashSetHdrTest::Lazy_RCU_GPT_cmpmix() - { - typedef cc::LazyList< rcu_type, item, RCU_GPT_cmpmix_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_michael_set_lazy_rcu_shb.cpp b/tests/test-hdr/set/hdr_michael_set_lazy_rcu_shb.cpp deleted file mode 100644 index 82a5218b..00000000 --- a/tests/test-hdr/set/hdr_michael_set_lazy_rcu_shb.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - - struct set_traits: public cc::michael_set::traits - { - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - }; - - struct RCU_SHB_cmp_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - - struct RCU_SHB_less_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::less less; - }; - - struct RCU_SHB_cmpmix_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - } -#endif - - void HashSetHdrTest::Lazy_RCU_SHB_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::LazyList< rcu_type, item, RCU_SHB_cmp_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu< opt_set >(); -#endif - } - - void HashSetHdrTest::Lazy_RCU_SHB_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::LazyList< rcu_type, item, RCU_SHB_less_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu< opt_set >(); -#endif - } - - void HashSetHdrTest::Lazy_RCU_SHB_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::LazyList< rcu_type, item, RCU_SHB_cmpmix_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu< opt_set >(); -#endif - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_michael_set_lazy_rcu_sht.cpp b/tests/test-hdr/set/hdr_michael_set_lazy_rcu_sht.cpp deleted file mode 100644 index 8a94495c..00000000 --- a/tests/test-hdr/set/hdr_michael_set_lazy_rcu_sht.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - - struct set_traits: public cc::michael_set::traits - { - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - }; - - struct RCU_SHT_cmp_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - - struct RCU_SHT_less_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::less less; - }; - - struct RCU_SHT_cmpmix_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - } -#endif - - void HashSetHdrTest::Lazy_RCU_SHT_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::LazyList< rcu_type, item, RCU_SHT_cmp_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu< opt_set >(); -#endif - } - - void HashSetHdrTest::Lazy_RCU_SHT_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::LazyList< rcu_type, item, RCU_SHT_less_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu< opt_set >(); -#endif - } - - void HashSetHdrTest::Lazy_RCU_SHT_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::LazyList< rcu_type, item, RCU_SHT_cmpmix_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu< opt_set >(); -#endif - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_michael_set_nogc.cpp b/tests/test-hdr/set/hdr_michael_set_nogc.cpp deleted file mode 100644 index 8471c0ab..00000000 --- a/tests/test-hdr/set/hdr_michael_set_nogc.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include - -namespace set { - - namespace { - struct set_traits: public cc::michael_set::traits - { - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - }; - - struct nogc_cmp_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - - struct nogc_less_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::less less; - }; - - struct nogc_cmpmix_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - } - - void HashSetHdrTest::Michael_nogc_cmp() - { - typedef cc::MichaelList< cds::gc::nogc, item, nogc_cmp_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::nogc, list, set_traits > set; - test_int_nogc< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::nogc, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_nogc< opt_set >(); - } - - void HashSetHdrTest::Michael_nogc_less() - { - typedef cc::MichaelList< cds::gc::nogc, item, nogc_less_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::nogc, list, set_traits > set; - test_int_nogc< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::nogc, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_nogc< opt_set >(); - } - - void HashSetHdrTest::Michael_nogc_cmpmix() - { - typedef cc::MichaelList< cds::gc::nogc, item, nogc_cmpmix_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< cds::gc::nogc, list, set_traits > set; - test_int_nogc< set >(); - - // option-based version - typedef cc::MichaelHashSet< cds::gc::nogc, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_nogc< opt_set >(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_michael_set_rcu_gpb.cpp b/tests/test-hdr/set/hdr_michael_set_rcu_gpb.cpp deleted file mode 100644 index cb1310f0..00000000 --- a/tests/test-hdr/set/hdr_michael_set_rcu_gpb.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - - namespace { - typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - - struct set_traits: public cc::michael_set::traits - { - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - }; - - struct RCU_GPB_cmp_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - - struct RCU_GPB_less_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::less less; - }; - - struct RCU_GPB_cmpmix_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - } - - void HashSetHdrTest::Michael_RCU_GPB_cmp() - { - typedef cc::MichaelList< rcu_type, item, RCU_GPB_cmp_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - - void HashSetHdrTest::Michael_RCU_GPB_less() - { - typedef cc::MichaelList< rcu_type, item, RCU_GPB_less_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - - void HashSetHdrTest::Michael_RCU_GPB_cmpmix() - { - typedef cc::MichaelList< rcu_type, item, RCU_GPB_cmpmix_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_michael_set_rcu_gpi.cpp b/tests/test-hdr/set/hdr_michael_set_rcu_gpi.cpp deleted file mode 100644 index 183f76ba..00000000 --- a/tests/test-hdr/set/hdr_michael_set_rcu_gpi.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - - namespace { - typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - - struct set_traits: public cc::michael_set::traits - { - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - }; - - struct RCU_GPI_cmp_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - - struct RCU_GPI_less_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::less less; - }; - - struct RCU_GPI_cmpmix_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - } - - void HashSetHdrTest::Michael_RCU_GPI_cmp() - { - typedef cc::MichaelList< rcu_type, item, RCU_GPI_cmp_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - - void HashSetHdrTest::Michael_RCU_GPI_less() - { - typedef cc::MichaelList< rcu_type, item, RCU_GPI_less_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - - void HashSetHdrTest::Michael_RCU_GPI_cmpmix() - { - typedef cc::MichaelList< rcu_type, item, RCU_GPI_cmpmix_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_michael_set_rcu_gpt.cpp b/tests/test-hdr/set/hdr_michael_set_rcu_gpt.cpp deleted file mode 100644 index 64f6b3aa..00000000 --- a/tests/test-hdr/set/hdr_michael_set_rcu_gpt.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - - namespace { - typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - - struct set_traits: public cc::michael_set::traits - { - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - }; - - struct RCU_GPT_cmp_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - - struct RCU_GPT_less_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::less less; - }; - - struct RCU_GPT_cmpmix_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - } - - void HashSetHdrTest::Michael_RCU_GPT_cmp() - { - typedef cc::MichaelList< rcu_type, item, RCU_GPT_cmp_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - - void HashSetHdrTest::Michael_RCU_GPT_less() - { - typedef cc::MichaelList< rcu_type, item, RCU_GPT_less_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - - void HashSetHdrTest::Michael_RCU_GPT_cmpmix() - { - typedef cc::MichaelList< rcu_type, item, RCU_GPT_cmpmix_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - - -} // namespace set diff --git a/tests/test-hdr/set/hdr_michael_set_rcu_shb.cpp b/tests/test-hdr/set/hdr_michael_set_rcu_shb.cpp deleted file mode 100644 index 7ae7a017..00000000 --- a/tests/test-hdr/set/hdr_michael_set_rcu_shb.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - - struct set_traits: public cc::michael_set::traits - { - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - }; - - struct RCU_SHB_cmp_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - - struct RCU_SHB_less_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::less less; - }; - - struct RCU_SHB_cmpmix_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - } -#endif - - void HashSetHdrTest::Michael_RCU_SHB_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelList< rcu_type, item, RCU_SHB_cmp_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); -#endif - } - - void HashSetHdrTest::Michael_RCU_SHB_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelList< rcu_type, item, RCU_SHB_less_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); -#endif - } - - void HashSetHdrTest::Michael_RCU_SHB_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelList< rcu_type, item, RCU_SHB_cmpmix_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); -#endif - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_michael_set_rcu_sht.cpp b/tests/test-hdr/set/hdr_michael_set_rcu_sht.cpp deleted file mode 100644 index f2d88a52..00000000 --- a/tests/test-hdr/set/hdr_michael_set_rcu_sht.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - - struct set_traits: public cc::michael_set::traits - { - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - }; - - struct RCU_SHT_cmp_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - - struct RCU_SHT_less_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::less less; - }; - - struct RCU_SHT_cmpmix_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - } -#endif - - void HashSetHdrTest::Michael_RCU_SHT_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelList< rcu_type, item, RCU_SHT_cmp_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); -#endif - } - - void HashSetHdrTest::Michael_RCU_SHT_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelList< rcu_type, item, RCU_SHT_less_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); -#endif - } - - void HashSetHdrTest::Michael_RCU_SHT_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelList< rcu_type, item, RCU_SHT_cmpmix_traits > list; - - // traits-based version - typedef cc::MichaelHashSet< rcu_type, list, set_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::MichaelHashSet< rcu_type, list, - cc::michael_set::make_traits< - cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); -#endif - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_refinable_hashset_boost_flat_set.cpp b/tests/test-hdr/set/hdr_refinable_hashset_boost_flat_set.cpp deleted file mode 100644 index 6e3c4547..00000000 --- a/tests/test-hdr/set/hdr_refinable_hashset_boost_flat_set.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" - -#include -#include - -#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500 -namespace set { - void StripedSetHdrTest::Refinable_boost_flat_set() - { - CPPUNIT_MESSAGE( "Skipped; for Microsoft Visual C++ 2013 and boost::container::flat_set you should use boost version 1.56 or above" ); - } -} - -#elif BOOST_VERSION >= 104800 - -#include -#include -#include - -namespace set { - - namespace { - typedef boost::container::flat_set< StripedSetHdrTest::item, StripedSetHdrTest::less > set_t; - - struct my_copy_policy { - typedef set_t::iterator iterator; - - void operator()( set_t& set, iterator itWhat ) - { - set.insert( *itWhat ); - } - }; - } - - void StripedSetHdrTest::Refinable_boost_flat_set() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::refinable<> > - > set_cmp; - test_striped< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - > set_less; - test_striped< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - > set_cmpmix; - test_striped< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< set_t - , co::mutex_policy< cc::striped_set::refinable > - , co::hash< hash_int > - , co::less< less > - > set_spin; - test_striped< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)"); - { - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(1024)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<256>"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - > set_less_resizing_lf16; - test_striped< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024)"); - { - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(1024) ); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> > - > set_less_resizing_sbt16; - test_striped< set_less_resizing_sbt16 >(); - - // Copy policy - CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped< set_copy_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped< set_swap_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped< set_move_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped< set_special_copy_item >(); - - } - -} // namespace set - -#else // BOOST_VERSION < 104800 - -namespace set { - void StripedSetHdrTest::Refinable_boost_flat_set() - { - CPPUNIT_MESSAGE( "Skipped; for boost::container::flat_set you should use boost version 1.48 or above" ); - } -} -#endif // BOOST_VERSION diff --git a/tests/test-hdr/set/hdr_refinable_hashset_boost_list.cpp b/tests/test-hdr/set/hdr_refinable_hashset_boost_list.cpp deleted file mode 100644 index 31724800..00000000 --- a/tests/test-hdr/set/hdr_refinable_hashset_boost_list.cpp +++ /dev/null @@ -1,193 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" - -#include -#include -#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500 -namespace set { - void StripedSetHdrTest::Refinable_boost_list() - { - CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::list you should use boost version 1.56 or above"); - } -} - -#elif BOOST_VERSION >= 104800 - -#include -#include -#include - -namespace set { - - namespace { - struct my_copy_policy { - typedef boost::container::list list_type; - typedef list_type::iterator iterator; - - void operator()( list_type& list, iterator itInsert, iterator itWhat ) - { - list.insert( itInsert, std::make_pair(itWhat->key(), itWhat->val()) ); - } - }; - - typedef boost::container::list sequence_t; - } - - void StripedSetHdrTest::Refinable_boost_list() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - > set_cmp; - test_striped2< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - > set_less; - test_striped2< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - > set_cmpmix; - test_striped2< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< sequence_t - , co::mutex_policy< cc::striped_set::refinable > - , co::hash< hash_int > - , co::less< less > - > set_spin; - test_striped2< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)"); - { - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(8)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<4>"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<4> > - > set_less_resizing_lf16; - test_striped2< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)"); - { - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> > - > set_less_resizing_sbt16; - test_striped2< set_less_resizing_sbt16 >(); - - - // Copy policy - CPPUNIT_MESSAGE( "copy_item"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped2< set_copy_item >(); - - CPPUNIT_MESSAGE( "swap_item"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped2< set_swap_item >(); - - CPPUNIT_MESSAGE( "move_item"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped2< set_move_item >(); - - CPPUNIT_MESSAGE( "special copy policy"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped2< set_special_copy_item >(); - } - -} // namespace set - -#else // BOOST_VERSION < 104800 - -namespace set { - void StripedSetHdrTest::Refinable_boost_list() - { - CPPUNIT_MESSAGE( "Skipped; for boost::container::list you should use boost version 1.48 or above" ); - } -} -#endif // BOOST_VERSION diff --git a/tests/test-hdr/set/hdr_refinable_hashset_boost_set.cpp b/tests/test-hdr/set/hdr_refinable_hashset_boost_set.cpp deleted file mode 100644 index e7165c66..00000000 --- a/tests/test-hdr/set/hdr_refinable_hashset_boost_set.cpp +++ /dev/null @@ -1,195 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" - -#include -#include -#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500 -namespace set { - void StripedSetHdrTest::Refinable_boost_set() - { - CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::set you should use boost version 1.56 or above"); - } -} - -#elif BOOST_VERSION >= 104800 - -#include -#include -#include - -namespace set { - - namespace { - typedef boost::container::set< StripedSetHdrTest::item, StripedSetHdrTest::less > set_t; - - struct my_copy_policy { - typedef set_t::iterator iterator; - - void operator()( set_t& set, iterator itWhat ) - { - set.insert( *itWhat ); - } - }; - } - - void StripedSetHdrTest::Refinable_boost_set() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::refinable<> > - > set_cmp; - test_striped< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - > set_less; - test_striped< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - > set_cmpmix; - test_striped< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< set_t - , co::mutex_policy< cc::striped_set::refinable > - , co::hash< hash_int > - , co::less< less > - > set_spin; - test_striped< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)"); - { - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(1024)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<256>"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - > set_less_resizing_lf16; - test_striped< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024)"); - { - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(1024) ); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> > - > set_less_resizing_sbt16; - test_striped< set_less_resizing_sbt16 >(); - - // Copy policy - CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped< set_copy_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped< set_swap_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped< set_move_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped< set_special_copy_item >(); - } - -} // namespace set - -#else // BOOST_VERSION < 104800 - -namespace set { - void StripedSetHdrTest::Refinable_boost_set() - { - CPPUNIT_MESSAGE( "Skipped; for boost::container::set you should use boost version 1.48 or above" ); - } -} -#endif // BOOST_VERSION diff --git a/tests/test-hdr/set/hdr_refinable_hashset_boost_stable_vector.cpp b/tests/test-hdr/set/hdr_refinable_hashset_boost_stable_vector.cpp deleted file mode 100644 index 98d9bf8f..00000000 --- a/tests/test-hdr/set/hdr_refinable_hashset_boost_stable_vector.cpp +++ /dev/null @@ -1,194 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" - -#include -#include -#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500 -namespace set { - void StripedSetHdrTest::Refinable_boost_stable_vector() - { - CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::stable_vector you should use boost version 1.56 or above"); - } -} - -#elif BOOST_VERSION >= 104800 - -#include -#include -#include -#include - -namespace set { - - namespace { - struct my_copy_policy { - typedef boost::container::stable_vector vector_type; - typedef vector_type::iterator iterator; - - void operator()( vector_type& vec, iterator itInsert, iterator itWhat ) - { - vec.insert( itInsert, *itWhat ); - } - }; - - typedef boost::container::stable_vector sequence_t; - } - - void StripedSetHdrTest::Refinable_boost_stable_vector() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - > set_cmp; - test_striped2< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - > set_less; - test_striped2< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - > set_cmpmix; - test_striped2< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< sequence_t - , co::mutex_policy< cc::striped_set::refinable > - , co::hash< hash_int > - , co::less< less > - > set_spin; - test_striped2< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)"); - { - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(8)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<4>"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<4> > - > set_less_resizing_lf16; - test_striped2< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)"); - { - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> > - > set_less_resizing_sbt16; - test_striped2< set_less_resizing_sbt16 >(); - - - // Copy policy - CPPUNIT_MESSAGE( "copy_item"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped2< set_copy_item >(); - - CPPUNIT_MESSAGE( "swap_item"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped2< set_swap_item >(); - - CPPUNIT_MESSAGE( "move_item"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped2< set_move_item >(); - - CPPUNIT_MESSAGE( "special copy policy"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped2< set_special_copy_item >(); - } - -} // namespace set - -#else // BOOST_VERSION < 104800 - -namespace set { - void StripedSetHdrTest::Refinable_boost_stable_vector() - { - CPPUNIT_MESSAGE( "Skipped; for boost::container::stable_vector you should use boost version 1.48 or above" ); - } -} -#endif // BOOST_VERSION diff --git a/tests/test-hdr/set/hdr_refinable_hashset_boost_unordered_set.cpp b/tests/test-hdr/set/hdr_refinable_hashset_boost_unordered_set.cpp deleted file mode 100644 index 51abbb2d..00000000 --- a/tests/test-hdr/set/hdr_refinable_hashset_boost_unordered_set.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" -#include -#include -#include - -namespace set { - - namespace { - struct equal_item - { - template - bool operator ()( T const& i1, T const& i2) const - { - return i1.key() == i2.key(); - } - }; - - typedef boost::unordered_set< StripedSetHdrTest::item, StripedSetHdrTest::hash_int, equal_item > set_t; - - struct my_copy_policy { - typedef set_t::iterator iterator; - - void operator()( set_t& set, iterator itWhat ) - { - set.insert( std::make_pair(itWhat->key(), itWhat->val()) ); - } - }; - } - - void StripedSetHdrTest::Refinable_boost_unordered_set() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::refinable<> > - > set_cmp; - test_striped< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - > set_less; - test_striped< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - > set_cmpmix; - test_striped< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< set_t - , co::mutex_policy< cc::striped_set::refinable > - , co::hash< hash_int > - , co::less< less > - > set_spin; - test_striped< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)"); - { - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(1024)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<256>"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - > set_less_resizing_lf16; - test_striped< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024)"); - { - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(1024) ); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> > - > set_less_resizing_sbt16; - test_striped< set_less_resizing_sbt16 >(); - - // Copy policy - CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped< set_copy_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped< set_swap_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped< set_move_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped< set_special_copy_item >(); - - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_refinable_hashset_boost_vector.cpp b/tests/test-hdr/set/hdr_refinable_hashset_boost_vector.cpp deleted file mode 100644 index 934b8490..00000000 --- a/tests/test-hdr/set/hdr_refinable_hashset_boost_vector.cpp +++ /dev/null @@ -1,195 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" - -#include -#include -#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500 -namespace set { - void StripedSetHdrTest::Refinable_boost_vector() - { - CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::vector you should use boost version 1.56 or above"); - } -} - -#elif BOOST_VERSION >= 104800 - -#include - -#include -#include -#include - -namespace set { - - namespace { - struct my_copy_policy { - typedef boost::container::vector vector_type; - typedef vector_type::iterator iterator; - - void operator()( vector_type& vec, iterator itInsert, iterator itWhat ) - { - vec.insert( itInsert, std::make_pair(itWhat->key(), itWhat->val()) ); - } - }; - - typedef boost::container::vector sequence_t; - } - - void StripedSetHdrTest::Refinable_boost_vector() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - > set_cmp; - test_striped2< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - > set_less; - test_striped2< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - > set_cmpmix; - test_striped2< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< sequence_t - , co::mutex_policy< cc::striped_set::refinable > - , co::hash< hash_int > - , co::less< less > - > set_spin; - test_striped2< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)"); - { - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(8)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<4>"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<4> > - > set_less_resizing_lf16; - test_striped2< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)"); - { - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> > - > set_less_resizing_sbt16; - test_striped2< set_less_resizing_sbt16 >(); - - - // Copy policy - CPPUNIT_MESSAGE( "copy_item"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped2< set_copy_item >(); - - CPPUNIT_MESSAGE( "swap_item"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped2< set_swap_item >(); - - CPPUNIT_MESSAGE( "move_item"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped2< set_move_item >(); - - CPPUNIT_MESSAGE( "special copy policy"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped2< set_special_copy_item >(); - } - -} // namespace set - -#else // BOOST_VERSION < 104800 - -namespace set { - void StripedSetHdrTest::Refinable_boost_vector() - { - CPPUNIT_MESSAGE( "Skipped; for boost::container::vector you should use boost version 1.48 or above" ); - } -} -#endif // BOOST_VERSION diff --git a/tests/test-hdr/set/hdr_refinable_hashset_hashset_std.cpp b/tests/test-hdr/set/hdr_refinable_hashset_hashset_std.cpp deleted file mode 100644 index 33227b05..00000000 --- a/tests/test-hdr/set/hdr_refinable_hashset_hashset_std.cpp +++ /dev/null @@ -1,181 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" -#include -#include -#include - -namespace set { - - namespace { - struct equal_item - { - template - bool operator ()( T const& i1, T const& i2) const - { - return i1.key() == i2.key(); - } - }; - - typedef std::unordered_set< StripedSetHdrTest::item, StripedSetHdrTest::hash_int, equal_item > set_t; - - struct my_copy_policy { - typedef set_t::iterator iterator; - - void operator()( set_t& set, iterator itWhat ) - { - set.insert( std::make_pair(itWhat->key(), itWhat->val()) ); - } - }; - } - - void StripedSetHdrTest::Refinable_hashset() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::refinable<> > - > set_cmp; - test_striped< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - > set_less; - test_striped< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - > set_cmpmix; - test_striped< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< set_t - , co::mutex_policy< cc::striped_set::refinable > - , co::hash< hash_int > - , co::less< less > - > set_spin; - test_striped< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)"); - { - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(1024)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<256>"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - > set_less_resizing_lf16; - test_striped< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024)"); - { - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(1024) ); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> > - > set_less_resizing_sbt16; - test_striped< set_less_resizing_sbt16 >(); - - // Copy policy - CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped< set_copy_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped< set_swap_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped< set_move_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped< set_special_copy_item >(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_refinable_hashset_list.cpp b/tests/test-hdr/set/hdr_refinable_hashset_list.cpp deleted file mode 100644 index e5525fee..00000000 --- a/tests/test-hdr/set/hdr_refinable_hashset_list.cpp +++ /dev/null @@ -1,170 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" -#include -#include -#include - -namespace set { - - namespace { - struct my_copy_policy { - typedef std::list list_type; - typedef list_type::iterator iterator; - - void operator()( list_type& list, iterator itInsert, iterator itWhat ) - { - list.insert( itInsert, std::make_pair(itWhat->key(), itWhat->val()) ); - } - }; - - typedef std::list sequence_t; - } - - void StripedSetHdrTest::Refinable_list() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - > set_cmp; - test_striped2< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - > set_less; - test_striped2< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - > set_cmpmix; - test_striped2< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< sequence_t - , co::mutex_policy< cc::striped_set::refinable > - , co::hash< hash_int > - , co::less< less > - > set_spin; - test_striped2< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)"); - { - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(8)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<4>"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<4> > - > set_less_resizing_lf16; - test_striped2< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)"); - { - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> > - > set_less_resizing_sbt16; - test_striped2< set_less_resizing_sbt16 >(); - - - // Copy policy - CPPUNIT_MESSAGE( "copy_item"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped2< set_copy_item >(); - - CPPUNIT_MESSAGE( "swap_item"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped2< set_swap_item >(); - - CPPUNIT_MESSAGE( "move_item"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped2< set_move_item >(); - - CPPUNIT_MESSAGE( "special copy policy"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped2< set_special_copy_item >(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_refinable_hashset_set.cpp b/tests/test-hdr/set/hdr_refinable_hashset_set.cpp deleted file mode 100644 index cfc9714c..00000000 --- a/tests/test-hdr/set/hdr_refinable_hashset_set.cpp +++ /dev/null @@ -1,172 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" -#include -#include -#include - -namespace set { - - namespace { - struct my_copy_policy { - typedef std::set > set_type; - typedef set_type::iterator iterator; - - void operator()( set_type& set, iterator itWhat ) - { - set.insert( std::make_pair(itWhat->key(), itWhat->val()) ); - } - }; - - typedef std::set > set_t; - } - - void StripedSetHdrTest::Refinable_set() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::refinable<> > - > set_cmp; - test_striped< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - > set_less; - test_striped< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - > set_cmpmix; - test_striped< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< set_t - , co::mutex_policy< cc::striped_set::refinable > - , co::hash< hash_int > - , co::less< less > - > set_spin; - test_striped< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)"); - { - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(1024)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<256>"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - > set_less_resizing_lf16; - test_striped< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024)"); - { - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(1024) ); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> > - > set_less_resizing_sbt16; - test_striped< set_less_resizing_sbt16 >(); - - // Copy policy - CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped< set_copy_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped< set_swap_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped< set_move_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_item"); - typedef cc::StripedSet< set_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped< set_special_copy_item >(); - } -} // namespace set diff --git a/tests/test-hdr/set/hdr_refinable_hashset_slist.cpp b/tests/test-hdr/set/hdr_refinable_hashset_slist.cpp deleted file mode 100644 index 9979d987..00000000 --- a/tests/test-hdr/set/hdr_refinable_hashset_slist.cpp +++ /dev/null @@ -1,193 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" -#include -#include -#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500 -namespace set { - void StripedSetHdrTest::Refinable_slist() - { - CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::slist you should use boost version 1.56 or above"); - } -} - -#elif BOOST_VERSION >= 104800 - -#include -#include -#include - -namespace set { - - namespace { - struct my_copy_policy { - typedef boost::container::slist list_type; - typedef list_type::iterator iterator; - - void operator()( list_type& list, iterator itInsert, iterator itWhat ) - { - list.insert_after( itInsert, StripedSetHdrTest::item(std::make_pair(itWhat->key(), itWhat->val())) ); - } - }; - - typedef boost::container::slist sequence_t; - } - - void StripedSetHdrTest::Refinable_slist() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - > set_cmp; - test_striped2< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - > set_less; - test_striped2< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - > set_cmpmix; - test_striped2< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< sequence_t - , co::mutex_policy< cc::striped_set::refinable > - , co::hash< hash_int > - , co::less< less > - > set_spin; - test_striped2< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)"); - { - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(8)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<4>"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<4> > - > set_less_resizing_lf16; - test_striped2< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)"); - { - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> > - > set_less_resizing_sbt16; - test_striped2< set_less_resizing_sbt16 >(); - - - // Copy policy - CPPUNIT_MESSAGE( "copy_item"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped2< set_copy_item >(); - - CPPUNIT_MESSAGE( "swap_item"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped2< set_swap_item >(); - - CPPUNIT_MESSAGE( "move_item"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped2< set_move_item >(); - - CPPUNIT_MESSAGE( "special copy policy"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped2< set_special_copy_item >(); - } - -} // namespace set - -#else - -namespace set { - void StripedSetHdrTest::Refinable_slist() - { - CPPUNIT_MESSAGE("Skipped; for boost::container::slist you should use boost version 1.48 or above"); - } -} // namespace set - -#endif diff --git a/tests/test-hdr/set/hdr_refinable_hashset_vector.cpp b/tests/test-hdr/set/hdr_refinable_hashset_vector.cpp deleted file mode 100644 index c215e521..00000000 --- a/tests/test-hdr/set/hdr_refinable_hashset_vector.cpp +++ /dev/null @@ -1,170 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" -#include -#include -#include - -namespace set { - - namespace { - struct my_copy_policy { - typedef std::vector vector_type; - typedef vector_type::iterator iterator; - - void operator()( vector_type& vec, iterator itInsert, iterator itWhat ) - { - vec.insert( itInsert, std::make_pair(itWhat->key(), itWhat->val()) ); - } - }; - - typedef std::vector sequence_t; - } - - void StripedSetHdrTest::Refinable_vector() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - > set_cmp; - test_striped2< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - > set_less; - test_striped2< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - > set_cmpmix; - test_striped2< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< sequence_t - , co::mutex_policy< cc::striped_set::refinable > - , co::hash< hash_int > - , co::less< less > - > set_spin; - test_striped2< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)"); - { - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(8)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<4>"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<4> > - > set_less_resizing_lf16; - test_striped2< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)"); - { - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> > - > set_less_resizing_sbt16; - test_striped2< set_less_resizing_sbt16 >(); - - - // Copy policy - CPPUNIT_MESSAGE( "copy_item"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped2< set_copy_item >(); - - CPPUNIT_MESSAGE( "swap_item"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped2< set_swap_item >(); - - CPPUNIT_MESSAGE( "move_item"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped2< set_move_item >(); - - CPPUNIT_MESSAGE( "special copy policy"); - typedef cc::StripedSet< sequence_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped2< set_special_copy_item >(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_set.h b/tests/test-hdr/set/hdr_set.h deleted file mode 100644 index cc805aac..00000000 --- a/tests/test-hdr/set/hdr_set.h +++ /dev/null @@ -1,1432 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_SET_H -#define CDSTEST_HDR_SET_H - -#include "cppunit/cppunit_proxy.h" -#include "size_check.h" - -#include -#include -#include // ref - -// forward namespace declaration -namespace cds { - namespace container {} - namespace opt {} -} - -namespace set { - using misc::check_size; - - namespace cc = cds::container; - namespace co = cds::opt; - - - class HashSetHdrTest: public CppUnitMini::TestCase - { - public: - struct stat - { - unsigned int nFindCount ; // count of find-functor calling - unsigned int nUpdateNewCount; - unsigned int nUpdateCount; - - stat() - { - memset( this, 0, sizeof(*this)); - } - - void copy( stat const& s ) - { - nFindCount = s.nFindCount; - nUpdateCount = s.nUpdateCount; - nUpdateNewCount = s.nUpdateNewCount; - } - }; - - struct item: public stat - { - int nKey; - int nVal; - - item() - {} - - item( int key ) - : nKey( key ) - , nVal( key ) - {} - - item (int key, int val ) - : nKey(key) - , nVal( val ) - {} - - item( std::pair const& p ) - : nKey( p.first ) - , nVal( p.second ) - {} - - item( item const& i ) - : nKey( i.nKey ) - , nVal( i.nVal ) - {} - - item& operator=(item const& i) - { - nKey = i.nKey; - nVal = i.nVal; - stat::copy(i); - - return *this; - } - - item( item&& i ) - : nKey( i.nKey ) - , nVal( i.nVal ) - {} - - //item& operator=(item&& i) - //{ - // nKey = i.nKey; - // nVal = i.nVal; - // return *this; - //} - - int key() const - { - return nKey; - } - - int val() const - { - return nVal; - } - }; - - struct hash_int { - size_t operator()( int i ) const - { - return co::v::hash()( i ); - } - - size_t operator()( std::pair const& i ) const - { - return co::v::hash()( i.first ); - } - - template - size_t operator()( Item const& i ) const - { - return (*this)( i.key() ); - } - }; - - struct simple_item_counter { - size_t m_nCount; - - simple_item_counter() - : m_nCount(0) - {} - - size_t operator ++() - { - return ++m_nCount; - } - - size_t operator --() - { - return --m_nCount; - } - - void reset() - { - m_nCount = 0; - } - - operator size_t() const - { - return m_nCount; - } - }; - - template - struct less - { - bool operator ()(const T& v1, const T& v2 ) const - { - return v1.key() < v2.key(); - } - - template - bool operator ()(const T& v1, const Q& v2 ) const - { - return v1.key() < v2; - } - - template - bool operator ()(const Q& v1, const T& v2 ) const - { - return v1 < v2.key(); - } - - bool operator ()( std::pair const& v1, const T& v2 ) const - { - return v1.first < v2.key(); - } - - bool operator ()(const T& v1, std::pair const& v2 ) const - { - return v1.key() < v2.first; - } - }; - - struct other_item { - int nKey; - - other_item( int key ) - : nKey(key) - {} - - int key() const - { - return nKey; - } - }; - - struct other_less - { - template - bool operator ()(T const& v1, other_item const& v2 ) const - { - return v1.key() < v2.nKey; - } - template - bool operator ()(other_item const& v1, T const& v2 ) const - { - return v1.nKey < v2.key(); - } - }; - - template - struct cmp { - int operator ()(const T& v1, const T& v2 ) const - { - if ( v1.key() < v2.key() ) - return -1; - return v1.key() > v2.key() ? 1 : 0; - } - - template - int operator ()(const T& v1, const Q& v2 ) const - { - if ( v1.key() < v2 ) - return -1; - return v1.key() > v2 ? 1 : 0; - } - - template - int operator ()(const Q& v1, const T& v2 ) const - { - if ( v1 < v2.key() ) - return -1; - return v1 > v2.key() ? 1 : 0; - } - - int operator()( std::pair const& v1, T const& v2 ) const - { - if ( v1.first < v2.key() ) - return -1; - return v1.first > v2.key() ? 1 : 0; - } - - int operator()( T const& v1, std::pair const& v2 ) const - { - if ( v1.key() < v2.first ) - return -1; - return v1.key() > v2.first ? 1 : 0; - } - }; - - template - struct equal - { - bool operator ()(const T& v1, const T& v2 ) const - { - return v1.key() == v2.key(); - } - - template - bool operator ()(const T& v1, const Q& v2 ) const - { - return v1.key() == v2; - } - - template - bool operator ()(const Q& v1, const T& v2 ) const - { - return v1 == v2.key(); - } - - bool operator ()( std::pair const& v1, const T& v2 ) const - { - return v1.first == v2.key(); - } - - bool operator ()(const T& v1, std::pair const& v2 ) const - { - return v1.key() == v2.first; - } - }; - - struct find_functor - { - template - void operator()( Item& i, T& /*val*/ ) const - { - ++i.nFindCount; - } - template - void operator()( Item& i, T const& /*val*/ ) const - { - ++i.nFindCount; - } - }; - - template - struct copy_found - { - Item m_found; - - template - void operator()( Item& i, T& /*val*/ ) - { - m_found = i; - } - - void operator()( Item const& i ) - { - m_found = i; - } - }; - - struct insert_functor - { - template - void operator()(Item& i ) - { - i.nVal = i.nKey * 100; - } - }; - - template - static void udate_func( bool bNew, Item& i, Q& /*val*/ ) - { - if ( bNew ) - ++i.nUpdateNewCount; - else - ++i.nUpdateCount; - } - - struct udate_functor - { - template - void operator()( bool bNew, Item& i, Q& val ) - { - udate_func( bNew, i, val ); - } - }; - - template - void test_int() - { - Set s( 100, 4 ); - test_int_with( s ); - - // extract/get test - CPPUNIT_ASSERT( s.empty() ); - { - const int nLimit = 100; - typename Set::guarded_ptr gp; - int arrRandom[nLimit]; - for ( int i = 0; i < nLimit; ++i ) - arrRandom[i] = i; - shuffle( arrRandom, arrRandom + nLimit ); - - for ( int i = 0; i < nLimit; ++i ) - CPPUNIT_ASSERT( s.insert( arrRandom[i] )); - - for ( int i = 0; i < nLimit; ++i ) { - int nKey = arrRandom[i]; - gp = s.get( nKey ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == nKey ); - CPPUNIT_CHECK( gp->nVal == nKey ); - gp.release(); - - gp = s.extract( nKey ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == nKey ); - CPPUNIT_CHECK( gp->nVal == nKey ); - gp.release(); - CPPUNIT_CHECK( !s.get( nKey ) ); - - gp = s.extract( nKey ); - CPPUNIT_CHECK( !gp ); - CPPUNIT_CHECK( gp.empty()); - } - CPPUNIT_ASSERT( s.empty() ); - - - for ( int i = 0; i < nLimit; ++i ) - CPPUNIT_ASSERT( s.insert( arrRandom[i] )); - - for ( int i = 0; i < nLimit; ++i ) { - int nKey = arrRandom[i]; - gp = s.get_with( other_item( nKey ), other_less() ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == nKey ); - CPPUNIT_CHECK( gp->nVal == nKey ); - gp.release(); - - gp = s.extract_with( other_item( nKey ), other_less() ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == nKey ); - CPPUNIT_CHECK( gp->nVal == nKey ); - gp.release(); - - gp = s.get_with( other_item( nKey ), other_less() ); - CPPUNIT_CHECK( !gp ); - - CPPUNIT_CHECK( !s.extract_with(other_item(nKey), other_less() )); - CPPUNIT_CHECK( gp.empty()); - } - CPPUNIT_ASSERT( s.empty() ); - } - - // iterator test - test_iter(); - } - - template - void test_int_rcu() - { - Set s( 100, 4 ); - test_int_with( s ); - - // extract/get test - { - typedef typename Set::gc rcu; - typedef typename Set::rcu_lock rcu_lock; - typedef typename Set::value_type value_type; - typename Set::exempt_ptr ep; - - static size_t const nLimit = 100; - int arr[nLimit]; - for ( size_t i = 0; i < nLimit; ++i ) - arr[i] = (int) i; - shuffle( arr, arr + nLimit ); - - for ( size_t i = 0; i < nLimit; ++i ) - CPPUNIT_ASSERT( s.insert( arr[i] )); - - for ( size_t i = 0; i < nLimit; i += 2 ) { - value_type * pVal; - int nKey = arr[i]; - { - rcu_lock l; - pVal = s.get( nKey ); - CPPUNIT_ASSERT( pVal != nullptr ); - CPPUNIT_CHECK( pVal->nKey == nKey ); - CPPUNIT_CHECK( pVal->nVal == nKey ); - - ep = s.extract( nKey ); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty() ); - CPPUNIT_CHECK( pVal->nKey == ep->nKey ); - CPPUNIT_CHECK( pVal->nVal == (*ep).nVal ); - } - ep.release(); - { - rcu_lock l; - CPPUNIT_CHECK( s.get( nKey ) == nullptr ); - ep = s.extract( nKey ); - CPPUNIT_CHECK( !ep ); - CPPUNIT_CHECK( ep.empty() ); - - nKey = arr[i+1]; - pVal = s.get_with( other_item(nKey), other_less() ); - CPPUNIT_ASSERT( pVal != nullptr ); - CPPUNIT_CHECK( pVal->nKey == nKey ); - CPPUNIT_CHECK( pVal->nVal == nKey ); - - ep = s.extract_with( other_item( nKey ), other_less() ); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty() ); - CPPUNIT_CHECK( pVal->nKey == ep->nKey ); - CPPUNIT_CHECK( pVal->nVal == (*ep).nVal ); - } - ep.release(); - { - rcu_lock l; - CPPUNIT_CHECK( s.get_with( other_item( nKey ), other_less() ) == nullptr ); - CPPUNIT_CHECK( !s.extract_with( other_item(nKey), other_less() )); - CPPUNIT_CHECK( ep.empty() ); - } - } - CPPUNIT_CHECK( s.empty() ); - CPPUNIT_CHECK( check_size( s, 0 )); - { - rcu_lock l; - CPPUNIT_CHECK( s.get( int( nLimit / 2 ) ) == nullptr ); - ep = s.extract( int( nLimit / 2 ) ); - CPPUNIT_CHECK( !ep ); - CPPUNIT_CHECK( ep.empty() ); - } - } - - // iterator test - test_iter(); - } - - template - void test_int_rcu_michael_list() - { - Set s( 100, 4 ); - test_int_with( s ); - - // extract/get test - { - typedef typename Set::gc rcu; - typedef typename Set::rcu_lock rcu_lock; - typedef typename Set::value_type value_type; - typename Set::exempt_ptr ep; - typename Set::raw_ptr gp; - - static size_t const nLimit = 100; - int arr[nLimit]; - for ( size_t i = 0; i < nLimit; ++i ) - arr[i] = (int) i; - shuffle( arr, arr + nLimit ); - - for ( size_t i = 0; i < nLimit; ++i ) - CPPUNIT_ASSERT( s.insert( arr[i] )); - - for ( size_t i = 0; i < nLimit; i += 2 ) { - int nKey = arr[i]; - { - rcu_lock l; - gp = s.get( nKey ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_CHECK( gp->nKey == nKey ); - CPPUNIT_CHECK( gp->nVal == nKey ); - } - gp.release(); - - ep = s.extract( nKey ); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty() ); - CPPUNIT_CHECK( nKey == ep->nKey ); - CPPUNIT_CHECK( nKey == (*ep).nVal ); - ep.release(); - - { - rcu_lock l; - CPPUNIT_CHECK( !s.get( nKey )); - } - ep = s.extract( nKey ); - CPPUNIT_CHECK( !ep ); - CPPUNIT_CHECK( ep.empty() ); - - { - rcu_lock l; - nKey = arr[i+1]; - gp = s.get_with( other_item(nKey), other_less() ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_CHECK( gp->nKey == nKey ); - CPPUNIT_CHECK( gp->nVal == nKey ); - } - gp.release(); - - ep = s.extract_with( other_item( nKey ), other_less() ); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty() ); - CPPUNIT_CHECK( nKey == ep->nKey ); - CPPUNIT_CHECK( nKey == (*ep).nVal ); - ep.release(); - - { - rcu_lock l; - CPPUNIT_CHECK( !s.get_with( other_item( nKey ), other_less())); - } - CPPUNIT_CHECK( !s.extract_with( other_item(nKey), other_less() )); - CPPUNIT_CHECK( ep.empty() ); - } - CPPUNIT_CHECK( s.empty() ); - CPPUNIT_CHECK( check_size( s, 0 )); - - { - rcu_lock l; - CPPUNIT_CHECK( !s.get( int( nLimit / 2 ))); - } - - ep = s.extract( int( nLimit / 2 ) ); - CPPUNIT_CHECK( !ep ); - CPPUNIT_CHECK( ep.empty() ); - } - - // iterator test - test_iter(); - } - - - template - void test_int_with( Set& s) - { - typedef typename Set::value_type value_type; - - item itm; - int key; - - // insert/find test - CPPUNIT_ASSERT( !s.contains( 10 ) ); - CPPUNIT_ASSERT( s.insert( 10 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( s.contains( 10 ) ); - - CPPUNIT_ASSERT( !s.insert( 10 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 )); - - CPPUNIT_ASSERT( !s.contains( 20, less() ) ); - CPPUNIT_ASSERT( s.insert( std::make_pair(20, 25) )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( s.contains( 10, less() ) ); - CPPUNIT_ASSERT( s.contains( key = 20 ) ); - CPPUNIT_ASSERT( s.find_with( key, less(), find_functor() ) ); - { - copy_found f; - key = 20; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 20 ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - CPPUNIT_ASSERT( f.m_found.nFindCount == 1 ); - } - CPPUNIT_ASSERT( s.find( key, find_functor() ) ); - { - copy_found f; - key = 20; - CPPUNIT_ASSERT( s.find_with( key, less(), std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 20 ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - CPPUNIT_ASSERT( f.m_found.nFindCount == 2 ); - } - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - - CPPUNIT_ASSERT( !s.contains( 25 ) ); - CPPUNIT_ASSERT( s.insert( std::make_pair(25, -1), insert_functor() )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - { - copy_found f; - key = 25; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 25 ); - CPPUNIT_ASSERT( f.m_found.nVal == 2500 ); - } - - // update test - key = 10; - { - copy_found f; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 10 ); - CPPUNIT_ASSERT( f.m_found.nVal == 10 ); - CPPUNIT_ASSERT( f.m_found.nUpdateCount == 0 ); - CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 0 ); - } - std::pair updateResult = s.update( key, udate_functor() ); - CPPUNIT_ASSERT( updateResult.first && !updateResult.second ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - { - copy_found f; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 10 ); - CPPUNIT_ASSERT( f.m_found.nVal == 10 ); - CPPUNIT_ASSERT( f.m_found.nUpdateCount == 1 ); - CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 0 ); - } - - updateResult = s.update(std::make_pair(13, 1300), udate_functor(), false); - CPPUNIT_ASSERT(!updateResult.first && !updateResult.second); - CPPUNIT_ASSERT(check_size(s, 3)); - - updateResult = s.update( std::make_pair(13, 1300), udate_functor() ); - CPPUNIT_ASSERT( updateResult.first && updateResult.second ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 4 )); - { - copy_found f; - key = 13; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 13 ); - CPPUNIT_ASSERT( f.m_found.nVal == 1300 ); - CPPUNIT_ASSERT( f.m_found.nUpdateCount == 0 ); - CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 1 ); - } - - // erase test - CPPUNIT_ASSERT( s.erase(13) ); - CPPUNIT_ASSERT( !s.contains( 13 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - CPPUNIT_ASSERT( !s.erase(13) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - CPPUNIT_ASSERT( s.contains( 10 )); - CPPUNIT_ASSERT( s.erase_with( 10, less() )); - CPPUNIT_ASSERT( !s.contains( 10 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( !s.erase_with(10, less()) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - - CPPUNIT_ASSERT( s.contains(20) ); - { - copy_found f; - CPPUNIT_ASSERT( s.erase( 20, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 20 ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - - CPPUNIT_ASSERT( s.insert(235)) - CPPUNIT_ASSERT( s.erase_with( 235, less(), std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 235 ); - CPPUNIT_ASSERT( f.m_found.nVal == 235 ); - } - CPPUNIT_ASSERT( !s.contains( 20 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 )); - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - // emplace test - CPPUNIT_ASSERT( s.emplace( 151 )) ; // key = 151, val = 151 - CPPUNIT_ASSERT( s.emplace( 174, 471 )) ; // key = 174, val = 471 - CPPUNIT_ASSERT( s.emplace( std::make_pair( 190, 91 ) )) ; // key == 190, val = 91 - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - CPPUNIT_ASSERT( s.contains(151)); - CPPUNIT_ASSERT( s.contains(174, less())); - CPPUNIT_ASSERT( s.contains(190)); - - { - copy_found f; - key = 151; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 151 ); - CPPUNIT_ASSERT( f.m_found.nVal == 151 ); - - key = 174; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 174 ); - CPPUNIT_ASSERT( f.m_found.nVal == 471 ); - - key = 190; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 190 ); - CPPUNIT_ASSERT( f.m_found.nVal == 91 ); - } - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - } - - - template - void test_int_nogc() - { - typedef typename Set::value_type value_type; - typedef typename Set::iterator iterator; - typedef typename Set::const_iterator const_iterator; - - { - Set s( 52, 4 ); - iterator it; - - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - // insert - it = s.insert( 10 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 10 ); - CPPUNIT_ASSERT( it->val() == 10 ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( s.insert( 10 ) == s.end() ); - - it = s.insert( std::make_pair( 50, 25 )); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 50 ); - CPPUNIT_ASSERT( it->val() == 25 ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( s.insert( 50 ) == s.end() ); - - // update - std::pair< iterator, bool> updateResult; - updateResult = s.update(20, false); - CPPUNIT_ASSERT(updateResult.first == s.end()); - CPPUNIT_ASSERT(!updateResult.second); - CPPUNIT_ASSERT(check_size(s, 2)); - - updateResult = s.update( 20 ); - CPPUNIT_ASSERT( updateResult.first != s.end() ); - CPPUNIT_ASSERT( updateResult.second ); - CPPUNIT_ASSERT( updateResult.first->key() == 20 ); - CPPUNIT_ASSERT( updateResult.first->val() == 20 ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - updateResult = s.update( std::make_pair( 20, 200 )); - CPPUNIT_ASSERT( updateResult.first != s.end() ); - CPPUNIT_ASSERT( !updateResult.second ); - CPPUNIT_ASSERT( updateResult.first->key() == 20 ); - CPPUNIT_ASSERT( updateResult.first->val() == 20 ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - updateResult.first->nVal = 22; - - updateResult = s.update( std::make_pair( 30, 33 )); - CPPUNIT_ASSERT( updateResult.first != s.end() ); - CPPUNIT_ASSERT( updateResult.second ); - CPPUNIT_ASSERT( updateResult.first->key() == 30 ); - CPPUNIT_ASSERT( updateResult.first->val() == 33 ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 4 )); - - // find - it = s.contains( 10 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 10 ); - CPPUNIT_ASSERT( it->val() == 10 ); - - it = s.contains( 20, less() ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 20 ); - CPPUNIT_ASSERT( it->val() == 22 ); - - it = s.contains( 30 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 30 ); - CPPUNIT_ASSERT( it->val() == 33 ); - - it = s.contains( 40 ); - CPPUNIT_ASSERT( it == s.end() ); - - it = s.contains( 50 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 50 ); - CPPUNIT_ASSERT( it->val() == 25 ); - - // emplace test - it = s.emplace( 151 ) ; // key = 151, val = 151 - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 151 ); - CPPUNIT_ASSERT( it->val() == 151 ); - - it = s.emplace( 174, 471 ) ; // key == 174, val = 471 - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 174 ); - CPPUNIT_ASSERT( it->val() == 471 ); - - it = s.emplace( std::make_pair( 190, 91 )) ; // key == 190, val = 91 - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 190 ); - CPPUNIT_ASSERT( it->val() == 91 ); - - it = s.contains( 174 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 174 ); - CPPUNIT_ASSERT( it->val() == 471 ); - - it = s.contains( 190, less() ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 190 ); - CPPUNIT_ASSERT( it->val() == 91 ); - - it = s.contains( 151 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 151 ); - CPPUNIT_ASSERT( it->val() == 151 ); - - //s.clear(); - //CPPUNIT_ASSERT( s.empty() ); - //CPPUNIT_ASSERT( check_size( s, 0 )); - } - - { - Set s( 52, 4 ); - - // iterator test - for ( int i = 0; i < 500; ++i ) { - CPPUNIT_ASSERT( s.insert( std::make_pair( i, i * 2) ) != s.end() ); - } - for ( iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - iterator it2 = it; - CPPUNIT_CHECK( it2 == it ); - CPPUNIT_CHECK( it2 != itEnd ); - CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal ); - it->nVal = (*it).nKey; - } - - Set const& refSet = s; - for ( const_iterator it = refSet.begin(), itEnd = refSet.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey == it->nVal ); - } - } - } - - template - void test_int_nogc_unordered() - { - typedef typename Set::value_type value_type; - typedef typename Set::iterator iterator; - typedef typename Set::const_iterator const_iterator; - - { - Set s( 52, 4 ); - iterator it; - - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - // insert - it = s.insert( 10 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 10 ); - CPPUNIT_ASSERT( it->val() == 10 ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( s.insert( 10 ) == s.end() ); - - it = s.insert( std::make_pair( 50, 25 )); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 50 ); - CPPUNIT_ASSERT( it->val() == 25 ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( s.insert( 50 ) == s.end() ); - - // update - std::pair< iterator, bool> updateResult; - updateResult = s.update(20, false); - CPPUNIT_ASSERT(updateResult.first == s.end()); - CPPUNIT_ASSERT(!updateResult.second); - CPPUNIT_ASSERT(check_size(s, 2)); - - updateResult = s.update( 20 ); - CPPUNIT_ASSERT( updateResult.first != s.end() ); - CPPUNIT_ASSERT( updateResult.second ); - CPPUNIT_ASSERT( updateResult.first->key() == 20 ); - CPPUNIT_ASSERT( updateResult.first->val() == 20 ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - updateResult = s.update( std::make_pair( 20, 200 )); - CPPUNIT_ASSERT( updateResult.first != s.end() ); - CPPUNIT_ASSERT( !updateResult.second ); - CPPUNIT_ASSERT( updateResult.first->key() == 20 ); - CPPUNIT_ASSERT( updateResult.first->val() == 20 ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - updateResult.first->nVal = 22; - - updateResult = s.update( std::make_pair( 30, 33 )); - CPPUNIT_ASSERT( updateResult.first != s.end() ); - CPPUNIT_ASSERT( updateResult.second ); - CPPUNIT_ASSERT( updateResult.first->key() == 30 ); - CPPUNIT_ASSERT( updateResult.first->val() == 33 ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 4 )); - - // find - it = s.contains( 10 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 10 ); - CPPUNIT_ASSERT( it->val() == 10 ); - - it = s.contains( 20, equal() ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 20 ); - CPPUNIT_ASSERT( it->val() == 22 ); - - it = s.contains( 30 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 30 ); - CPPUNIT_ASSERT( it->val() == 33 ); - - it = s.contains( 40 ); - CPPUNIT_ASSERT( it == s.end() ); - - it = s.contains( 50 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 50 ); - CPPUNIT_ASSERT( it->val() == 25 ); - - // emplace test - it = s.emplace( 151 ) ; // key = 151, val = 151 - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 151 ); - CPPUNIT_ASSERT( it->val() == 151 ); - - it = s.emplace( 174, 471 ) ; // key == 174, val = 471 - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 174 ); - CPPUNIT_ASSERT( it->val() == 471 ); - - it = s.emplace( std::make_pair( 190, 91 )) ; // key == 190, val = 91 - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 190 ); - CPPUNIT_ASSERT( it->val() == 91 ); - - it = s.contains( 174 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 174 ); - CPPUNIT_ASSERT( it->val() == 471 ); - - it = s.contains( 190, equal() ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 190 ); - CPPUNIT_ASSERT( it->val() == 91 ); - - it = s.contains( 151 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 151 ); - CPPUNIT_ASSERT( it->val() == 151 ); - - //s.clear(); - //CPPUNIT_ASSERT( s.empty() ); - //CPPUNIT_ASSERT( check_size( s, 0 )); - } - - { - Set s( 52, 4 ); - - // iterator test - for ( int i = 0; i < 500; ++i ) { - CPPUNIT_ASSERT( s.insert( std::make_pair( i, i * 2) ) != s.end() ); - } - for ( iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - iterator it2 = it; - CPPUNIT_CHECK( it2 == it ); - CPPUNIT_CHECK( it2 != itEnd ); - CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal ); - it->nVal = (*it).nKey; - } - - Set const& refSet = s; - for ( const_iterator it = refSet.begin(), itEnd = refSet.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey == it->nVal ); - } - } - } - template - void test_iter() - { - typedef typename Set::value_type value_type; - typedef typename Set::iterator iterator; - typedef typename Set::const_iterator const_iterator; - - Set s( 100, 4 ); - - const size_t nMaxCount = 500; - for ( int i = 0; size_t(i) < nMaxCount; ++i ) { - CPPUNIT_ASSERT( s.insert( std::make_pair( i, i * 2) )); - } - - { - typename Set::iterator it( s.begin() ); - typename Set::const_iterator cit( s.cbegin() ); - CPPUNIT_CHECK( it == cit ); - CPPUNIT_CHECK( it != s.end() ); - CPPUNIT_CHECK( it != s.cend() ); - CPPUNIT_CHECK( cit != s.end() ); - CPPUNIT_CHECK( cit != s.cend() ); - ++it; - CPPUNIT_CHECK( it != cit ); - CPPUNIT_CHECK( it != s.end() ); - CPPUNIT_CHECK( it != s.cend() ); - CPPUNIT_CHECK( cit != s.end() ); - CPPUNIT_CHECK( cit != s.cend() ); - ++cit; - CPPUNIT_CHECK( it == cit ); - CPPUNIT_CHECK( it != s.end() ); - CPPUNIT_CHECK( it != s.cend() ); - CPPUNIT_CHECK( cit != s.end() ); - CPPUNIT_CHECK( cit != s.cend() ); - } - - size_t nCount = 0; - for ( iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT_EX( (*it).nKey * 2 == it->nVal, - "Step " << nCount << ": Iterator key=" << it->nKey << ", value expected=" << it->nKey * 2 << ", value real=" << it->nVal - ); - it->nVal = (*it).nKey; - ++nCount; - } - CPPUNIT_ASSERT( nCount == nMaxCount ); - - nCount = 0; - Set const& refSet = s; - for ( const_iterator it = refSet.begin(), itEnd = refSet.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT_EX( (*it).nKey == it->nVal, - "Step " << nCount << ": Iterator key=" << it->nKey << ", value expected=" << it->nKey << ", value real=" << it->nVal - ); - ++nCount; - } - CPPUNIT_ASSERT( nCount == nMaxCount ); - } - - void Michael_HP_cmp(); - void Michael_HP_less(); - void Michael_HP_cmpmix(); - - void Michael_DHP_cmp(); - void Michael_DHP_less(); - void Michael_DHP_cmpmix(); - - void Michael_RCU_GPI_cmp(); - void Michael_RCU_GPI_less(); - void Michael_RCU_GPI_cmpmix(); - - void Michael_RCU_GPT_cmp(); - void Michael_RCU_GPT_less(); - void Michael_RCU_GPT_cmpmix(); - - void Michael_RCU_GPB_cmp(); - void Michael_RCU_GPB_less(); - void Michael_RCU_GPB_cmpmix(); - - void Michael_RCU_SHT_cmp(); - void Michael_RCU_SHT_less(); - void Michael_RCU_SHT_cmpmix(); - - void Michael_RCU_SHB_cmp(); - void Michael_RCU_SHB_less(); - void Michael_RCU_SHB_cmpmix(); - - void Michael_nogc_cmp(); - void Michael_nogc_less(); - void Michael_nogc_cmpmix(); - - void Lazy_HP_cmp(); - void Lazy_HP_less(); - void Lazy_HP_cmpmix(); - - void Lazy_DHP_cmp(); - void Lazy_DHP_less(); - void Lazy_DHP_cmpmix(); - - void Lazy_RCU_GPI_cmp(); - void Lazy_RCU_GPI_less(); - void Lazy_RCU_GPI_cmpmix(); - - void Lazy_RCU_GPB_cmp(); - void Lazy_RCU_GPB_less(); - void Lazy_RCU_GPB_cmpmix(); - - void Lazy_RCU_GPT_cmp(); - void Lazy_RCU_GPT_less(); - void Lazy_RCU_GPT_cmpmix(); - - void Lazy_RCU_SHB_cmp(); - void Lazy_RCU_SHB_less(); - void Lazy_RCU_SHB_cmpmix(); - - void Lazy_RCU_SHT_cmp(); - void Lazy_RCU_SHT_less(); - void Lazy_RCU_SHT_cmpmix(); - - void Lazy_nogc_cmp(); - void Lazy_nogc_less(); - void Lazy_nogc_equal(); - void Lazy_nogc_cmpmix(); - - void Split_HP_cmp(); - void Split_HP_less(); - void Split_HP_cmpmix(); - void Split_HP_cmpmix_stat(); - - void Split_DHP_cmp(); - void Split_DHP_less(); - void Split_DHP_cmpmix(); - void Split_DHP_cmpmix_stat(); - - void Split_RCU_GPI_cmp(); - void Split_RCU_GPI_less(); - void Split_RCU_GPI_cmpmix(); - void Split_RCU_GPI_cmpmix_stat(); - - void Split_RCU_GPB_cmp(); - void Split_RCU_GPB_less(); - void Split_RCU_GPB_cmpmix(); - void Split_RCU_GPB_cmpmix_stat(); - - void Split_RCU_GPT_cmp(); - void Split_RCU_GPT_less(); - void Split_RCU_GPT_cmpmix(); - void Split_RCU_GPT_cmpmix_stat(); - - void Split_RCU_SHB_cmp(); - void Split_RCU_SHB_less(); - void Split_RCU_SHB_cmpmix(); - void Split_RCU_SHB_cmpmix_stat(); - - void Split_RCU_SHT_cmp(); - void Split_RCU_SHT_less(); - void Split_RCU_SHT_cmpmix(); - void Split_RCU_SHT_cmpmix_stat(); - - void Split_nogc_cmp(); - void Split_nogc_less(); - void Split_nogc_cmpmix(); - void Split_nogc_cmpmix_stat(); - - - void Split_Lazy_HP_cmp(); - void Split_Lazy_HP_less(); - void Split_Lazy_HP_cmpmix(); - void Split_Lazy_HP_cmpmix_stat(); - - void Split_Lazy_DHP_cmp(); - void Split_Lazy_DHP_less(); - void Split_Lazy_DHP_cmpmix(); - void Split_Lazy_DHP_cmpmix_stat(); - - void Split_Lazy_RCU_GPI_cmp(); - void Split_Lazy_RCU_GPI_less(); - void Split_Lazy_RCU_GPI_cmpmix(); - void Split_Lazy_RCU_GPI_cmpmix_stat(); - - void Split_Lazy_RCU_GPB_cmp(); - void Split_Lazy_RCU_GPB_less(); - void Split_Lazy_RCU_GPB_cmpmix(); - void Split_Lazy_RCU_GPB_cmpmix_stat(); - - void Split_Lazy_RCU_GPT_cmp(); - void Split_Lazy_RCU_GPT_less(); - void Split_Lazy_RCU_GPT_cmpmix(); - void Split_Lazy_RCU_GPT_cmpmix_stat(); - - void Split_Lazy_RCU_SHB_cmp(); - void Split_Lazy_RCU_SHB_less(); - void Split_Lazy_RCU_SHB_cmpmix(); - void Split_Lazy_RCU_SHB_cmpmix_stat(); - - void Split_Lazy_RCU_SHT_cmp(); - void Split_Lazy_RCU_SHT_less(); - void Split_Lazy_RCU_SHT_cmpmix(); - void Split_Lazy_RCU_SHT_cmpmix_stat(); - - void Split_Lazy_nogc_cmp(); - void Split_Lazy_nogc_less(); - void Split_Lazy_nogc_cmpmix(); - void Split_Lazy_nogc_cmpmix_stat(); - - CPPUNIT_TEST_SUITE(HashSetHdrTest) - CPPUNIT_TEST(Michael_HP_cmp) - CPPUNIT_TEST(Michael_HP_less) - CPPUNIT_TEST(Michael_HP_cmpmix) - - CPPUNIT_TEST(Michael_DHP_cmp) - CPPUNIT_TEST(Michael_DHP_less) - CPPUNIT_TEST(Michael_DHP_cmpmix) - - CPPUNIT_TEST(Michael_RCU_GPI_cmp) - CPPUNIT_TEST(Michael_RCU_GPI_less) - CPPUNIT_TEST(Michael_RCU_GPI_cmpmix) - - CPPUNIT_TEST(Michael_RCU_GPB_cmp) - CPPUNIT_TEST(Michael_RCU_GPB_less) - CPPUNIT_TEST(Michael_RCU_GPB_cmpmix) - - CPPUNIT_TEST(Michael_RCU_GPT_cmp) - CPPUNIT_TEST(Michael_RCU_GPT_less) - CPPUNIT_TEST(Michael_RCU_GPT_cmpmix) - - CPPUNIT_TEST(Michael_RCU_SHB_cmp) - CPPUNIT_TEST(Michael_RCU_SHB_less) - CPPUNIT_TEST(Michael_RCU_SHB_cmpmix) - - CPPUNIT_TEST(Michael_RCU_SHT_cmp) - CPPUNIT_TEST(Michael_RCU_SHT_less) - CPPUNIT_TEST(Michael_RCU_SHT_cmpmix) - - CPPUNIT_TEST(Michael_nogc_cmp) - CPPUNIT_TEST(Michael_nogc_less) - CPPUNIT_TEST(Michael_nogc_cmpmix) - - CPPUNIT_TEST(Lazy_HP_cmp) - CPPUNIT_TEST(Lazy_HP_less) - CPPUNIT_TEST(Lazy_HP_cmpmix) - - CPPUNIT_TEST(Lazy_DHP_cmp) - CPPUNIT_TEST(Lazy_DHP_less) - CPPUNIT_TEST(Lazy_DHP_cmpmix) - - CPPUNIT_TEST(Lazy_RCU_GPI_cmp) - CPPUNIT_TEST(Lazy_RCU_GPI_less) - CPPUNIT_TEST(Lazy_RCU_GPI_cmpmix) - - CPPUNIT_TEST(Lazy_RCU_GPB_cmp) - CPPUNIT_TEST(Lazy_RCU_GPB_less) - CPPUNIT_TEST(Lazy_RCU_GPB_cmpmix) - - CPPUNIT_TEST(Lazy_RCU_GPT_cmp) - CPPUNIT_TEST(Lazy_RCU_GPT_less) - CPPUNIT_TEST(Lazy_RCU_GPT_cmpmix) - - CPPUNIT_TEST(Lazy_RCU_SHB_cmp) - CPPUNIT_TEST(Lazy_RCU_SHB_less) - CPPUNIT_TEST(Lazy_RCU_SHB_cmpmix) - - CPPUNIT_TEST(Lazy_RCU_SHT_cmp) - CPPUNIT_TEST(Lazy_RCU_SHT_less) - CPPUNIT_TEST(Lazy_RCU_SHT_cmpmix) - - CPPUNIT_TEST(Lazy_nogc_cmp) - CPPUNIT_TEST(Lazy_nogc_less) - CPPUNIT_TEST(Lazy_nogc_equal) - CPPUNIT_TEST(Lazy_nogc_cmpmix) - - CPPUNIT_TEST(Split_HP_cmp) - CPPUNIT_TEST(Split_HP_less) - CPPUNIT_TEST(Split_HP_cmpmix) - CPPUNIT_TEST( Split_HP_cmpmix_stat ) - - CPPUNIT_TEST(Split_DHP_cmp) - CPPUNIT_TEST(Split_DHP_less) - CPPUNIT_TEST(Split_DHP_cmpmix) - CPPUNIT_TEST( Split_DHP_cmpmix_stat ) - - CPPUNIT_TEST(Split_RCU_GPI_cmp) - CPPUNIT_TEST(Split_RCU_GPI_less) - CPPUNIT_TEST(Split_RCU_GPI_cmpmix) - CPPUNIT_TEST( Split_RCU_GPI_cmpmix_stat ) - - CPPUNIT_TEST(Split_RCU_GPB_cmp) - CPPUNIT_TEST(Split_RCU_GPB_less) - CPPUNIT_TEST(Split_RCU_GPB_cmpmix) - CPPUNIT_TEST( Split_RCU_GPB_cmpmix_stat ) - - CPPUNIT_TEST(Split_RCU_GPT_cmp) - CPPUNIT_TEST(Split_RCU_GPT_less) - CPPUNIT_TEST(Split_RCU_GPT_cmpmix) - CPPUNIT_TEST( Split_RCU_GPT_cmpmix_stat ) - - CPPUNIT_TEST(Split_RCU_SHB_cmp) - CPPUNIT_TEST(Split_RCU_SHB_less) - CPPUNIT_TEST(Split_RCU_SHB_cmpmix) - CPPUNIT_TEST( Split_RCU_SHB_cmpmix_stat ) - - CPPUNIT_TEST(Split_RCU_SHT_cmp) - CPPUNIT_TEST(Split_RCU_SHT_less) - CPPUNIT_TEST(Split_RCU_SHT_cmpmix) - CPPUNIT_TEST( Split_RCU_SHT_cmpmix_stat ) - - CPPUNIT_TEST(Split_nogc_cmp) - CPPUNIT_TEST(Split_nogc_less) - CPPUNIT_TEST(Split_nogc_cmpmix) - CPPUNIT_TEST( Split_nogc_cmpmix_stat ) - - CPPUNIT_TEST(Split_Lazy_HP_cmp) - CPPUNIT_TEST(Split_Lazy_HP_less) - CPPUNIT_TEST(Split_Lazy_HP_cmpmix) - CPPUNIT_TEST( Split_Lazy_HP_cmpmix_stat ) - - CPPUNIT_TEST(Split_Lazy_DHP_cmp) - CPPUNIT_TEST(Split_Lazy_DHP_less) - CPPUNIT_TEST(Split_Lazy_DHP_cmpmix) - CPPUNIT_TEST( Split_Lazy_DHP_cmpmix_stat ) - - CPPUNIT_TEST(Split_Lazy_RCU_GPI_cmp) - CPPUNIT_TEST(Split_Lazy_RCU_GPI_less) - CPPUNIT_TEST(Split_Lazy_RCU_GPI_cmpmix) - CPPUNIT_TEST( Split_Lazy_RCU_GPI_cmpmix_stat ) - - CPPUNIT_TEST(Split_Lazy_RCU_GPB_cmp) - CPPUNIT_TEST(Split_Lazy_RCU_GPB_less) - CPPUNIT_TEST(Split_Lazy_RCU_GPB_cmpmix) - CPPUNIT_TEST( Split_Lazy_RCU_GPB_cmpmix_stat ) - - CPPUNIT_TEST(Split_Lazy_RCU_GPT_cmp) - CPPUNIT_TEST(Split_Lazy_RCU_GPT_less) - CPPUNIT_TEST(Split_Lazy_RCU_GPT_cmpmix) - CPPUNIT_TEST( Split_Lazy_RCU_GPT_cmpmix_stat ) - - CPPUNIT_TEST(Split_Lazy_RCU_SHB_cmp) - CPPUNIT_TEST(Split_Lazy_RCU_SHB_less) - CPPUNIT_TEST(Split_Lazy_RCU_SHB_cmpmix) - CPPUNIT_TEST( Split_Lazy_RCU_SHB_cmpmix_stat ) - - CPPUNIT_TEST(Split_Lazy_RCU_SHT_cmp) - CPPUNIT_TEST(Split_Lazy_RCU_SHT_less) - CPPUNIT_TEST(Split_Lazy_RCU_SHT_cmpmix) - CPPUNIT_TEST( Split_Lazy_RCU_SHT_cmpmix_stat ) - - CPPUNIT_TEST(Split_Lazy_nogc_cmp) - CPPUNIT_TEST(Split_Lazy_nogc_less) - CPPUNIT_TEST(Split_Lazy_nogc_cmpmix) - CPPUNIT_TEST( Split_Lazy_nogc_cmpmix_stat ) - - CPPUNIT_TEST_SUITE_END() - - }; - -} // namespace set - -#endif // CDSTEST_HDR_SET_H diff --git a/tests/test-hdr/set/hdr_skiplist_set.h b/tests/test-hdr/set/hdr_skiplist_set.h deleted file mode 100644 index 5fa1d14a..00000000 --- a/tests/test-hdr/set/hdr_skiplist_set.h +++ /dev/null @@ -1,614 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_SKIPLIST_SET_H -#define CDSTEST_HDR_SKIPLIST_SET_H - -#include "set/hdr_set.h" - -namespace set { - - class SkipListSetHdrTest: public HashSetHdrTest - { - typedef HashSetHdrTest base_class; - - typedef base_class::other_item wrapped_item; - typedef base_class::other_less wrapped_less; - - template - void test() - { - Set s; - base_class::test_int_with( s ); - - static int const nLimit = 10000; - typedef typename Set::iterator set_iterator; - typedef typename Set::const_iterator const_set_iterator; - typedef typename Set::guarded_ptr guarded_ptr; - - int nCount = 0; - int nPrevKey = 0; - guarded_ptr gp; - int arrRandom[nLimit]; - for ( int i = 0; i < nLimit; ++i ) - arrRandom[i] = i; - shuffle( arrRandom, arrRandom + nLimit ); - - - // Test iterator - ascending order - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - - for ( int i = 0; i < nLimit; ++i ) { - gp = s.get( i ); - CPPUNIT_CHECK( !gp ); - CPPUNIT_CHECK( gp.empty() ); - - CPPUNIT_ASSERT( s.insert(i) ); - - gp = s.get( i ); - CPPUNIT_CHECK( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == i ); - CPPUNIT_CHECK( gp->nVal == i ); - gp.release(); - } - CPPUNIT_MSG( PrintStat()(s, "Iterator test, ascending insert order") ); - - nCount = 0; - nPrevKey = 0; - for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey == it->nVal ); - CPPUNIT_ASSERT( s.contains( it->nKey )); - it->nVal = (*it).nKey * 2; - ++nCount; - if ( it != s.begin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - - // get - gp = s.get( it->nKey ); - CPPUNIT_CHECK( gp ); - CPPUNIT_ASSERT( !gp.empty() ); - CPPUNIT_CHECK( gp->nKey == it->nKey ); - CPPUNIT_CHECK( gp->nVal == it->nKey * 2 ); - gp.release(); - } - CPPUNIT_ASSERT( nCount == nLimit ); - - nCount = 0; - for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal ); - ++nCount; - if ( it != s.cbegin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - CPPUNIT_ASSERT( nCount == nLimit ); - - // Test iterator - descending order - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - - for ( int i = nLimit; i > 0; --i ) { - gp = s.get_with( i - 1, base_class::less()); - CPPUNIT_CHECK( !gp ); - CPPUNIT_CHECK( gp.empty() ); - - CPPUNIT_ASSERT( s.insert( std::make_pair(i - 1, (i-1) * 2) )); - - // get_with - gp = s.get_with( i - 1, base_class::less()); - CPPUNIT_CHECK( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == i-1 ); - CPPUNIT_CHECK( gp->nVal == (i-1) * 2 ); - gp.release(); - } - CPPUNIT_MSG( PrintStat()(s, "Iterator test, descending insert order") ); - - nCount = 0; - nPrevKey = 0; - for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal ); - CPPUNIT_ASSERT( s.contains( it->nKey )); - it->nVal = (*it).nKey; - ++nCount; - if ( it != s.begin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - CPPUNIT_ASSERT( nCount == nLimit ); - - nCount = 0; - for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey == it->nVal ); - ++nCount; - if ( it != s.cbegin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - CPPUNIT_ASSERT( nCount == nLimit ); - - // Test iterator - random order - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - { - for ( int i = 0; i < nLimit; ++i ) - CPPUNIT_ASSERT( s.insert( arrRandom[i]) ); - CPPUNIT_MSG( PrintStat()(s, "Iterator test, random insert order") ); - } - - nCount = 0; - nPrevKey = 0; - for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey == it->nVal ); - CPPUNIT_ASSERT( s.contains( it->nKey )); - it->nVal = (*it).nKey * 2; - ++nCount; - if ( it != s.begin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - CPPUNIT_ASSERT( nCount == nLimit ); - - nCount = 0; - for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal ); - ++nCount; - if ( it != s.cbegin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - CPPUNIT_ASSERT( nCount == nLimit ); - - // extract test - { - typedef typename base_class::less less_predicate; - typename Set::guarded_ptr gp; - - // extract/get - for ( int i = 0; i < nLimit; ++i ) { - int nKey = arrRandom[i]; - gp = s.get( nKey ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == nKey ); - CPPUNIT_CHECK( gp->nVal == nKey * 2); - gp.release(); - - gp = s.extract( nKey ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == nKey ); - CPPUNIT_CHECK( gp->nVal == nKey * 2); - gp.release(); - - gp = s.get( nKey ); - CPPUNIT_CHECK( !gp ); - CPPUNIT_ASSERT( gp.empty()); - CPPUNIT_ASSERT( !s.extract(nKey)); - } - CPPUNIT_ASSERT( s.empty() ); - - // extract_with/get_with - for ( int i = 0; i < nLimit; ++i ) - CPPUNIT_ASSERT( s.insert( arrRandom[i]) ); - - for ( int i = 0; i < nLimit; ++i ) { - int nKey = arrRandom[i]; - gp = s.get_with( wrapped_item( nKey ), wrapped_less()); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == nKey ); - CPPUNIT_CHECK( gp->nVal == nKey ); - gp.release(); - - gp = s.extract_with( wrapped_item( nKey ), wrapped_less()); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == nKey ); - CPPUNIT_CHECK( gp->nVal == nKey ); - gp.release(); - - gp = s.get_with( wrapped_item( nKey ), wrapped_less()); - CPPUNIT_CHECK( !gp ); - CPPUNIT_ASSERT( !s.extract_with( wrapped_item(nKey), wrapped_less() )); - } - CPPUNIT_ASSERT( s.empty() ); - - // extract_min - for ( int i = 0; i < nLimit; ++i ) - CPPUNIT_ASSERT( s.insert( arrRandom[i]) ); - - for ( int i = 0; i < nLimit; ++i ) { - gp = s.extract_min(); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == i ); - CPPUNIT_CHECK( gp->nVal == i ); - gp.release(); - - gp = s.get( i ); - CPPUNIT_CHECK( !gp ); - } - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_CHECK( !s.extract_min()); - CPPUNIT_CHECK( !s.extract_max()); - - // extract_max - for ( int i = 0; i < nLimit; ++i ) - CPPUNIT_ASSERT( s.insert( arrRandom[i]) ); - - for ( int i = nLimit-1; i >= 0; --i ) { - gp = s.extract_max(); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == i ); - CPPUNIT_CHECK( gp->nVal == i ); - gp.release(); - - gp = s.get( i ); - CPPUNIT_CHECK( !gp ); - } - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_CHECK( !s.extract_min()); - CPPUNIT_CHECK( !s.extract_max()); - } - - CPPUNIT_MSG( PrintStat()(s, nullptr) ); - } - - template - void test_nogc() - { - typedef typename Set::value_type value_type; - typedef typename Set::iterator iterator; - typedef typename Set::const_iterator const_iterator; - - Set s; - iterator it; - - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - // insert - it = s.insert( 10 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 10 ); - CPPUNIT_ASSERT( it->val() == 10 ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( s.insert( 10 ) == s.end() ); - - it = s.insert( std::make_pair( 50, 25 )); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 50 ); - CPPUNIT_ASSERT( it->val() == 25 ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( s.insert( 50 ) == s.end() ); - - // update - std::pair< iterator, bool> updateResult; - updateResult = s.update(20, false); - CPPUNIT_ASSERT(updateResult.first == s.end()); - CPPUNIT_ASSERT(!updateResult.second); - CPPUNIT_ASSERT(check_size(s, 2)); - - updateResult = s.update( 20 ); - CPPUNIT_ASSERT( updateResult.first != s.end() ); - CPPUNIT_ASSERT( updateResult.second ); - CPPUNIT_ASSERT( updateResult.first->key() == 20 ); - CPPUNIT_ASSERT( updateResult.first->val() == 20 ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - updateResult = s.update( std::make_pair( 20, 200 )); - CPPUNIT_ASSERT( updateResult.first != s.end() ); - CPPUNIT_ASSERT( !updateResult.second ); - CPPUNIT_ASSERT( updateResult.first->key() == 20 ); - CPPUNIT_ASSERT( updateResult.first->val() == 20 ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - updateResult.first->nVal = 22; - - updateResult = s.update( std::make_pair( 30, 33 )); - CPPUNIT_ASSERT( updateResult.first != s.end() ); - CPPUNIT_ASSERT( updateResult.second ); - CPPUNIT_ASSERT( updateResult.first->key() == 30 ); - CPPUNIT_ASSERT( updateResult.first->val() == 33 ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 4 )); - - // find - it = s.contains( 10 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 10 ); - CPPUNIT_ASSERT( it->val() == 10 ); - - it = s.contains( 20 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 20 ); - CPPUNIT_ASSERT( it->val() == 22 ); - - it = s.contains( 30, base_class::less() ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 30 ); - CPPUNIT_ASSERT( it->val() == 33 ); - - it = s.contains( 40 ); - CPPUNIT_ASSERT( it == s.end() ); - - it = s.contains( 50 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 50 ); - CPPUNIT_ASSERT( it->val() == 25 ); - - // emplace test - it = s.emplace( 151 ) ; // key = 151, val = 151 - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 151 ); - CPPUNIT_ASSERT( it->val() == 151 ); - - it = s.emplace( 174, 471 ) ; // key == 174, val = 471 - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 174 ); - CPPUNIT_ASSERT( it->val() == 471 ); - - it = s.emplace( std::make_pair( 190, 91 )) ; // key == 190, val = 91 - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 190 ); - CPPUNIT_ASSERT( it->val() == 91 ); - - it = s.contains( 174 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 174 ); - CPPUNIT_ASSERT( it->val() == 471 ); - - it = s.contains( 190 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 190 ); - CPPUNIT_ASSERT( it->val() == 91 ); - - it = s.contains( 151 ); - CPPUNIT_ASSERT( it != s.end() ); - CPPUNIT_ASSERT( it->key() == 151 ); - CPPUNIT_ASSERT( it->val() == 151 ); - - CPPUNIT_ASSERT( !s.empty() ); - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - // get_min test - for ( int i = 500; i > 0; --i ) { - CPPUNIT_ASSERT( s.insert( std::make_pair( i, i * 2) ) != s.end() ); - - typename Set::value_type * pVal = s.get_min(); - CPPUNIT_ASSERT( pVal != nullptr ); - CPPUNIT_CHECK( pVal->nKey == i ); - CPPUNIT_CHECK( pVal->nVal == i * 2 ); - } - CPPUNIT_ASSERT( !s.empty() ); - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - CPPUNIT_CHECK( s.get_min() == nullptr ); - CPPUNIT_CHECK( s.get_max() == nullptr ); - - // iterator test - for ( int i = 0; i < 500; ++i ) { - CPPUNIT_ASSERT( s.insert( std::make_pair( i, i * 2) ) != s.end() ); - - typename Set::value_type * pVal = s.get_max(); - CPPUNIT_ASSERT( pVal != nullptr ); - CPPUNIT_CHECK( pVal->nKey == i ); - CPPUNIT_CHECK( pVal->nVal == i * 2 ); - } - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 500 )); - - for ( iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal ); - it->nVal = (*it).nKey; - } - - Set const& refSet = s; - for ( const_iterator it = refSet.begin(), itEnd = refSet.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey == it->nVal ); - } - } - - public: - void SkipList_HP_less(); - void SkipList_HP_cmp(); - void SkipList_HP_cmpless(); - void SkipList_HP_less_stat(); - void SkipList_HP_cmp_stat(); - void SkipList_HP_cmpless_stat(); - void SkipList_HP_xorshift_less(); - void SkipList_HP_xorshift_cmp(); - void SkipList_HP_xorshift_cmpless(); - void SkipList_HP_xorshift_less_stat(); - void SkipList_HP_xorshift_cmp_stat(); - void SkipList_HP_xorshift_cmpless_stat(); - void SkipList_HP_turbopas_less(); - void SkipList_HP_turbopas_cmp(); - void SkipList_HP_turbopas_cmpless(); - void SkipList_HP_turbopas_less_stat(); - void SkipList_HP_turbopas_cmp_stat(); - void SkipList_HP_turbopas_cmpless_stat(); - void SkipList_HP_michaelalloc_less(); - void SkipList_HP_michaelalloc_cmp(); - void SkipList_HP_michaelalloc_cmpless(); - void SkipList_HP_michaelalloc_less_stat(); - void SkipList_HP_michaelalloc_cmp_stat(); - void SkipList_HP_michaelalloc_cmpless_stat(); - - void SkipList_DHP_less(); - void SkipList_DHP_cmp(); - void SkipList_DHP_cmpless(); - void SkipList_DHP_less_stat(); - void SkipList_DHP_cmp_stat(); - void SkipList_DHP_cmpless_stat(); - void SkipList_DHP_xorshift_less(); - void SkipList_DHP_xorshift_cmp(); - void SkipList_DHP_xorshift_cmpless(); - void SkipList_DHP_xorshift_less_stat(); - void SkipList_DHP_xorshift_cmp_stat(); - void SkipList_DHP_xorshift_cmpless_stat(); - void SkipList_DHP_turbopas_less(); - void SkipList_DHP_turbopas_cmp(); - void SkipList_DHP_turbopas_cmpless(); - void SkipList_DHP_turbopas_less_stat(); - void SkipList_DHP_turbopas_cmp_stat(); - void SkipList_DHP_turbopas_cmpless_stat(); - void SkipList_DHP_michaelalloc_less(); - void SkipList_DHP_michaelalloc_cmp(); - void SkipList_DHP_michaelalloc_cmpless(); - void SkipList_DHP_michaelalloc_less_stat(); - void SkipList_DHP_michaelalloc_cmp_stat(); - void SkipList_DHP_michaelalloc_cmpless_stat(); - - void SkipList_NOGC_less(); - void SkipList_NOGC_cmp(); - void SkipList_NOGC_cmpless(); - void SkipList_NOGC_less_stat(); - void SkipList_NOGC_cmp_stat(); - void SkipList_NOGC_cmpless_stat(); - void SkipList_NOGC_xorshift_less(); - void SkipList_NOGC_xorshift_cmp(); - void SkipList_NOGC_xorshift_cmpless(); - void SkipList_NOGC_xorshift_less_stat(); - void SkipList_NOGC_xorshift_cmp_stat(); - void SkipList_NOGC_xorshift_cmpless_stat(); - void SkipList_NOGC_turbopas_less(); - void SkipList_NOGC_turbopas_cmp(); - void SkipList_NOGC_turbopas_cmpless(); - void SkipList_NOGC_turbopas_less_stat(); - void SkipList_NOGC_turbopas_cmp_stat(); - void SkipList_NOGC_turbopas_cmpless_stat(); - void SkipList_NOGC_michaelalloc_less(); - void SkipList_NOGC_michaelalloc_cmp(); - void SkipList_NOGC_michaelalloc_cmpless(); - void SkipList_NOGC_michaelalloc_less_stat(); - void SkipList_NOGC_michaelalloc_cmp_stat(); - void SkipList_NOGC_michaelalloc_cmpless_stat(); - - CPPUNIT_TEST_SUITE(SkipListSetHdrTest) - CPPUNIT_TEST(SkipList_HP_less) - CPPUNIT_TEST(SkipList_HP_cmp) - CPPUNIT_TEST(SkipList_HP_cmpless) - CPPUNIT_TEST(SkipList_HP_less_stat) - CPPUNIT_TEST(SkipList_HP_cmp_stat) - CPPUNIT_TEST(SkipList_HP_cmpless_stat) - CPPUNIT_TEST(SkipList_HP_xorshift_less) - CPPUNIT_TEST(SkipList_HP_xorshift_cmp) - CPPUNIT_TEST(SkipList_HP_xorshift_cmpless) - CPPUNIT_TEST(SkipList_HP_xorshift_less_stat) - CPPUNIT_TEST(SkipList_HP_xorshift_cmp_stat) - CPPUNIT_TEST(SkipList_HP_xorshift_cmpless_stat) - CPPUNIT_TEST(SkipList_HP_turbopas_less) - CPPUNIT_TEST(SkipList_HP_turbopas_cmp) - CPPUNIT_TEST(SkipList_HP_turbopas_cmpless) - CPPUNIT_TEST(SkipList_HP_turbopas_less_stat) - CPPUNIT_TEST(SkipList_HP_turbopas_cmp_stat) - CPPUNIT_TEST(SkipList_HP_turbopas_cmpless_stat) - CPPUNIT_TEST(SkipList_HP_michaelalloc_less) - CPPUNIT_TEST(SkipList_HP_michaelalloc_cmp) - CPPUNIT_TEST(SkipList_HP_michaelalloc_cmpless) - CPPUNIT_TEST(SkipList_HP_michaelalloc_less_stat) - CPPUNIT_TEST(SkipList_HP_michaelalloc_cmp_stat) - CPPUNIT_TEST(SkipList_HP_michaelalloc_cmpless_stat) - - CPPUNIT_TEST(SkipList_DHP_less) - CPPUNIT_TEST(SkipList_DHP_cmp) - CPPUNIT_TEST(SkipList_DHP_cmpless) - CPPUNIT_TEST(SkipList_DHP_less_stat) - CPPUNIT_TEST(SkipList_DHP_cmp_stat) - CPPUNIT_TEST(SkipList_DHP_cmpless_stat) - CPPUNIT_TEST(SkipList_DHP_xorshift_less) - CPPUNIT_TEST(SkipList_DHP_xorshift_cmp) - CPPUNIT_TEST(SkipList_DHP_xorshift_cmpless) - CPPUNIT_TEST(SkipList_DHP_xorshift_less_stat) - CPPUNIT_TEST(SkipList_DHP_xorshift_cmp_stat) - CPPUNIT_TEST(SkipList_DHP_xorshift_cmpless_stat) - CPPUNIT_TEST(SkipList_DHP_turbopas_less) - CPPUNIT_TEST(SkipList_DHP_turbopas_cmp) - CPPUNIT_TEST(SkipList_DHP_turbopas_cmpless) - CPPUNIT_TEST(SkipList_DHP_turbopas_less_stat) - CPPUNIT_TEST(SkipList_DHP_turbopas_cmp_stat) - CPPUNIT_TEST(SkipList_DHP_turbopas_cmpless_stat) - CPPUNIT_TEST(SkipList_DHP_michaelalloc_less) - CPPUNIT_TEST(SkipList_DHP_michaelalloc_cmp) - CPPUNIT_TEST(SkipList_DHP_michaelalloc_cmpless) - CPPUNIT_TEST(SkipList_DHP_michaelalloc_less_stat) - CPPUNIT_TEST(SkipList_DHP_michaelalloc_cmp_stat) - CPPUNIT_TEST(SkipList_DHP_michaelalloc_cmpless_stat) - - CPPUNIT_TEST(SkipList_NOGC_less) - CPPUNIT_TEST(SkipList_NOGC_cmp) - CPPUNIT_TEST(SkipList_NOGC_cmpless) - CPPUNIT_TEST(SkipList_NOGC_less_stat) - CPPUNIT_TEST(SkipList_NOGC_cmp_stat) - CPPUNIT_TEST(SkipList_NOGC_cmpless_stat) - CPPUNIT_TEST(SkipList_NOGC_xorshift_less) - CPPUNIT_TEST(SkipList_NOGC_xorshift_cmp) - CPPUNIT_TEST(SkipList_NOGC_xorshift_cmpless) - CPPUNIT_TEST(SkipList_NOGC_xorshift_less_stat) - CPPUNIT_TEST(SkipList_NOGC_xorshift_cmp_stat) - CPPUNIT_TEST(SkipList_NOGC_xorshift_cmpless_stat) - CPPUNIT_TEST(SkipList_NOGC_turbopas_less) - CPPUNIT_TEST(SkipList_NOGC_turbopas_cmp) - CPPUNIT_TEST(SkipList_NOGC_turbopas_cmpless) - CPPUNIT_TEST(SkipList_NOGC_turbopas_less_stat) - CPPUNIT_TEST(SkipList_NOGC_turbopas_cmp_stat) - CPPUNIT_TEST(SkipList_NOGC_turbopas_cmpless_stat) - CPPUNIT_TEST(SkipList_NOGC_michaelalloc_less) - CPPUNIT_TEST(SkipList_NOGC_michaelalloc_cmp) - CPPUNIT_TEST(SkipList_NOGC_michaelalloc_cmpless) - CPPUNIT_TEST(SkipList_NOGC_michaelalloc_less_stat) - CPPUNIT_TEST(SkipList_NOGC_michaelalloc_cmp_stat) - CPPUNIT_TEST(SkipList_NOGC_michaelalloc_cmpless_stat) - - CPPUNIT_TEST_SUITE_END() - - }; -} - -#endif // #ifndef CDSTEST_HDR_SKIPLIST_SET_H diff --git a/tests/test-hdr/set/hdr_skiplist_set_dhp.cpp b/tests/test-hdr/set/hdr_skiplist_set_dhp.cpp deleted file mode 100644 index fa5299e8..00000000 --- a/tests/test-hdr/set/hdr_skiplist_set_dhp.cpp +++ /dev/null @@ -1,340 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_skiplist_set.h" -#include -#include "unit/michael_alloc.h" -#include "map/print_skiplist_stat.h" - -namespace set { - - void SkipListSetHdrTest::SkipList_DHP_less() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_cmp() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_cmpless() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_less_stat() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_cmp_stat() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_cmpless_stat() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_xorshift_less() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_xorshift_cmp() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_xorshift_cmpless() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_xorshift_less_stat() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_xorshift_cmp_stat() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_xorshift_cmpless_stat() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_turbopas_less() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_turbopas_cmp() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_turbopas_cmpless() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_turbopas_less_stat() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_turbopas_cmp_stat() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_turbopas_cmpless_stat() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_michaelalloc_less() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_michaelalloc_cmp() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_michaelalloc_cmpless() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_michaelalloc_less_stat() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_michaelalloc_cmp_stat() - { - typedef cc::SkipListSet< cds::gc::DHP, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_DHP_michaelalloc_cmpless_stat() - { - struct set_traits : public cc::skip_list::traits - { - typedef SkipListSetHdrTest::less less; - typedef cmp compare; - typedef simple_item_counter item_counter; - typedef cc::skip_list::stat<> stat; - typedef memory::MichaelAllocator allocator; - }; - - typedef cc::SkipListSet< cds::gc::DHP, item, set_traits > set; - test< set, misc::print_skiplist_stat >(); - } -} // namespace set diff --git a/tests/test-hdr/set/hdr_skiplist_set_hp.cpp b/tests/test-hdr/set/hdr_skiplist_set_hp.cpp deleted file mode 100644 index 1fbe2696..00000000 --- a/tests/test-hdr/set/hdr_skiplist_set_hp.cpp +++ /dev/null @@ -1,341 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_skiplist_set.h" -#include -#include "unit/michael_alloc.h" -#include "map/print_skiplist_stat.h" - -namespace set { - - void SkipListSetHdrTest::SkipList_HP_less() - { - struct set_traits : public cc::skip_list::traits - { - typedef SkipListSetHdrTest::less less; - typedef simple_item_counter item_counter; - }; - typedef cc::SkipListSet< cds::gc::HP, item, set_traits > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_cmp() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_cmpless() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_less_stat() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_cmp_stat() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_cmpless_stat() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_xorshift_less() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_xorshift_cmp() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_xorshift_cmpless() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_xorshift_less_stat() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_xorshift_cmp_stat() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_xorshift_cmpless_stat() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_turbopas_less() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_turbopas_cmp() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_turbopas_cmpless() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_turbopas_less_stat() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_turbopas_cmp_stat() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_turbopas_cmpless_stat() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_michaelalloc_less() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_michaelalloc_cmp() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_michaelalloc_cmpless() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_michaelalloc_less_stat() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_michaelalloc_cmp_stat() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_HP_michaelalloc_cmpless_stat() - { - typedef cc::SkipListSet< cds::gc::HP, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } -} // namespace set - -CPPUNIT_TEST_SUITE_REGISTRATION(set::SkipListSetHdrTest); diff --git a/tests/test-hdr/set/hdr_skiplist_set_nogc.cpp b/tests/test-hdr/set/hdr_skiplist_set_nogc.cpp deleted file mode 100644 index 006d9de7..00000000 --- a/tests/test-hdr/set/hdr_skiplist_set_nogc.cpp +++ /dev/null @@ -1,339 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_skiplist_set.h" -#include -#include "unit/michael_alloc.h" -#include "map/print_skiplist_stat.h" - -namespace set { - - void SkipListSetHdrTest::SkipList_NOGC_less() - { - struct set_traits : public cc::skip_list::traits - { - typedef SkipListSetHdrTest::less less; - typedef simple_item_counter item_counter; - }; - typedef cc::SkipListSet< cds::gc::nogc, item, set_traits > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_cmp() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_cmpless() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_less_stat() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_cmp_stat() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_cmpless_stat() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_xorshift_less() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_xorshift_cmp() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_xorshift_cmpless() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_xorshift_less_stat() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_xorshift_cmp_stat() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_xorshift_cmpless_stat() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_turbopas_less() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_turbopas_cmp() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_turbopas_cmpless() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_turbopas_less_stat() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_turbopas_cmp_stat() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_turbopas_cmpless_stat() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_michaelalloc_less() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_michaelalloc_cmp() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_michaelalloc_cmpless() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_michaelalloc_less_stat() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_michaelalloc_cmp_stat() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } - - void SkipListSetHdrTest::SkipList_NOGC_michaelalloc_cmpless_stat() - { - typedef cc::SkipListSet< cds::gc::nogc, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test_nogc< set, misc::print_skiplist_stat >(); - } -} // namespace set diff --git a/tests/test-hdr/set/hdr_skiplist_set_rcu.h b/tests/test-hdr/set/hdr_skiplist_set_rcu.h deleted file mode 100644 index 3f5bfd8d..00000000 --- a/tests/test-hdr/set/hdr_skiplist_set_rcu.h +++ /dev/null @@ -1,544 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_SKIPLIST_SET_RCU_H -#define CDSTEST_HDR_SKIPLIST_SET_RCU_H - -#include "set/hdr_set.h" - -namespace set { - - class SkipListSetRCUHdrTest: public HashSetHdrTest - { - typedef HashSetHdrTest base_class; - - typedef base_class::other_item wrapped_item; - typedef base_class::other_less wrapped_less; - - template - void test() - { - Set s; - base_class::test_int_with( s ); - - static int const nLimit = 10000; - typedef typename Set::iterator set_iterator; - typedef typename Set::const_iterator const_set_iterator; - typedef typename Set::gc::scoped_lock rcu_lock; - - int nCount = 0; - int nPrevKey = 0; - - int arrRandom[nLimit]; - for ( int i = 0; i < nLimit; ++i ) - arrRandom[i] = i; - shuffle( arrRandom, arrRandom + nLimit ); - - // Test iterator - ascending order - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - - for ( int i = 0; i < nLimit; ++i ) { - CPPUNIT_ASSERT( s.insert(i) ); - } - CPPUNIT_MSG( PrintStat()(s, "Iterator test, ascending insert order") ); - - nCount = 0; - nPrevKey = 0; - { - rcu_lock l; - for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey == it->nVal ); - CPPUNIT_ASSERT( s.contains( it->nKey )); - it->nVal = (*it).nKey * 2; - ++nCount; - if ( it != s.begin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - } - CPPUNIT_ASSERT( nCount == nLimit ); - - nCount = 0; - { - rcu_lock l; - for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal ); - ++nCount; - if ( it != s.cbegin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - } - CPPUNIT_ASSERT( nCount == nLimit ); - - // Test iterator - descending order - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - - for ( int i = nLimit; i > 0; --i ) { - CPPUNIT_ASSERT( s.insert( std::make_pair(i - 1, (i-1) * 2) )); - } - CPPUNIT_MSG( PrintStat()(s, "Iterator test, descending insert order") ); - - nCount = 0; - nPrevKey = 0; - { - rcu_lock l; - for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal ); - CPPUNIT_ASSERT( s.contains( it->nKey )); - it->nVal = (*it).nKey; - ++nCount; - if ( it != s.begin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - } - CPPUNIT_ASSERT( nCount == nLimit ); - - nCount = 0; - { - rcu_lock l; - for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey == it->nVal ); - ++nCount; - if ( it != s.cbegin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - } - CPPUNIT_ASSERT( nCount == nLimit ); - - // Test iterator - random order - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - { - for ( int i = 0; i < nLimit; ++i ) { - CPPUNIT_ASSERT( s.insert( arrRandom[i] ) ); - } - CPPUNIT_MSG( PrintStat()(s, "Iterator test, random insert order") ); - } - - nCount = 0; - nPrevKey = 0; - { - rcu_lock l; - for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey == it->nVal ); - CPPUNIT_ASSERT( s.contains( it->nKey )); - it->nVal = (*it).nKey * 2; - ++nCount; - if ( it != s.begin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - } - CPPUNIT_ASSERT( nCount == nLimit ); - - nCount = 0; - { - rcu_lock l; - for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) { - CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal ); - ++nCount; - if ( it != s.cbegin() ) { - CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey ); - } - nPrevKey = it->nKey; - } - } - CPPUNIT_ASSERT( nCount == nLimit ); - - // extract/get tests - { - typedef typename base_class::less less_predicate; - typename Set::exempt_ptr ep; - typename Set::raw_ptr rp; - - // extract/get - for ( int i = 0; i < nLimit; ++i ) { - int nKey = arrRandom[i]; - { - rcu_lock l; - rp = s.get( nKey ); - CPPUNIT_ASSERT( rp ); - CPPUNIT_CHECK( rp->nKey == nKey ); - CPPUNIT_CHECK( rp->nVal == nKey * 2 ); - } - rp.release(); - - ep = s.extract( nKey ); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty() ); - CPPUNIT_CHECK( ep->nKey == nKey ); - CPPUNIT_CHECK( ep->nVal == nKey * 2 ); - ep.release(); - - { - rcu_lock l; - CPPUNIT_CHECK( !s.get( nKey )); - } - ep = s.extract( nKey ); - CPPUNIT_CHECK( !ep ); - } - CPPUNIT_CHECK( s.empty()); - - // extract_with/get_with - for ( int i = 0; i < nLimit; ++i ) - CPPUNIT_ASSERT( s.insert( arrRandom[i]) ); - - for ( int i = 0; i < nLimit; ++i ) { - int nKey = arrRandom[i]; - { - rcu_lock l; - rp = s.get_with( wrapped_item(nKey), wrapped_less() ); - CPPUNIT_ASSERT( rp ); - CPPUNIT_CHECK( rp->nKey == nKey ); - CPPUNIT_CHECK( rp->nVal == nKey ); - } - rp.release(); - - ep = s.extract_with( wrapped_item( nKey ), wrapped_less() ); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty() ); - CPPUNIT_CHECK( ep->nKey == nKey ); - CPPUNIT_CHECK( ep->nVal == nKey ); - ep.release(); - - { - rcu_lock l; - CPPUNIT_CHECK( !s.get_with( wrapped_item( nKey ), wrapped_less() )); - } - ep = s.extract_with( wrapped_item( nKey ), wrapped_less() ); - CPPUNIT_CHECK( !ep ); - } - CPPUNIT_CHECK( s.empty()); - - // extract_min - for ( int i = 0; i < nLimit; ++i ) - CPPUNIT_ASSERT( s.insert( arrRandom[i]) ); - - for ( int i = 0; i < nLimit; ++i ) { - ep = s.extract_min(); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty() ); - CPPUNIT_CHECK( ep->nKey == i ); - CPPUNIT_CHECK( ep->nVal == i ); - CPPUNIT_CHECK( !s.contains(i) ); - ep.release(); - } - CPPUNIT_CHECK( s.empty()); - - // extract_max - for ( int i = 0; i < nLimit; ++i ) - CPPUNIT_ASSERT( s.insert( arrRandom[i]) ); - - for ( int i = nLimit-1; i >= 0; --i ) { - ep = s.extract_max(); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty() ); - CPPUNIT_CHECK( ep->nKey == i ); - CPPUNIT_CHECK( ep->nVal == i ); - CPPUNIT_CHECK( !s.contains(i) ); - ep.release(); - } - CPPUNIT_CHECK( s.empty()); - ep = s.extract_min(); - CPPUNIT_CHECK( !ep ); - CPPUNIT_CHECK( !s.extract_max() ); - } - - CPPUNIT_MSG( PrintStat()(s, nullptr) ); - } - - public: - void SkipList_RCU_GPI_less(); - void SkipList_RCU_GPI_cmp(); - void SkipList_RCU_GPI_cmpless(); - void SkipList_RCU_GPI_less_stat(); - void SkipList_RCU_GPI_cmp_stat(); - void SkipList_RCU_GPI_cmpless_stat(); - void SkipList_RCU_GPI_xorshift_less(); - void SkipList_RCU_GPI_xorshift_cmp(); - void SkipList_RCU_GPI_xorshift_cmpless(); - void SkipList_RCU_GPI_xorshift_less_stat(); - void SkipList_RCU_GPI_xorshift_cmp_stat(); - void SkipList_RCU_GPI_xorshift_cmpless_stat(); - void SkipList_RCU_GPI_turbopas_less(); - void SkipList_RCU_GPI_turbopas_cmp(); - void SkipList_RCU_GPI_turbopas_cmpless(); - void SkipList_RCU_GPI_turbopas_less_stat(); - void SkipList_RCU_GPI_turbopas_cmp_stat(); - void SkipList_RCU_GPI_turbopas_cmpless_stat(); - void SkipList_RCU_GPI_michaelalloc_less(); - void SkipList_RCU_GPI_michaelalloc_cmp(); - void SkipList_RCU_GPI_michaelalloc_cmpless(); - void SkipList_RCU_GPI_michaelalloc_less_stat(); - void SkipList_RCU_GPI_michaelalloc_cmp_stat(); - void SkipList_RCU_GPI_michaelalloc_cmpless_stat(); - - void SkipList_RCU_GPB_less(); - void SkipList_RCU_GPB_cmp(); - void SkipList_RCU_GPB_cmpless(); - void SkipList_RCU_GPB_less_stat(); - void SkipList_RCU_GPB_cmp_stat(); - void SkipList_RCU_GPB_cmpless_stat(); - void SkipList_RCU_GPB_xorshift_less(); - void SkipList_RCU_GPB_xorshift_cmp(); - void SkipList_RCU_GPB_xorshift_cmpless(); - void SkipList_RCU_GPB_xorshift_less_stat(); - void SkipList_RCU_GPB_xorshift_cmp_stat(); - void SkipList_RCU_GPB_xorshift_cmpless_stat(); - void SkipList_RCU_GPB_turbopas_less(); - void SkipList_RCU_GPB_turbopas_cmp(); - void SkipList_RCU_GPB_turbopas_cmpless(); - void SkipList_RCU_GPB_turbopas_less_stat(); - void SkipList_RCU_GPB_turbopas_cmp_stat(); - void SkipList_RCU_GPB_turbopas_cmpless_stat(); - void SkipList_RCU_GPB_michaelalloc_less(); - void SkipList_RCU_GPB_michaelalloc_cmp(); - void SkipList_RCU_GPB_michaelalloc_cmpless(); - void SkipList_RCU_GPB_michaelalloc_less_stat(); - void SkipList_RCU_GPB_michaelalloc_cmp_stat(); - void SkipList_RCU_GPB_michaelalloc_cmpless_stat(); - - void SkipList_RCU_GPT_less(); - void SkipList_RCU_GPT_cmp(); - void SkipList_RCU_GPT_cmpless(); - void SkipList_RCU_GPT_less_stat(); - void SkipList_RCU_GPT_cmp_stat(); - void SkipList_RCU_GPT_cmpless_stat(); - void SkipList_RCU_GPT_xorshift_less(); - void SkipList_RCU_GPT_xorshift_cmp(); - void SkipList_RCU_GPT_xorshift_cmpless(); - void SkipList_RCU_GPT_xorshift_less_stat(); - void SkipList_RCU_GPT_xorshift_cmp_stat(); - void SkipList_RCU_GPT_xorshift_cmpless_stat(); - void SkipList_RCU_GPT_turbopas_less(); - void SkipList_RCU_GPT_turbopas_cmp(); - void SkipList_RCU_GPT_turbopas_cmpless(); - void SkipList_RCU_GPT_turbopas_less_stat(); - void SkipList_RCU_GPT_turbopas_cmp_stat(); - void SkipList_RCU_GPT_turbopas_cmpless_stat(); - void SkipList_RCU_GPT_michaelalloc_less(); - void SkipList_RCU_GPT_michaelalloc_cmp(); - void SkipList_RCU_GPT_michaelalloc_cmpless(); - void SkipList_RCU_GPT_michaelalloc_less_stat(); - void SkipList_RCU_GPT_michaelalloc_cmp_stat(); - void SkipList_RCU_GPT_michaelalloc_cmpless_stat(); - - void SkipList_RCU_SHB_less(); - void SkipList_RCU_SHB_cmp(); - void SkipList_RCU_SHB_cmpless(); - void SkipList_RCU_SHB_less_stat(); - void SkipList_RCU_SHB_cmp_stat(); - void SkipList_RCU_SHB_cmpless_stat(); - void SkipList_RCU_SHB_xorshift_less(); - void SkipList_RCU_SHB_xorshift_cmp(); - void SkipList_RCU_SHB_xorshift_cmpless(); - void SkipList_RCU_SHB_xorshift_less_stat(); - void SkipList_RCU_SHB_xorshift_cmp_stat(); - void SkipList_RCU_SHB_xorshift_cmpless_stat(); - void SkipList_RCU_SHB_turbopas_less(); - void SkipList_RCU_SHB_turbopas_cmp(); - void SkipList_RCU_SHB_turbopas_cmpless(); - void SkipList_RCU_SHB_turbopas_less_stat(); - void SkipList_RCU_SHB_turbopas_cmp_stat(); - void SkipList_RCU_SHB_turbopas_cmpless_stat(); - void SkipList_RCU_SHB_michaelalloc_less(); - void SkipList_RCU_SHB_michaelalloc_cmp(); - void SkipList_RCU_SHB_michaelalloc_cmpless(); - void SkipList_RCU_SHB_michaelalloc_less_stat(); - void SkipList_RCU_SHB_michaelalloc_cmp_stat(); - void SkipList_RCU_SHB_michaelalloc_cmpless_stat(); - - void SkipList_RCU_SHT_less(); - void SkipList_RCU_SHT_cmp(); - void SkipList_RCU_SHT_cmpless(); - void SkipList_RCU_SHT_less_stat(); - void SkipList_RCU_SHT_cmp_stat(); - void SkipList_RCU_SHT_cmpless_stat(); - void SkipList_RCU_SHT_xorshift_less(); - void SkipList_RCU_SHT_xorshift_cmp(); - void SkipList_RCU_SHT_xorshift_cmpless(); - void SkipList_RCU_SHT_xorshift_less_stat(); - void SkipList_RCU_SHT_xorshift_cmp_stat(); - void SkipList_RCU_SHT_xorshift_cmpless_stat(); - void SkipList_RCU_SHT_turbopas_less(); - void SkipList_RCU_SHT_turbopas_cmp(); - void SkipList_RCU_SHT_turbopas_cmpless(); - void SkipList_RCU_SHT_turbopas_less_stat(); - void SkipList_RCU_SHT_turbopas_cmp_stat(); - void SkipList_RCU_SHT_turbopas_cmpless_stat(); - void SkipList_RCU_SHT_michaelalloc_less(); - void SkipList_RCU_SHT_michaelalloc_cmp(); - void SkipList_RCU_SHT_michaelalloc_cmpless(); - void SkipList_RCU_SHT_michaelalloc_less_stat(); - void SkipList_RCU_SHT_michaelalloc_cmp_stat(); - void SkipList_RCU_SHT_michaelalloc_cmpless_stat(); - - CPPUNIT_TEST_SUITE(SkipListSetRCUHdrTest) - CPPUNIT_TEST(SkipList_RCU_GPI_less) - CPPUNIT_TEST(SkipList_RCU_GPI_cmp) - CPPUNIT_TEST(SkipList_RCU_GPI_cmpless) - CPPUNIT_TEST(SkipList_RCU_GPI_less_stat) - CPPUNIT_TEST(SkipList_RCU_GPI_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_GPI_cmpless_stat) - CPPUNIT_TEST(SkipList_RCU_GPI_xorshift_less) - CPPUNIT_TEST(SkipList_RCU_GPI_xorshift_cmp) - CPPUNIT_TEST(SkipList_RCU_GPI_xorshift_cmpless) - CPPUNIT_TEST(SkipList_RCU_GPI_xorshift_less_stat) - CPPUNIT_TEST(SkipList_RCU_GPI_xorshift_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_GPI_xorshift_cmpless_stat) - CPPUNIT_TEST(SkipList_RCU_GPI_turbopas_less) - CPPUNIT_TEST(SkipList_RCU_GPI_turbopas_cmp) - CPPUNIT_TEST(SkipList_RCU_GPI_turbopas_cmpless) - CPPUNIT_TEST(SkipList_RCU_GPI_turbopas_less_stat) - CPPUNIT_TEST(SkipList_RCU_GPI_turbopas_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_GPI_turbopas_cmpless_stat) - CPPUNIT_TEST(SkipList_RCU_GPI_michaelalloc_less) - CPPUNIT_TEST(SkipList_RCU_GPI_michaelalloc_cmp) - CPPUNIT_TEST(SkipList_RCU_GPI_michaelalloc_cmpless) - CPPUNIT_TEST(SkipList_RCU_GPI_michaelalloc_less_stat) - CPPUNIT_TEST(SkipList_RCU_GPI_michaelalloc_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_GPI_michaelalloc_cmpless_stat) - - CPPUNIT_TEST(SkipList_RCU_GPB_less) - CPPUNIT_TEST(SkipList_RCU_GPB_cmp) - CPPUNIT_TEST(SkipList_RCU_GPB_cmpless) - CPPUNIT_TEST(SkipList_RCU_GPB_less_stat) - CPPUNIT_TEST(SkipList_RCU_GPB_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_GPB_cmpless_stat) - CPPUNIT_TEST(SkipList_RCU_GPB_xorshift_less) - CPPUNIT_TEST(SkipList_RCU_GPB_xorshift_cmp) - CPPUNIT_TEST(SkipList_RCU_GPB_xorshift_cmpless) - CPPUNIT_TEST(SkipList_RCU_GPB_xorshift_less_stat) - CPPUNIT_TEST(SkipList_RCU_GPB_xorshift_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_GPB_xorshift_cmpless_stat) - CPPUNIT_TEST(SkipList_RCU_GPB_turbopas_less) - CPPUNIT_TEST(SkipList_RCU_GPB_turbopas_cmp) - CPPUNIT_TEST(SkipList_RCU_GPB_turbopas_cmpless) - CPPUNIT_TEST(SkipList_RCU_GPB_turbopas_less_stat) - CPPUNIT_TEST(SkipList_RCU_GPB_turbopas_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_GPB_turbopas_cmpless_stat) - CPPUNIT_TEST(SkipList_RCU_GPB_michaelalloc_less) - CPPUNIT_TEST(SkipList_RCU_GPB_michaelalloc_cmp) - CPPUNIT_TEST(SkipList_RCU_GPB_michaelalloc_cmpless) - CPPUNIT_TEST(SkipList_RCU_GPB_michaelalloc_less_stat) - CPPUNIT_TEST(SkipList_RCU_GPB_michaelalloc_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_GPB_michaelalloc_cmpless_stat) - - CPPUNIT_TEST(SkipList_RCU_GPT_less) - CPPUNIT_TEST(SkipList_RCU_GPT_cmp) - CPPUNIT_TEST(SkipList_RCU_GPT_cmpless) - CPPUNIT_TEST(SkipList_RCU_GPT_less_stat) - CPPUNIT_TEST(SkipList_RCU_GPT_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_GPT_cmpless_stat) - CPPUNIT_TEST(SkipList_RCU_GPT_xorshift_less) - CPPUNIT_TEST(SkipList_RCU_GPT_xorshift_cmp) - CPPUNIT_TEST(SkipList_RCU_GPT_xorshift_cmpless) - CPPUNIT_TEST(SkipList_RCU_GPT_xorshift_less_stat) - CPPUNIT_TEST(SkipList_RCU_GPT_xorshift_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_GPT_xorshift_cmpless_stat) - CPPUNIT_TEST(SkipList_RCU_GPT_turbopas_less) - CPPUNIT_TEST(SkipList_RCU_GPT_turbopas_cmp) - CPPUNIT_TEST(SkipList_RCU_GPT_turbopas_cmpless) - CPPUNIT_TEST(SkipList_RCU_GPT_turbopas_less_stat) - CPPUNIT_TEST(SkipList_RCU_GPT_turbopas_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_GPT_turbopas_cmpless_stat) - CPPUNIT_TEST(SkipList_RCU_GPT_michaelalloc_less) - CPPUNIT_TEST(SkipList_RCU_GPT_michaelalloc_cmp) - CPPUNIT_TEST(SkipList_RCU_GPT_michaelalloc_cmpless) - CPPUNIT_TEST(SkipList_RCU_GPT_michaelalloc_less_stat) - CPPUNIT_TEST(SkipList_RCU_GPT_michaelalloc_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_GPT_michaelalloc_cmpless_stat) - - CPPUNIT_TEST(SkipList_RCU_SHB_less) - CPPUNIT_TEST(SkipList_RCU_SHB_cmp) - CPPUNIT_TEST(SkipList_RCU_SHB_cmpless) - CPPUNIT_TEST(SkipList_RCU_SHB_less_stat) - CPPUNIT_TEST(SkipList_RCU_SHB_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_SHB_cmpless_stat) - CPPUNIT_TEST(SkipList_RCU_SHB_xorshift_less) - CPPUNIT_TEST(SkipList_RCU_SHB_xorshift_cmp) - CPPUNIT_TEST(SkipList_RCU_SHB_xorshift_cmpless) - CPPUNIT_TEST(SkipList_RCU_SHB_xorshift_less_stat) - CPPUNIT_TEST(SkipList_RCU_SHB_xorshift_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_SHB_xorshift_cmpless_stat) - CPPUNIT_TEST(SkipList_RCU_SHB_turbopas_less) - CPPUNIT_TEST(SkipList_RCU_SHB_turbopas_cmp) - CPPUNIT_TEST(SkipList_RCU_SHB_turbopas_cmpless) - CPPUNIT_TEST(SkipList_RCU_SHB_turbopas_less_stat) - CPPUNIT_TEST(SkipList_RCU_SHB_turbopas_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_SHB_turbopas_cmpless_stat) - CPPUNIT_TEST(SkipList_RCU_SHB_michaelalloc_less) - CPPUNIT_TEST(SkipList_RCU_SHB_michaelalloc_cmp) - CPPUNIT_TEST(SkipList_RCU_SHB_michaelalloc_cmpless) - CPPUNIT_TEST(SkipList_RCU_SHB_michaelalloc_less_stat) - CPPUNIT_TEST(SkipList_RCU_SHB_michaelalloc_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_SHB_michaelalloc_cmpless_stat) - - CPPUNIT_TEST(SkipList_RCU_SHT_less) - CPPUNIT_TEST(SkipList_RCU_SHT_cmp) - CPPUNIT_TEST(SkipList_RCU_SHT_cmpless) - CPPUNIT_TEST(SkipList_RCU_SHT_less_stat) - CPPUNIT_TEST(SkipList_RCU_SHT_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_SHT_cmpless_stat) - CPPUNIT_TEST(SkipList_RCU_SHT_xorshift_less) - CPPUNIT_TEST(SkipList_RCU_SHT_xorshift_cmp) - CPPUNIT_TEST(SkipList_RCU_SHT_xorshift_cmpless) - CPPUNIT_TEST(SkipList_RCU_SHT_xorshift_less_stat) - CPPUNIT_TEST(SkipList_RCU_SHT_xorshift_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_SHT_xorshift_cmpless_stat) - CPPUNIT_TEST(SkipList_RCU_SHT_turbopas_less) - CPPUNIT_TEST(SkipList_RCU_SHT_turbopas_cmp) - CPPUNIT_TEST(SkipList_RCU_SHT_turbopas_cmpless) - CPPUNIT_TEST(SkipList_RCU_SHT_turbopas_less_stat) - CPPUNIT_TEST(SkipList_RCU_SHT_turbopas_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_SHT_turbopas_cmpless_stat) - CPPUNIT_TEST(SkipList_RCU_SHT_michaelalloc_less) - CPPUNIT_TEST(SkipList_RCU_SHT_michaelalloc_cmp) - CPPUNIT_TEST(SkipList_RCU_SHT_michaelalloc_cmpless) - CPPUNIT_TEST(SkipList_RCU_SHT_michaelalloc_less_stat) - CPPUNIT_TEST(SkipList_RCU_SHT_michaelalloc_cmp_stat) - CPPUNIT_TEST(SkipList_RCU_SHT_michaelalloc_cmpless_stat) - - CPPUNIT_TEST_SUITE_END() - - }; -} - -#endif // #ifndef CDSTEST_HDR_SKIPLIST_SET_RCU_H diff --git a/tests/test-hdr/set/hdr_skiplist_set_rcu_gpb.cpp b/tests/test-hdr/set/hdr_skiplist_set_rcu_gpb.cpp deleted file mode 100644 index ad8a2435..00000000 --- a/tests/test-hdr/set/hdr_skiplist_set_rcu_gpb.cpp +++ /dev/null @@ -1,345 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_skiplist_set_rcu.h" - -#include -#include - -#include "unit/michael_alloc.h" -#include "map/print_skiplist_stat.h" - -namespace set { - namespace { - typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_less() - { - struct set_traits : public cc::skip_list::traits - { - typedef SkipListSetRCUHdrTest::less less; - typedef simple_item_counter item_counter; - }; - typedef cc::SkipListSet< rcu_type, item, set_traits > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_cmp() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_cmpless() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_less_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_cmp_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_cmpless_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_xorshift_less() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_xorshift_cmp() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_xorshift_cmpless() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_xorshift_less_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_xorshift_cmp_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_xorshift_cmpless_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_turbopas_less() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_turbopas_cmp() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_turbopas_cmpless() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_turbopas_less_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_turbopas_cmp_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_turbopas_cmpless_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_michaelalloc_less() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_michaelalloc_cmp() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_michaelalloc_cmpless() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_michaelalloc_less_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_michaelalloc_cmp_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPB_michaelalloc_cmpless_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } -} // namespace set diff --git a/tests/test-hdr/set/hdr_skiplist_set_rcu_gpi.cpp b/tests/test-hdr/set/hdr_skiplist_set_rcu_gpi.cpp deleted file mode 100644 index 52464628..00000000 --- a/tests/test-hdr/set/hdr_skiplist_set_rcu_gpi.cpp +++ /dev/null @@ -1,347 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_skiplist_set_rcu.h" - -#include -#include - -#include "unit/michael_alloc.h" -#include "map/print_skiplist_stat.h" - -namespace set { - namespace { - typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_less() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_cmp() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_cmpless() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_less_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_cmp_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_cmpless_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_xorshift_less() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_xorshift_cmp() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_xorshift_cmpless() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_xorshift_less_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_xorshift_cmp_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_xorshift_cmpless_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_turbopas_less() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_turbopas_cmp() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_turbopas_cmpless() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_turbopas_less_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_turbopas_cmp_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_turbopas_cmpless_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_michaelalloc_less() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_michaelalloc_cmp() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_michaelalloc_cmpless() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_michaelalloc_less_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_michaelalloc_cmp_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPI_michaelalloc_cmpless_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } -} // namespace set - -CPPUNIT_TEST_SUITE_REGISTRATION(set::SkipListSetRCUHdrTest); diff --git a/tests/test-hdr/set/hdr_skiplist_set_rcu_gpt.cpp b/tests/test-hdr/set/hdr_skiplist_set_rcu_gpt.cpp deleted file mode 100644 index 2d01198e..00000000 --- a/tests/test-hdr/set/hdr_skiplist_set_rcu_gpt.cpp +++ /dev/null @@ -1,345 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_skiplist_set_rcu.h" - -#include -#include - -#include "unit/michael_alloc.h" -#include "map/print_skiplist_stat.h" - -namespace set { - namespace { - typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_less() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_cmp() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_cmpless() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_less_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_cmp_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_cmpless_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_xorshift_less() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_xorshift_cmp() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_xorshift_cmpless() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_xorshift_less_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_xorshift_cmp_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_xorshift_cmpless_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_turbopas_less() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_turbopas_cmp() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_turbopas_cmpless() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_turbopas_less_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_turbopas_cmp_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_turbopas_cmpless_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_michaelalloc_less() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_michaelalloc_cmp() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_michaelalloc_cmpless() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_michaelalloc_less_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_michaelalloc_cmp_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListSetRCUHdrTest::SkipList_RCU_GPT_michaelalloc_cmpless_stat() - { - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } -} // namespace set diff --git a/tests/test-hdr/set/hdr_skiplist_set_rcu_shb.cpp b/tests/test-hdr/set/hdr_skiplist_set_rcu_shb.cpp deleted file mode 100644 index df67d975..00000000 --- a/tests/test-hdr/set/hdr_skiplist_set_rcu_shb.cpp +++ /dev/null @@ -1,396 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_skiplist_set_rcu.h" - -#include -#include - -#include "unit/michael_alloc.h" -#include "map/print_skiplist_stat.h" - -namespace set { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - } -#endif - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_cmpless() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_cmp_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_cmpless_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_xorshift_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_xorshift_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_xorshift_cmpless() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_xorshift_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_xorshift_cmp_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_xorshift_cmpless_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_turbopas_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_turbopas_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_turbopas_cmpless() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_turbopas_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_turbopas_cmp_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_turbopas_cmpless_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_michaelalloc_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_michaelalloc_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_michaelalloc_cmpless() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_michaelalloc_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_michaelalloc_cmp_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHB_michaelalloc_cmpless_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_skiplist_set_rcu_sht.cpp b/tests/test-hdr/set/hdr_skiplist_set_rcu_sht.cpp deleted file mode 100644 index abfa077d..00000000 --- a/tests/test-hdr/set/hdr_skiplist_set_rcu_sht.cpp +++ /dev/null @@ -1,396 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_skiplist_set_rcu.h" - -#include -#include - -#include "unit/michael_alloc.h" -#include "map/print_skiplist_stat.h" - -namespace set { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - } -#endif - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_cmpless() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_cmp_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_cmpless_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_xorshift_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_xorshift_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_xorshift_cmpless() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_xorshift_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_xorshift_cmp_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_xorshift_cmpless_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_turbopas_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_turbopas_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_turbopas_cmpless() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_turbopas_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_turbopas_cmp_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_turbopas_cmpless_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_michaelalloc_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_michaelalloc_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_michaelalloc_cmpless() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_michaelalloc_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_michaelalloc_cmp_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - - void SkipListSetRCUHdrTest::SkipList_RCU_SHT_michaelalloc_cmpless_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListSet< rcu_type, item, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); -#endif - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_splitlist_set_dhp.cpp b/tests/test-hdr/set/hdr_splitlist_set_dhp.cpp deleted file mode 100644 index 59f83c7f..00000000 --- a/tests/test-hdr/set/hdr_splitlist_set_dhp.cpp +++ /dev/null @@ -1,185 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include - -namespace set { - - namespace { - struct DHP_cmp_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::relaxed_ordering memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - }; - - struct DHP_less_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::sequential_consistent memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::less less; - }; - }; - - struct DHP_cmpmix_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - }; - - struct DHP_cmpmix_stat_traits : public DHP_cmpmix_traits - { - typedef cc::split_list::stat<> stat; - }; - } - - void HashSetHdrTest::Split_DHP_cmp() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::DHP, item, DHP_cmp_traits > set; - - test_int< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::DHP, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::relaxed_ordering > - ,cc::split_list::dynamic_bucket_table< true > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Split_DHP_less() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::DHP, item, DHP_less_traits > set; - - test_int< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::DHP, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::sequential_consistent > - ,cc::split_list::dynamic_bucket_table< false > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - >::type - > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Split_DHP_cmpmix() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::DHP, item, DHP_cmpmix_traits > set; - test_int< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::DHP, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Split_DHP_cmpmix_stat() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::DHP, item, DHP_cmpmix_stat_traits > set; - test_int< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::DHP, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - ,cds::opt::stat< cc::split_list::stat<> > - >::type - > opt_set; - test_int< opt_set >(); - } - - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_splitlist_set_hp.cpp b/tests/test-hdr/set/hdr_splitlist_set_hp.cpp deleted file mode 100644 index d204dd06..00000000 --- a/tests/test-hdr/set/hdr_splitlist_set_hp.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include - -namespace set { - - namespace { - struct HP_cmp_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::relaxed_ordering memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - }; - - struct HP_less_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::sequential_consistent memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::less less; - }; - }; - - struct HP_cmpmix_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - }; - - struct HP_cmpmix_stat_traits : public HP_cmpmix_traits - { - typedef cc::split_list::stat<> stat; - }; - } - - void HashSetHdrTest::Split_HP_cmp() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::HP, item, HP_cmp_traits > set; - - test_int< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::HP, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::relaxed_ordering > - ,cc::split_list::dynamic_bucket_table< true > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Split_HP_less() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::HP, item, HP_less_traits > set; - - test_int< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::HP, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::sequential_consistent > - ,cc::split_list::dynamic_bucket_table< false > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - >::type - > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Split_HP_cmpmix() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::HP, item, HP_cmpmix_traits > set; - test_int< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::HP, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Split_HP_cmpmix_stat() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::HP, item, HP_cmpmix_stat_traits > set; - test_int< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::HP, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - ,cds::opt::stat< cc::split_list::stat<> > - >::type - > opt_set; - test_int< opt_set >(); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_splitlist_set_lazy_dhp.cpp b/tests/test-hdr/set/hdr_splitlist_set_lazy_dhp.cpp deleted file mode 100644 index 74d1f8fa..00000000 --- a/tests/test-hdr/set/hdr_splitlist_set_lazy_dhp.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include - -namespace set { - - namespace { - struct DHP_cmp_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::relaxed_ordering memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - }; - - struct DHP_less_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::sequential_consistent memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::less less; - }; - }; - - struct DHP_cmpmix_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - }; - - struct DHP_cmpmix_stat_traits : public DHP_cmpmix_traits - { - typedef cc::split_list::stat<> stat; - }; - } - - void HashSetHdrTest::Split_Lazy_DHP_cmp() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::DHP, item, DHP_cmp_traits > set; - - test_int< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::DHP, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::relaxed_ordering > - ,cc::split_list::dynamic_bucket_table< true > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Split_Lazy_DHP_less() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::DHP, item, DHP_less_traits > set; - - test_int< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::DHP, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::sequential_consistent > - ,cc::split_list::dynamic_bucket_table< false > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - >::type - > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Split_Lazy_DHP_cmpmix() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::DHP, item, DHP_cmpmix_traits > set; - test_int< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::DHP, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Split_Lazy_DHP_cmpmix_stat() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::DHP, item, DHP_cmpmix_stat_traits > set; - test_int< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::DHP, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - ,cds::opt::stat< cc::split_list::stat<> > - >::type - > opt_set; - test_int< opt_set >(); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_splitlist_set_lazy_hp.cpp b/tests/test-hdr/set/hdr_splitlist_set_lazy_hp.cpp deleted file mode 100644 index 140b6a81..00000000 --- a/tests/test-hdr/set/hdr_splitlist_set_lazy_hp.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include - -namespace set { - - namespace { - struct HP_cmp_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::relaxed_ordering memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - }; - - struct HP_less_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::sequential_consistent memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::less less; - }; - }; - - struct HP_cmpmix_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - }; - - struct HP_cmpmix_stat_traits : public HP_cmpmix_traits - { - typedef cc::split_list::stat<> stat; - }; - } - - void HashSetHdrTest::Split_Lazy_HP_cmp() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::HP, item, HP_cmp_traits > set; - - test_int< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::HP, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::relaxed_ordering > - ,cc::split_list::dynamic_bucket_table< true > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Split_Lazy_HP_less() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::HP, item, HP_less_traits > set; - - test_int< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::HP, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::sequential_consistent > - ,cc::split_list::dynamic_bucket_table< false > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - >::type - > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Split_Lazy_HP_cmpmix() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::HP, item, HP_cmpmix_traits > set; - test_int< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::HP, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int< opt_set >(); - } - - void HashSetHdrTest::Split_Lazy_HP_cmpmix_stat() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::HP, item, HP_cmpmix_stat_traits > set; - test_int< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::HP, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cds::opt::stat< cc::split_list::stat<> > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int< opt_set >(); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_splitlist_set_lazy_nogc.cpp b/tests/test-hdr/set/hdr_splitlist_set_lazy_nogc.cpp deleted file mode 100644 index 165c7668..00000000 --- a/tests/test-hdr/set/hdr_splitlist_set_lazy_nogc.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include - -namespace set { - - namespace { - struct nogc_cmp_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::relaxed_ordering memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - }; - - struct nogc_less_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::sequential_consistent memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::less less; - }; - }; - - struct nogc_cmpmix_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - }; - - struct nogc_cmpmix_stat_traits : public nogc_cmpmix_traits - { - typedef cc::split_list::stat<> stat; - }; - } - - void HashSetHdrTest::Split_Lazy_nogc_cmp() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::nogc, item, nogc_cmp_traits > set; - - test_int_nogc< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::nogc, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::relaxed_ordering > - ,cc::split_list::dynamic_bucket_table< true > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_nogc< opt_set >(); - } - - void HashSetHdrTest::Split_Lazy_nogc_less() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::nogc, item, nogc_less_traits > set; - - test_int_nogc< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::nogc, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::sequential_consistent > - ,cc::split_list::dynamic_bucket_table< false > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - >::type - > - >::type - > opt_set; - test_int_nogc< opt_set >(); - } - - void HashSetHdrTest::Split_Lazy_nogc_cmpmix() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::nogc, item, nogc_cmpmix_traits > set; - test_int_nogc< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::nogc, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_nogc< opt_set >(); - } - - void HashSetHdrTest::Split_Lazy_nogc_cmpmix_stat() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::nogc, item, nogc_cmpmix_stat_traits > set; - test_int_nogc< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::nogc, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cds::opt::stat< cc::split_list::stat<>> - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_nogc< opt_set >(); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpb.cpp b/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpb.cpp deleted file mode 100644 index e417312f..00000000 --- a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpb.cpp +++ /dev/null @@ -1,187 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - - namespace { - typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - - struct RCU_GPB_cmp_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::relaxed_ordering memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - }; - - struct RCU_GPB_less_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::sequential_consistent memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits - { - typedef cc::split_list::stat<> stat; - }; - } - - void HashSetHdrTest::Split_Lazy_RCU_GPB_cmp() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_GPB_cmp_traits > set; - - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::relaxed_ordering > - ,cc::split_list::dynamic_bucket_table< true > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - - void HashSetHdrTest::Split_Lazy_RCU_GPB_less() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_GPB_less_traits > set; - - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::sequential_consistent > - ,cc::split_list::dynamic_bucket_table< false > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - >::type - > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - - void HashSetHdrTest::Split_Lazy_RCU_GPB_cmpmix() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - - void HashSetHdrTest::Split_Lazy_RCU_GPB_cmpmix_stat() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::stat< cc::split_list::stat<>> - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpi.cpp b/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpi.cpp deleted file mode 100644 index 9edfb6a0..00000000 --- a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpi.cpp +++ /dev/null @@ -1,188 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - - namespace { - typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - - struct RCU_GPI_cmp_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::relaxed_ordering memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - }; - - struct RCU_GPI_less_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::sequential_consistent memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits - { - typedef cc::split_list::stat<> stat; - }; - - } - - void HashSetHdrTest::Split_Lazy_RCU_GPI_cmp() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_GPI_cmp_traits > set; - - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::relaxed_ordering > - ,cc::split_list::dynamic_bucket_table< true > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - - void HashSetHdrTest::Split_Lazy_RCU_GPI_less() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_GPI_less_traits > set; - - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::sequential_consistent > - ,cc::split_list::dynamic_bucket_table< false > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - >::type - > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - - void HashSetHdrTest::Split_Lazy_RCU_GPI_cmpmix() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - - void HashSetHdrTest::Split_Lazy_RCU_GPI_cmpmix_stat() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - , cc::opt::stat< cc::split_list::stat<>> - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpt.cpp b/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpt.cpp deleted file mode 100644 index ed025148..00000000 --- a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpt.cpp +++ /dev/null @@ -1,187 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - - namespace { - typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - - struct RCU_GPT_cmp_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::relaxed_ordering memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - }; - - struct RCU_GPT_less_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::sequential_consistent memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits - { - typedef cc::split_list::stat<> stat; - }; - } - - void HashSetHdrTest::Split_Lazy_RCU_GPT_cmp() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_GPT_cmp_traits > set; - - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::relaxed_ordering > - ,cc::split_list::dynamic_bucket_table< true > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - - void HashSetHdrTest::Split_Lazy_RCU_GPT_less() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_GPT_less_traits > set; - - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::sequential_consistent > - ,cc::split_list::dynamic_bucket_table< false > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - >::type - > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - - void HashSetHdrTest::Split_Lazy_RCU_GPT_cmpmix() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - - void HashSetHdrTest::Split_Lazy_RCU_GPT_cmpmix_stat() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - , cc::opt::stat< cc::split_list::stat<>> - >::type - > opt_set; - test_int_rcu< opt_set >(); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_shb.cpp b/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_shb.cpp deleted file mode 100644 index e63448f0..00000000 --- a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_shb.cpp +++ /dev/null @@ -1,198 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - - struct RCU_SHB_cmp_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::relaxed_ordering memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - }; - - struct RCU_SHB_less_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::sequential_consistent memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits - { - typedef cc::split_list::stat<> stat; - }; - - } -#endif - - void HashSetHdrTest::Split_Lazy_RCU_SHB_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_SHB_cmp_traits > set; - - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::relaxed_ordering > - ,cc::split_list::dynamic_bucket_table< true > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu< opt_set >(); -#endif - } - - void HashSetHdrTest::Split_Lazy_RCU_SHB_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_SHB_less_traits > set; - - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::sequential_consistent > - ,cc::split_list::dynamic_bucket_table< false > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - >::type - > - >::type - > opt_set; - test_int_rcu< opt_set >(); -#endif - } - - void HashSetHdrTest::Split_Lazy_RCU_SHB_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu< opt_set >(); -#endif - } - - void HashSetHdrTest::Split_Lazy_RCU_SHB_cmpmix_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - ,cc::opt::stat< cc::split_list::stat<>> - >::type - > opt_set; - test_int_rcu< opt_set >(); -#endif - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_sht.cpp b/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_sht.cpp deleted file mode 100644 index 75e6d101..00000000 --- a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_sht.cpp +++ /dev/null @@ -1,196 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - - struct RCU_SHT_cmp_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::relaxed_ordering memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - }; - - struct RCU_SHT_less_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::sequential_consistent memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_traits: public cc::split_list::traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - - struct ordered_list_traits: public cc::lazy_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits - { - typedef cc::split_list::stat<> stat; - }; - - } -#endif - - void HashSetHdrTest::Split_Lazy_RCU_SHT_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_SHT_cmp_traits > set; - - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::relaxed_ordering > - ,cc::split_list::dynamic_bucket_table< true > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu< opt_set >(); -#endif - } - - void HashSetHdrTest::Split_Lazy_RCU_SHT_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_SHT_less_traits > set; - - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::sequential_consistent > - ,cc::split_list::dynamic_bucket_table< false > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - >::type - > - >::type - > opt_set; - test_int_rcu< opt_set >(); -#endif - } - - void HashSetHdrTest::Split_Lazy_RCU_SHT_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu< opt_set >(); -#endif - } - - void HashSetHdrTest::Split_Lazy_RCU_SHT_cmpmix_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; - test_int_rcu< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - ,cc::opt::stat< cc::split_list::stat<>> - >::type - > opt_set; - test_int_rcu< opt_set >(); -#endif - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_splitlist_set_nogc.cpp b/tests/test-hdr/set/hdr_splitlist_set_nogc.cpp deleted file mode 100644 index fbf395ac..00000000 --- a/tests/test-hdr/set/hdr_splitlist_set_nogc.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include - -namespace set { - - namespace { - struct nogc_cmp_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::relaxed_ordering memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - }; - - struct nogc_less_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::sequential_consistent memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::less less; - }; - }; - - struct nogc_cmpmix_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - }; - - struct nogc_cmpmix_stat_traits : public nogc_cmpmix_traits - { - typedef cc::split_list::stat<> stat; - }; - } - - void HashSetHdrTest::Split_nogc_cmp() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::nogc, item, nogc_cmp_traits > set; - - test_int_nogc< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::nogc, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::relaxed_ordering > - ,cc::split_list::dynamic_bucket_table< true > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_nogc< opt_set >(); - } - - void HashSetHdrTest::Split_nogc_less() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::nogc, item, nogc_less_traits > set; - - test_int_nogc< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::nogc, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::sequential_consistent > - ,cc::split_list::dynamic_bucket_table< false > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - >::type - > - >::type - > opt_set; - test_int_nogc< opt_set >(); - } - - void HashSetHdrTest::Split_nogc_cmpmix() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::nogc, item, nogc_cmpmix_traits > set; - test_int_nogc< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::nogc, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_nogc< opt_set >(); - } - - void HashSetHdrTest::Split_nogc_cmpmix_stat() - { - // traits-based version - typedef cc::SplitListSet< cds::gc::nogc, item, nogc_cmpmix_stat_traits > set; - test_int_nogc< set >(); - - // option-based version - typedef cc::SplitListSet< cds::gc::nogc, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::stat< cc::split_list::stat<>> - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_nogc< opt_set >(); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_splitlist_set_rcu_gpb.cpp b/tests/test-hdr/set/hdr_splitlist_set_rcu_gpb.cpp deleted file mode 100644 index 9ff0d070..00000000 --- a/tests/test-hdr/set/hdr_splitlist_set_rcu_gpb.cpp +++ /dev/null @@ -1,188 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - - namespace { - typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - - struct RCU_GPB_cmp_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::relaxed_ordering memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - }; - - struct RCU_GPB_less_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::sequential_consistent memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits - { - typedef cc::split_list::stat<> stat; - }; - - } - - void HashSetHdrTest::Split_RCU_GPB_cmp() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_GPB_cmp_traits > set; - - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::relaxed_ordering > - ,cc::split_list::dynamic_bucket_table< true > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - - void HashSetHdrTest::Split_RCU_GPB_less() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_GPB_less_traits > set; - - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::sequential_consistent > - ,cc::split_list::dynamic_bucket_table< false > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - >::type - > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - - void HashSetHdrTest::Split_RCU_GPB_cmpmix() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - - void HashSetHdrTest::Split_RCU_GPB_cmpmix_stat() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - , cc::opt::stat< cc::split_list::stat<>> - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_splitlist_set_rcu_gpi.cpp b/tests/test-hdr/set/hdr_splitlist_set_rcu_gpi.cpp deleted file mode 100644 index 569c3367..00000000 --- a/tests/test-hdr/set/hdr_splitlist_set_rcu_gpi.cpp +++ /dev/null @@ -1,187 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - - namespace { - typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - - struct RCU_GPI_cmp_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::relaxed_ordering memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - }; - - struct RCU_GPI_less_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::sequential_consistent memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits - { - typedef cc::split_list::stat<> stat; - }; - } - - void HashSetHdrTest::Split_RCU_GPI_cmp() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_GPI_cmp_traits > set; - - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::relaxed_ordering > - ,cc::split_list::dynamic_bucket_table< true > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - - void HashSetHdrTest::Split_RCU_GPI_less() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_GPI_less_traits > set; - - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::sequential_consistent > - ,cc::split_list::dynamic_bucket_table< false > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - >::type - > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - - void HashSetHdrTest::Split_RCU_GPI_cmpmix() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - - void HashSetHdrTest::Split_RCU_GPI_cmpmix_stat() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - , cc::opt::stat< cc::split_list::stat<>> - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_splitlist_set_rcu_gpt.cpp b/tests/test-hdr/set/hdr_splitlist_set_rcu_gpt.cpp deleted file mode 100644 index 5069794e..00000000 --- a/tests/test-hdr/set/hdr_splitlist_set_rcu_gpt.cpp +++ /dev/null @@ -1,188 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - - namespace { - typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - - struct RCU_GPT_cmp_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::relaxed_ordering memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - }; - - struct RCU_GPT_less_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::sequential_consistent memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits - { - typedef cc::split_list::stat<> stat; - }; - - } - - void HashSetHdrTest::Split_RCU_GPT_cmp() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_GPT_cmp_traits > set; - - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::relaxed_ordering > - ,cc::split_list::dynamic_bucket_table< true > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - - void HashSetHdrTest::Split_RCU_GPT_less() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_GPT_less_traits > set; - - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::sequential_consistent > - ,cc::split_list::dynamic_bucket_table< false > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - >::type - > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - - void HashSetHdrTest::Split_RCU_GPT_cmpmix() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - - void HashSetHdrTest::Split_RCU_GPT_cmpmix_stat() - { - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - , cc::opt::stat< cc::split_list::stat<>> - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); - } - -} // namespace set - - diff --git a/tests/test-hdr/set/hdr_splitlist_set_rcu_shb.cpp b/tests/test-hdr/set/hdr_splitlist_set_rcu_shb.cpp deleted file mode 100644 index 4c330db1..00000000 --- a/tests/test-hdr/set/hdr_splitlist_set_rcu_shb.cpp +++ /dev/null @@ -1,196 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - - struct RCU_SHB_cmp_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::relaxed_ordering memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - }; - - struct RCU_SHB_less_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::sequential_consistent memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits - { - typedef cc::split_list::stat<> stat; - }; - - } -#endif - - void HashSetHdrTest::Split_RCU_SHB_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_SHB_cmp_traits > set; - - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::relaxed_ordering > - ,cc::split_list::dynamic_bucket_table< true > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); -#endif - } - - void HashSetHdrTest::Split_RCU_SHB_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_SHB_less_traits > set; - - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::sequential_consistent > - ,cc::split_list::dynamic_bucket_table< false > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - >::type - > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); -#endif - } - - void HashSetHdrTest::Split_RCU_SHB_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); -#endif - } - - void HashSetHdrTest::Split_RCU_SHB_cmpmix_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - ,cc::opt::stat< cc::split_list::stat<>> - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); -#endif - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_splitlist_set_rcu_sht.cpp b/tests/test-hdr/set/hdr_splitlist_set_rcu_sht.cpp deleted file mode 100644 index 13d795e6..00000000 --- a/tests/test-hdr/set/hdr_splitlist_set_rcu_sht.cpp +++ /dev/null @@ -1,196 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_set.h" -#include -#include -#include - -namespace set { - -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace { - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - - struct RCU_SHT_cmp_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::relaxed_ordering memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - }; - }; - - struct RCU_SHT_less_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::sequential_consistent memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_traits: public cc::split_list::traits - { - typedef cc::michael_list_tag ordered_list; - typedef HashSetHdrTest::hash_int hash; - typedef HashSetHdrTest::simple_item_counter item_counter; - - struct ordered_list_traits: public cc::michael_list::traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less less; - }; - }; - - struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits - { - typedef cc::split_list::stat<> stat; - }; - - } -#endif - - void HashSetHdrTest::Split_RCU_SHT_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_SHT_cmp_traits > set; - - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::relaxed_ordering > - ,cc::split_list::dynamic_bucket_table< true > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); -#endif - } - - void HashSetHdrTest::Split_RCU_SHT_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_SHT_less_traits > set; - - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::sequential_consistent > - ,cc::split_list::dynamic_bucket_table< false > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - >::type - > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); -#endif - } - - void HashSetHdrTest::Split_RCU_SHT_cmpmix() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); -#endif - } - - void HashSetHdrTest::Split_RCU_SHT_cmpmix_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; - test_int_rcu_michael_list< set >(); - - // option-based version - typedef cc::SplitListSet< rcu_type, item, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::stat< cc::split_list::stat<>> - ,cc::split_list::ordered_list_traits< - cc::michael_list::make_traits< - cc::opt::less< less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_set; - test_int_rcu_michael_list< opt_set >(); -#endif - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_striped_hashset_boost_flat_set.cpp b/tests/test-hdr/set/hdr_striped_hashset_boost_flat_set.cpp deleted file mode 100644 index 77b5d457..00000000 --- a/tests/test-hdr/set/hdr_striped_hashset_boost_flat_set.cpp +++ /dev/null @@ -1,199 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" - -#include -#include -#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500 -namespace set { - void StripedSetHdrTest::Striped_boost_flat_set() - { - CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::flat_set you should use boost version 1.56 or above"); - } -} - -#elif BOOST_VERSION >= 104800 - -#include -#include -#include - -namespace set { - - namespace { - typedef boost::container::flat_set< StripedSetHdrTest::item, StripedSetHdrTest::less > set_t; - - struct my_copy_policy { - typedef set_t::iterator iterator; - - void operator()( set_t& set, iterator itWhat ) - { - set.insert( *itWhat ); - } - }; - } - - void StripedSetHdrTest::Striped_boost_flat_set() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::striping<> > - > set_cmp; - test_striped< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - > set_less; - test_striped< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - > set_cmpmix; - test_striped< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - ,co::mutex_policy< cc::striped_set::striping< cds::sync::spin> > - > set_spin; - test_striped< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)"); - { - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - - set_less_resizing_lf s( 30, cc::striped_set::load_factor_resizing<0>( 1024 ) ); - test_striped_with( s ); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<256>"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - > set_less_resizing_lf16; - test_striped< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024)"); - { - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - - set_less_resizing_sbt s( 30, cc::striped_set::single_bucket_size_threshold<0>( 1024 ) ); - test_striped_with( s ); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> > - > set_less_resizing_sbt16; - test_striped< set_less_resizing_sbt16 >(); - - // Copy policy - CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped< set_copy_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped< set_swap_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped< set_move_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_policy"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped< set_special_copy_item >(); - - } - -} // namespace set - -/* -#else - namespace set { - void StripedSetHdrTest::Striped_boost_flat_set() - { - CPPUNIT_MESSAGE( "Skipped; boost::container::flat_set is not compatible with MS VC++ 11" ); - } - } -#endif -*/ - -#else // BOOST_VERSION < 104800 - -namespace set { - void StripedSetHdrTest::Striped_boost_flat_set() - { - CPPUNIT_MESSAGE( "Skipped; for boost::container::flat_set you should use boost version 1.48 or above" ); - } -} -#endif // BOOST_VERSION diff --git a/tests/test-hdr/set/hdr_striped_hashset_boost_list.cpp b/tests/test-hdr/set/hdr_striped_hashset_boost_list.cpp deleted file mode 100644 index 223ddf01..00000000 --- a/tests/test-hdr/set/hdr_striped_hashset_boost_list.cpp +++ /dev/null @@ -1,181 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" - -#include -#include -#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500 -namespace set { - void StripedSetHdrTest::Striped_boost_list() - { - CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::list you should use boost version 1.56 or above"); - } -} - -#elif BOOST_VERSION >= 104800 - -#include -#include -#include - -namespace set { - - namespace { - struct my_copy_policy { - typedef boost::container::list list_type; - typedef list_type::iterator iterator; - - void operator()( list_type& list, iterator itInsert, iterator itWhat ) - { - list.insert( itInsert, std::make_pair(itWhat->key(), itWhat->val()) ); - } - }; - typedef boost::container::list sequence_t; - } - - void StripedSetHdrTest::Striped_boost_list() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - > set_cmp; - test_striped2< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - > set_less; - test_striped2< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - > set_cmpmix; - test_striped2< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> > - > set_spin; - test_striped2< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)"); - { - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s( 30, cc::striped_set::load_factor_resizing<0>(8)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<4>"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<4> > - > set_less_resizing_lf16; - test_striped2< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)"); - { - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8) ); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> > - > set_less_resizing_sbt6; - test_striped2< set_less_resizing_sbt6 >(); - - - // Copy policy - CPPUNIT_MESSAGE( "copy_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped2< set_copy_item >(); - - CPPUNIT_MESSAGE( "swap_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped2< set_swap_item >(); - - CPPUNIT_MESSAGE( "move_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped2< set_move_item >(); - - CPPUNIT_MESSAGE( "special copy policy"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped2< set_special_copy_item >(); - } - -} // namespace set - -#else // BOOST_VERSION < 104800 - -namespace set { - void StripedSetHdrTest::Striped_boost_list() - { - CPPUNIT_MESSAGE( "Skipped; for boost::container::list you should use boost version 1.48 or above" ); - } -} -#endif // BOOST_VERSION diff --git a/tests/test-hdr/set/hdr_striped_hashset_boost_set.cpp b/tests/test-hdr/set/hdr_striped_hashset_boost_set.cpp deleted file mode 100644 index 31d4ada7..00000000 --- a/tests/test-hdr/set/hdr_striped_hashset_boost_set.cpp +++ /dev/null @@ -1,187 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" - -#include -#include -#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500 -namespace set { - void StripedSetHdrTest::Striped_boost_set() - { - CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::set you should use boost version 1.56 or above"); - } -} - -#elif BOOST_VERSION >= 104800 - -#include -#include -#include - -namespace set { - - namespace { - typedef boost::container::set< StripedSetHdrTest::item, StripedSetHdrTest::less > set_t; - - struct my_copy_policy { - typedef set_t::iterator iterator; - - void operator()( set_t& set, iterator itWhat ) - { - set.insert( *itWhat ); - } - }; - } - - void StripedSetHdrTest::Striped_boost_set() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::striping<> > - > set_cmp; - test_striped< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - ,co::mutex_policy< cc::striped_set::striping<> > - > set_less; - test_striped< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - ,co::mutex_policy< cc::striped_set::striping<> > - > set_cmpmix; - test_striped< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> > - > set_spin; - test_striped< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)"); - { - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>( 1024 )); - test_striped_with( s ); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<256>"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - > set_less_resizing_lf16; - test_striped< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024"); - { - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s( 30, cc::striped_set::single_bucket_size_threshold<0>(1024)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> > - > set_less_resizing_sbt16; - test_striped< set_less_resizing_sbt16 >(); - - // Copy policy - CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped< set_copy_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped< set_swap_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped< set_move_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped< set_special_copy_item >(); - } - -} // namespace set - -#else // BOOST_VERSION < 104800 - -namespace set { - void StripedSetHdrTest::Striped_boost_set() - { - CPPUNIT_MESSAGE( "Skipped; for boost::container::set you should use boost version 1.48 or above" ); - } -} -#endif // BOOST_VERSION diff --git a/tests/test-hdr/set/hdr_striped_hashset_boost_stable_vector.cpp b/tests/test-hdr/set/hdr_striped_hashset_boost_stable_vector.cpp deleted file mode 100644 index 16286b7f..00000000 --- a/tests/test-hdr/set/hdr_striped_hashset_boost_stable_vector.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" - -#include -#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500 -namespace set { - void StripedSetHdrTest::Striped_boost_stable_vector() - { - CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::stable_vector you should use boost version 1.56 or above"); - } -} - -#elif BOOST_VERSION >= 104800 - -#include - -#include -#include -#include - -namespace set { - - namespace { - struct my_copy_policy { - typedef boost::container::stable_vector vector_type; - typedef vector_type::iterator iterator; - - void operator()( vector_type& vec, iterator itInsert, iterator itWhat ) - { - vec.insert( itInsert, *itWhat ); - } - }; - - typedef boost::container::stable_vector sequence_t; - } - - void StripedSetHdrTest::Striped_boost_stable_vector() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::striping<> > - > set_cmp; - test_striped2< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - ,co::mutex_policy< cc::striped_set::striping<> > - , co::less< less > - > set_less; - test_striped2< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::striping<> > - , co::less< less > - > set_cmpmix; - test_striped2< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> > - > set_spin; - test_striped2< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)"); - { - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s( 30, cc::striped_set::load_factor_resizing<0>(8)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<4>"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<4> > - > set_less_resizing_lf16; - test_striped2< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)"); - { - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8) ); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> > - > set_less_resizing_sbt6; - test_striped2< set_less_resizing_sbt6 >(); - - // Copy policy - CPPUNIT_MESSAGE( "copy_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped2< set_copy_item >(); - - CPPUNIT_MESSAGE( "swap_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped2< set_swap_item >(); - - CPPUNIT_MESSAGE( "move_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped2< set_move_item >(); - - CPPUNIT_MESSAGE( "special copy_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped2< set_special_copy_item >(); - } -} // namespace set - -#else // BOOST_VERSION < 104800 - -namespace set { - void StripedSetHdrTest::Striped_boost_stable_vector() - { - CPPUNIT_MESSAGE( "Skipped; for boost::container::stable_vector you should use boost version 1.48 or above" ); - } -} -#endif // BOOST_VERSION diff --git a/tests/test-hdr/set/hdr_striped_hashset_boost_unordered_set.cpp b/tests/test-hdr/set/hdr_striped_hashset_boost_unordered_set.cpp deleted file mode 100644 index 5a71a65c..00000000 --- a/tests/test-hdr/set/hdr_striped_hashset_boost_unordered_set.cpp +++ /dev/null @@ -1,173 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" -#include -#include -#include - -namespace set { - - namespace { - struct equal_item - { - template - bool operator ()( T const& i1, T const& i2) const - { - return i1.key() == i2.key(); - } - }; - - typedef boost::unordered_set< StripedSetHdrTest::item, StripedSetHdrTest::hash_int, equal_item > set_t; - - struct my_copy_policy { - typedef set_t::iterator iterator; - - void operator()( set_t& set, iterator itWhat ) - { - set.insert( std::make_pair(itWhat->key(), itWhat->val()) ); - } - }; - } - - void StripedSetHdrTest::Striped_boost_unordered_set() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::striping<> > - > set_cmp; - test_striped< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - ,co::mutex_policy< cc::striped_set::striping<> > - > set_less; - test_striped< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - ,co::mutex_policy< cc::striped_set::striping<> > - > set_cmpmix; - test_striped< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> > - > set_spin; - test_striped< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)"); - { - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>( 1024 )); - test_striped_with( s ); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<256>"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - > set_less_resizing_lf16; - test_striped< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024"); - { - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s( 30, cc::striped_set::single_bucket_size_threshold<0>(1024)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> > - > set_less_resizing_sbt16; - test_striped< set_less_resizing_sbt16 >(); - - // Copy policy - CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped< set_copy_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped< set_swap_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped< set_move_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped< set_special_copy_item >(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_striped_hashset_boost_vector.cpp b/tests/test-hdr/set/hdr_striped_hashset_boost_vector.cpp deleted file mode 100644 index 7baff3d5..00000000 --- a/tests/test-hdr/set/hdr_striped_hashset_boost_vector.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" - -#include -#include -#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500 -namespace set { - void StripedSetHdrTest::Striped_boost_vector() - { - CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::vector you should use boost version 1.56 or above"); - } -} - -#elif BOOST_VERSION >= 104800 - -#include -#include -#include - -namespace set { - - namespace { - struct my_copy_policy { - typedef boost::container::vector vector_type; - typedef vector_type::iterator iterator; - - void operator()( vector_type& vec, iterator itInsert, iterator itWhat ) - { - vec.insert( itInsert, *itWhat ); - } - }; - - typedef boost::container::vector sequence_t; - } - - void StripedSetHdrTest::Striped_boost_vector() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::striping<> > - > set_cmp; - test_striped2< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - ,co::mutex_policy< cc::striped_set::striping<> > - , co::less< less > - > set_less; - test_striped2< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::striping<> > - , co::less< less > - > set_cmpmix; - test_striped2< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> > - > set_spin; - test_striped2< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)"); - { - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s( 30, cc::striped_set::load_factor_resizing<0>(8)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<4>"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<4> > - > set_less_resizing_lf16; - test_striped2< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)"); - { - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8) ); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> > - > set_less_resizing_sbt6; - test_striped2< set_less_resizing_sbt6 >(); - - // Copy policy - CPPUNIT_MESSAGE( "copy_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped2< set_copy_item >(); - - CPPUNIT_MESSAGE( "swap_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped2< set_swap_item >(); - - CPPUNIT_MESSAGE( "move_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped2< set_move_item >(); - - CPPUNIT_MESSAGE( "special copy_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped2< set_special_copy_item >(); - } - -} // namespace set - -#else // BOOST_VERSION < 104800 - -namespace set { - void StripedSetHdrTest::Striped_boost_vector() - { - CPPUNIT_MESSAGE( "Skipped; for boost::container::vector you should use boost version 1.48 or above" ); - } -} -#endif // BOOST_VERSION diff --git a/tests/test-hdr/set/hdr_striped_hashset_hashset_std.cpp b/tests/test-hdr/set/hdr_striped_hashset_hashset_std.cpp deleted file mode 100644 index 5a21ba07..00000000 --- a/tests/test-hdr/set/hdr_striped_hashset_hashset_std.cpp +++ /dev/null @@ -1,174 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" -#include -#include -#include - -namespace set { - - namespace { - struct equal_item - { - template - bool operator ()( T const& i1, T const& i2) const - { - return i1.key() == i2.key(); - } - }; - - typedef std::unordered_set< StripedSetHdrTest::item, StripedSetHdrTest::hash_int, equal_item > set_t; - - struct my_copy_policy { - typedef set_t::iterator iterator; - - void operator()( set_t& set, iterator itWhat ) - { - set.insert( std::make_pair(itWhat->key(), itWhat->val()) ); - } - }; - } - - void StripedSetHdrTest::Striped_hashset() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::striping<> > - > set_cmp; - test_striped< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - ,co::mutex_policy< cc::striped_set::striping<> > - > set_less; - test_striped< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - ,co::mutex_policy< cc::striped_set::striping<> > - > set_cmpmix; - test_striped< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> > - > set_spin; - test_striped< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)"); - { - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>( 1024 )); - test_striped_with( s ); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<256>"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - > set_less_resizing_lf16; - test_striped< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024"); - { - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s( 30, cc::striped_set::single_bucket_size_threshold<0>(1024)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> > - > set_less_resizing_sbt16; - test_striped< set_less_resizing_sbt16 >(); - - // Copy policy - CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped< set_copy_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped< set_swap_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped< set_move_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped< set_special_copy_item >(); - - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_striped_hashset_list.cpp b/tests/test-hdr/set/hdr_striped_hashset_list.cpp deleted file mode 100644 index 27b19a7e..00000000 --- a/tests/test-hdr/set/hdr_striped_hashset_list.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" -#include -#include -#include - -namespace set { - - namespace { - struct my_copy_policy { - typedef std::list list_type; - typedef list_type::iterator iterator; - - void operator()( list_type& list, iterator itInsert, iterator itWhat ) - { - list.insert( itInsert, std::make_pair(itWhat->key(), itWhat->val()) ); - } - }; - - typedef std::list sequence_t; - } - - void StripedSetHdrTest::Striped_list() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::striping<> > - > set_cmp; - test_striped2< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - ,co::mutex_policy< cc::striped_set::striping<> > - , co::less< less > - > set_less; - test_striped2< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::striping<> > - , co::less< less > - > set_cmpmix; - test_striped2< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> > - > set_spin; - test_striped2< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)"); - { - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s( 30, cc::striped_set::load_factor_resizing<0>(8)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<4>"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<4> > - > set_less_resizing_lf16; - test_striped2< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)"); - { - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8) ); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> > - > set_less_resizing_sbt6; - test_striped2< set_less_resizing_sbt6 >(); - - // Copy policy - CPPUNIT_MESSAGE( "copy_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped2< set_copy_item >(); - - CPPUNIT_MESSAGE( "swap_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped2< set_swap_item >(); - - CPPUNIT_MESSAGE( "move_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped2< set_move_item >(); - - CPPUNIT_MESSAGE( "special copy_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped2< set_special_copy_item >(); - - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_striped_hashset_set.cpp b/tests/test-hdr/set/hdr_striped_hashset_set.cpp deleted file mode 100644 index 7b3182d8..00000000 --- a/tests/test-hdr/set/hdr_striped_hashset_set.cpp +++ /dev/null @@ -1,165 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" -#include -#include -#include - -namespace set { - - namespace { - struct my_copy_policy { - typedef std::set > set_type; - typedef set_type::iterator iterator; - - void operator()( set_type& set, iterator itWhat ) - { - set.insert( std::make_pair(itWhat->key(), itWhat->val()) ); - } - }; - - typedef std::set > set_t; - } - - void StripedSetHdrTest::Striped_set() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::striping<> > - > set_cmp; - test_striped< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - ,co::mutex_policy< cc::striped_set::striping<> > - > set_less; - test_striped< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - ,co::mutex_policy< cc::striped_set::striping<> > - > set_cmpmix; - test_striped< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> > - > set_spin; - test_striped< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)"); - { - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>( 1024 )); - test_striped_with( s ); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<256>"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - > set_less_resizing_lf16; - test_striped< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024"); - { - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s( 30, cc::striped_set::single_bucket_size_threshold<0>(1024)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> > - > set_less_resizing_sbt16; - test_striped< set_less_resizing_sbt16 >(); - - // Copy policy - CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped< set_copy_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped< set_swap_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped< set_move_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_item"); - typedef cc::StripedSet< set_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped< set_special_copy_item >(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_striped_hashset_slist.cpp b/tests/test-hdr/set/hdr_striped_hashset_slist.cpp deleted file mode 100644 index 287e289e..00000000 --- a/tests/test-hdr/set/hdr_striped_hashset_slist.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" -#include -#include -#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500 -namespace set { - void StripedSetHdrTest::Striped_slist() - { - CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::slist you should use boost version 1.56 or above"); - } -} - -#elif BOOST_VERSION >= 104800 - -#include -#include -#include - -namespace set { - - namespace { - struct my_copy_policy { - typedef boost::container::slist list_type; - typedef list_type::iterator iterator; - - void operator()( list_type& list, iterator itInsert, iterator itWhat ) - { - list.insert_after( itInsert, StripedSetHdrTest::item(std::make_pair(itWhat->key(), itWhat->val())) ); - } - }; - - typedef boost::container::slist sequence_t; - } - - void StripedSetHdrTest::Striped_slist() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::striping<> > - > set_cmp; - test_striped2< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - ,co::mutex_policy< cc::striped_set::striping<> > - , co::less< less > - > set_less; - test_striped2< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::striping<> > - , co::less< less > - > set_cmpmix; - test_striped2< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> > - > set_spin; - test_striped2< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)"); - { - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s( 30, cc::striped_set::load_factor_resizing<0>(8)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<4>"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<4> > - > set_less_resizing_lf16; - test_striped2< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)"); - { - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8) ); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> > - > set_less_resizing_sbt6; - test_striped2< set_less_resizing_sbt6 >(); - - // Copy policy - CPPUNIT_MESSAGE( "copy_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped2< set_copy_item >(); - - CPPUNIT_MESSAGE( "swap_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped2< set_swap_item >(); - - CPPUNIT_MESSAGE( "move_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped2< set_move_item >(); - - CPPUNIT_MESSAGE( "special copy_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped2< set_special_copy_item >(); - } - -} // namespace set - - -#else - -namespace set { - void StripedSetHdrTest::Striped_slist() - { - CPPUNIT_MESSAGE("Skipped; for boost::container::slist you should use boost version 1.48 or above"); - } -} // namespace set - -#endif // BOOST_VERSION - diff --git a/tests/test-hdr/set/hdr_striped_hashset_vector.cpp b/tests/test-hdr/set/hdr_striped_hashset_vector.cpp deleted file mode 100644 index 01b63ef0..00000000 --- a/tests/test-hdr/set/hdr_striped_hashset_vector.cpp +++ /dev/null @@ -1,163 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "set/hdr_striped_set.h" -#include -#include -#include - -namespace set { - - namespace { - struct my_copy_policy { - typedef std::vector vector_type; - typedef vector_type::iterator iterator; - - void operator()( vector_type& vec, iterator itInsert, iterator itWhat ) - { - vec.insert( itInsert, std::make_pair(itWhat->key(), itWhat->val()) ); - } - }; - - typedef std::vector sequence_t; - } - - void StripedSetHdrTest::Striped_vector() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::striping<> > - > set_cmp; - test_striped2< set_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - ,co::mutex_policy< cc::striped_set::striping<> > - , co::less< less > - > set_less; - test_striped2< set_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::striping<> > - , co::less< less > - > set_cmpmix; - test_striped2< set_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> > - > set_spin; - test_striped2< set_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)"); - { - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > set_less_resizing_lf; - set_less_resizing_lf s( 30, cc::striped_set::load_factor_resizing<0>(8)); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<4>"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<4> > - > set_less_resizing_lf16; - test_striped2< set_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)"); - { - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > set_less_resizing_sbt; - set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8) ); - test_striped_with(s); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> > - > set_less_resizing_sbt6; - test_striped2< set_less_resizing_sbt6 >(); - - // Copy policy - CPPUNIT_MESSAGE( "copy_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped2< set_copy_item >(); - - CPPUNIT_MESSAGE( "swap_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped2< set_swap_item >(); - - CPPUNIT_MESSAGE( "move_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped2< set_move_item >(); - - CPPUNIT_MESSAGE( "special copy_item"); - typedef cc::StripedSet< sequence_t - , co::hash< hash_int > - , co::compare< cmp > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped2< set_special_copy_item >(); - } - -} // namespace set - -CPPUNIT_TEST_SUITE_REGISTRATION(set::StripedSetHdrTest); diff --git a/tests/test-hdr/set/hdr_striped_set.h b/tests/test-hdr/set/hdr_striped_set.h deleted file mode 100644 index 68dd2501..00000000 --- a/tests/test-hdr/set/hdr_striped_set.h +++ /dev/null @@ -1,784 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_STRIPED_SET_H -#define CDSTEST_HDR_STRIPED_SET_H - -#include "cppunit/cppunit_proxy.h" -#include "size_check.h" - -#include -#include -#include // ref - -// forward namespace declaration -namespace cds { - namespace container {} - namespace opt {} -} - -namespace set { - using misc::check_size; - - namespace cc = cds::container; - namespace co = cds::opt; - - - class StripedSetHdrTest: public CppUnitMini::TestCase - { - public: - struct stat - { - unsigned int nFindCount ; // count of find-functor calling - unsigned int nUpdateNewCount; - unsigned int nUpdateCount; - - stat() - { - memset( this, 0, sizeof(*this)); - } - - void copy( stat const& s ) - { - nFindCount = s.nFindCount; - nUpdateCount = s.nUpdateCount; - nUpdateNewCount = s.nUpdateNewCount; - } - }; - - struct item: public stat - { - int nKey; - int nVal; - - item() - {} - - item( int key ) - : nKey( key ) - , nVal( key ) - {} - - item (int key, int val ) - : nKey(key) - , nVal( val ) - {} - - item( std::pair const& p ) - : nKey( p.first ) - , nVal( p.second ) - {} - - item( item const& i ) - : nKey( i.nKey ) - , nVal( i.nVal ) - {} - - item& operator=(item const& i) - { - nKey = i.nKey; - nVal = i.nVal; - stat::copy(i); - - return *this; - } - - item( item&& i ) - : nKey( i.nKey ) - , nVal( i.nVal ) - {} - - //item& operator=(item&& i) - //{ - // nKey = i.nKey; - // nVal = i.nVal; - // return *this; - //} - - int key() const - { - return nKey; - } - - int val() const - { - return nVal; - } - }; - - struct hash_int { - size_t operator()( int i ) const - { - return co::v::hash()( i ); - } - - size_t operator()( std::pair const& i ) const - { - return co::v::hash()( i.first ); - } - - template - size_t operator()( Item const& i ) const - { - return (*this)( i.key() ); - } - }; - - struct simple_item_counter { - size_t m_nCount; - - simple_item_counter() - : m_nCount(0) - {} - - size_t operator ++() - { - return ++m_nCount; - } - - size_t operator --() - { - return --m_nCount; - } - - void reset() - { - m_nCount = 0; - } - - operator size_t() const - { - return m_nCount; - } - }; - - template - struct less - { - bool operator ()(const T& v1, const T& v2 ) const - { - return v1.key() < v2.key(); - } - - template - bool operator ()(const T& v1, const Q& v2 ) const - { - return v1.key() < v2; - } - - template - bool operator ()(const Q& v1, const T& v2 ) const - { - return v1 < v2.key(); - } - - bool operator ()( std::pair const& v1, const T& v2 ) const - { - return v1.first < v2.key(); - } - - bool operator ()(const T& v1, std::pair const& v2 ) const - { - return v1.key() < v2.first; - } - }; - - template - struct cmp { - int operator ()(const T& v1, const T& v2 ) const - { - if ( v1.key() < v2.key() ) - return -1; - return v1.key() > v2.key() ? 1 : 0; - } - - template - int operator ()(const T& v1, const Q& v2 ) const - { - if ( v1.key() < v2 ) - return -1; - return v1.key() > v2 ? 1 : 0; - } - - template - int operator ()(const Q& v1, const T& v2 ) const - { - if ( v1 < v2.key() ) - return -1; - return v1 > v2.key() ? 1 : 0; - } - - int operator()( std::pair const& v1, T const& v2 ) const - { - if ( v1.first < v2.key() ) - return -1; - return v1.first > v2.key() ? 1 : 0; - } - - int operator()( T const& v1, std::pair const& v2 ) const - { - if ( v1.key() < v2.first ) - return -1; - return v1.key() > v2.first ? 1 : 0; - } - }; - - template - struct equal - { - bool operator ()(const T& v1, const T& v2 ) const - { - return v1.key() == v2.key(); - } - - template - bool operator ()(const T& v1, const Q& v2 ) const - { - return v1.key() == v2; - } - - template - bool operator ()(const Q& v1, const T& v2 ) const - { - return v1 == v2.key(); - } - - bool operator ()( std::pair const& v1, const T& v2 ) const - { - return v1.first == v2.key(); - } - - bool operator ()(const T& v1, std::pair const& v2 ) const - { - return v1.key() == v2.first; - } - }; - - struct find_functor - { - template - void operator()( Item& i, T& /*val*/ ) const - { - ++i.nFindCount; - } - template - void operator()( Item& i, T const& /*val*/ ) const - { - ++i.nFindCount; - } - }; - - template - struct copy_found - { - Item m_found; - - template - void operator()( Item& i, T& /*val*/ ) - { - m_found = i; - } - - void operator()( Item const& i ) - { - m_found = i; - } - }; - - struct insert_functor - { - template - void operator()(Item& i ) - { - i.nVal = i.nKey * 100; - } - }; - - template - static void update_func( bool bNew, Item& i, Q& /*val*/ ) - { - if ( bNew ) - ++i.nUpdateNewCount; - else - ++i.nUpdateCount; - } - - struct update_functor - { - template - void operator()( bool bNew, Item& i, Q& val ) - { - update_func( bNew, i, val ); - } - }; - - public: - template - void test_striped() - { - Set s( 30 ); - CPPUNIT_ASSERT( s.bucket_count() == 32 ); - CPPUNIT_ASSERT( s.lock_count() == 32 ); - - test_striped_with( s ); - } - - template - void test_striped_with( Set& s ) - { - cds::OS::Timer timer; - - test_int_with( s ); - - // Resizing test - for ( int i = 0; i < 10000; i++ ) { - s.insert( i ); - } - - CPPUNIT_MSG( " Duration=" << timer.duration() ); - } - - template - void test_int_with( Set& s) - { - typedef typename Set::value_type value_type; - - item itm; - int key; - - // insert/find test - CPPUNIT_ASSERT( !s.contains( 10 ) ); - CPPUNIT_ASSERT( s.insert( 10 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( s.contains( 10 ) ); - - CPPUNIT_ASSERT( !s.insert( 10 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 )); - - CPPUNIT_ASSERT( !s.contains( 20 ) ); - CPPUNIT_ASSERT( s.insert( std::make_pair(20, 25) )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( s.contains( 10 ) ); - CPPUNIT_ASSERT( s.contains( key = 20 ) ); - CPPUNIT_ASSERT( s.find( key, find_functor() ) ); - { - copy_found f; - key = 20; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 20 ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - CPPUNIT_ASSERT( f.m_found.nFindCount == 1 ); - } - { - copy_found f; - key = 20; - CPPUNIT_ASSERT( s.find( key, find_functor() ) ); - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 20 ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - CPPUNIT_ASSERT( f.m_found.nFindCount == 2 ); - } - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - - CPPUNIT_ASSERT( !s.contains( 25 ) ); - CPPUNIT_ASSERT( s.insert( std::make_pair(25, -1), insert_functor() )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - { - copy_found f; - key = 25; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 25 ); - CPPUNIT_ASSERT( f.m_found.nVal == 2500 ); - } - - // update() test - key = 10; - { - copy_found f; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 10 ); - CPPUNIT_ASSERT( f.m_found.nVal == 10 ); - CPPUNIT_ASSERT( f.m_found.nUpdateCount == 0 ); - CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 0 ); - } - std::pair updateResult = s.update( key, update_functor() ); - CPPUNIT_ASSERT( updateResult.first && !updateResult.second ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - { - copy_found f; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 10 ); - CPPUNIT_ASSERT( f.m_found.nVal == 10 ); - CPPUNIT_ASSERT( f.m_found.nUpdateCount == 1 ); - CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 0 ); - } - - updateResult = s.update(std::make_pair(13, 1300), update_functor(), false); - CPPUNIT_ASSERT(!updateResult.first && !updateResult.second); - updateResult = s.update( std::make_pair(13, 1300), update_functor() ); - CPPUNIT_ASSERT( updateResult.first && updateResult.second ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 4 )); - { - copy_found f; - key = 13; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 13 ); - CPPUNIT_ASSERT( f.m_found.nVal == 1300 ); - CPPUNIT_ASSERT( f.m_found.nUpdateCount == 0 ); - CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 1 ); - } - - // erase test - CPPUNIT_ASSERT( s.erase(13) ); - CPPUNIT_ASSERT( !s.contains( 13 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - CPPUNIT_ASSERT( !s.erase(13) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - CPPUNIT_ASSERT( s.contains( 10 )); - CPPUNIT_ASSERT( s.erase( 10 )); - CPPUNIT_ASSERT( !s.contains( 10 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( !s.erase(10) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - - CPPUNIT_ASSERT( s.contains(20) ); - { - copy_found f; - CPPUNIT_ASSERT( s.erase( 20, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 20 ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - - CPPUNIT_ASSERT( s.insert(235)) - CPPUNIT_ASSERT( s.erase( 235, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 235 ); - CPPUNIT_ASSERT( f.m_found.nVal == 235 ); - } - CPPUNIT_ASSERT( !s.contains( 20 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 )); - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - // emplace test - CPPUNIT_ASSERT( s.emplace( 151 )) ; // key = 151, val = 151 - CPPUNIT_ASSERT( s.emplace( 174, 471 )) ; // key = 174, val = 471 - CPPUNIT_ASSERT( s.emplace( std::make_pair( 190, 91 ) )) ; // key == 190, val = 91 - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - CPPUNIT_ASSERT( s.contains(151)); - CPPUNIT_ASSERT( s.contains(174)); - CPPUNIT_ASSERT( s.contains(190)); - - { - copy_found f; - key = 151; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 151 ); - CPPUNIT_ASSERT( f.m_found.nVal == 151 ); - - key = 174; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 174 ); - CPPUNIT_ASSERT( f.m_found.nVal == 471 ); - - key = 190; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 190 ); - CPPUNIT_ASSERT( f.m_found.nVal == 91 ); - } - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - } - - template - void test_striped2() - { - Set s( 30 ); - CPPUNIT_ASSERT( s.bucket_count() == 32 ); - CPPUNIT_ASSERT( s.lock_count() == 32 ); - - test_striped_with2( s ); - } - - template - void test_striped_with2( Set& s ) - { - cds::OS::Timer timer; - - test_int_with2( s ); - - // Resizing test - for ( int i = 0; i < 10000; i++ ) { - s.insert( i ); - } - - CPPUNIT_MSG( " Duration=" << timer.duration() ); - } - - template - void test_int_with2( Set& s) - { - typedef typename Set::value_type value_type; - - item itm; - int key; - - // insert/find test - CPPUNIT_ASSERT( !s.contains( 10 ) ); - CPPUNIT_ASSERT( s.insert( 10 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( s.contains( 10 ) ); - - CPPUNIT_ASSERT( !s.insert( 10 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 )); - - CPPUNIT_ASSERT( !s.contains( 20, less() ) ); - CPPUNIT_ASSERT( s.insert( std::make_pair(20, 25) )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( s.contains( 10 ) ); - CPPUNIT_ASSERT( s.contains( key = 20, less() ) ); - CPPUNIT_ASSERT( s.find_with( key, less(), find_functor() ) ); - { - copy_found f; - key = 20; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 20 ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - CPPUNIT_ASSERT( f.m_found.nFindCount == 1 ); - } - { - copy_found f; - key = 20; - CPPUNIT_ASSERT( s.find_with( 20, less(), find_functor() ) ); - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 20 ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - CPPUNIT_ASSERT( f.m_found.nFindCount == 2 ); - } - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - - CPPUNIT_ASSERT( !s.contains( 25 ) ); - CPPUNIT_ASSERT( s.insert( std::make_pair(25, -1), insert_functor() )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - { - copy_found f; - key = 25; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 25 ); - CPPUNIT_ASSERT( f.m_found.nVal == 2500 ); - } - - // update() test - key = 10; - { - copy_found f; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 10 ); - CPPUNIT_ASSERT( f.m_found.nVal == 10 ); - CPPUNIT_ASSERT( f.m_found.nUpdateCount == 0 ); - CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 0 ); - } - std::pair updateResult = s.update( key, update_functor() ); - CPPUNIT_ASSERT( updateResult.first && !updateResult.second ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - { - copy_found f; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 10 ); - CPPUNIT_ASSERT( f.m_found.nVal == 10 ); - CPPUNIT_ASSERT( f.m_found.nUpdateCount == 1 ); - CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 0 ); - } - - updateResult = s.update(std::make_pair(13, 1300), update_functor(), false); - CPPUNIT_ASSERT(!updateResult.first && !updateResult.second); - updateResult = s.update( std::make_pair(13, 1300), update_functor() ); - CPPUNIT_ASSERT( updateResult.first && updateResult.second ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 4 )); - { - copy_found f; - key = 13; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 13 ); - CPPUNIT_ASSERT( f.m_found.nVal == 1300 ); - CPPUNIT_ASSERT( f.m_found.nUpdateCount == 0 ); - CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 1 ); - } - - // erase test - CPPUNIT_ASSERT( s.erase(13) ); - CPPUNIT_ASSERT( !s.contains( 13 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - CPPUNIT_ASSERT( !s.erase(13) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - CPPUNIT_ASSERT( s.contains( 10 )); - CPPUNIT_ASSERT( s.erase_with( 10, less() )); - CPPUNIT_ASSERT( !s.contains( 10 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( !s.erase_with( 10, less() ) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - - CPPUNIT_ASSERT( s.contains(20) ); - { - copy_found f; - CPPUNIT_ASSERT( s.erase( 20, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 20 ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - - CPPUNIT_ASSERT( s.insert(235)) - CPPUNIT_ASSERT( s.erase_with( 235, less(), std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 235 ); - CPPUNIT_ASSERT( f.m_found.nVal == 235 ); - } - CPPUNIT_ASSERT( !s.contains( 20 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 )); - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - // emplace test - CPPUNIT_ASSERT( s.emplace( 151 )) ; // key = 151, val = 151 - CPPUNIT_ASSERT( s.emplace( 174, 471 )) ; // key = 174, val = 471 - CPPUNIT_ASSERT( s.emplace( std::make_pair( 190, 91 ) )) ; // key == 190, val = 91 - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - CPPUNIT_ASSERT( s.contains(151)); - CPPUNIT_ASSERT( s.contains(174)); - CPPUNIT_ASSERT( s.contains(190)); - - { - copy_found f; - key = 151; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 151 ); - CPPUNIT_ASSERT( f.m_found.nVal == 151 ); - - key = 174; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 174 ); - CPPUNIT_ASSERT( f.m_found.nVal == 471 ); - - key = 190; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 190 ); - CPPUNIT_ASSERT( f.m_found.nVal == 91 ); - } - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - } - - void Striped_list(); - void Striped_vector(); - void Striped_set(); - void Striped_hashset(); - void Striped_slist(); - void Striped_boost_list(); - void Striped_boost_vector(); - void Striped_boost_stable_vector(); - void Striped_boost_flat_set(); - void Striped_boost_set(); - void Striped_boost_unordered_set(); - - void Refinable_list(); - void Refinable_vector(); - void Refinable_set(); - void Refinable_hashset(); - void Refinable_slist(); - void Refinable_boost_list(); - void Refinable_boost_vector(); - void Refinable_boost_stable_vector(); - void Refinable_boost_flat_set(); - void Refinable_boost_set(); - void Refinable_boost_unordered_set(); - - CPPUNIT_TEST_SUITE(StripedSetHdrTest) - CPPUNIT_TEST(Striped_list) - CPPUNIT_TEST(Striped_vector) - CPPUNIT_TEST(Striped_set) - CPPUNIT_TEST(Striped_hashset) - CPPUNIT_TEST(Striped_slist) - CPPUNIT_TEST(Striped_boost_list) - CPPUNIT_TEST(Striped_boost_vector) - CPPUNIT_TEST(Striped_boost_stable_vector) - CPPUNIT_TEST(Striped_boost_flat_set) - CPPUNIT_TEST(Striped_boost_set) - CPPUNIT_TEST(Striped_boost_unordered_set) - - CPPUNIT_TEST(Refinable_list) - CPPUNIT_TEST(Refinable_vector) - CPPUNIT_TEST(Refinable_set) - CPPUNIT_TEST(Refinable_hashset) - CPPUNIT_TEST(Refinable_slist) - CPPUNIT_TEST(Refinable_boost_list) - CPPUNIT_TEST(Refinable_boost_vector) - CPPUNIT_TEST(Refinable_boost_stable_vector) - CPPUNIT_TEST(Refinable_boost_flat_set) - CPPUNIT_TEST(Refinable_boost_set) - CPPUNIT_TEST(Refinable_boost_unordered_set) - - CPPUNIT_TEST_SUITE_END() - }; -} // namespace set - -#endif // #ifndef CDSTEST_HDR_STRIPED_SET_H diff --git a/tests/test-hdr/set/intrusive_cuckoo_set_common.h b/tests/test-hdr/set/intrusive_cuckoo_set_common.h deleted file mode 100644 index 7e3eabd8..00000000 --- a/tests/test-hdr/set/intrusive_cuckoo_set_common.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_INTRUSIVE_CUCKOO_SET_COMMON_H -#define CDSTEST_HDR_INTRUSIVE_CUCKOO_SET_COMMON_H - -namespace set { - namespace { - - typedef IntrusiveCuckooSetHdrTest::hash_int hash1; - struct hash2: private hash1 - { - typedef hash1 base_class; - - size_t operator()( int i ) const - { - size_t h = ~( base_class::operator()(i)); - return ~h + 0x9e3779b9 + (h << 6) + (h >> 2); - } - template - size_t operator()( const Item& i ) const - { - size_t h = ~( base_class::operator()(i)); - return ~h + 0x9e3779b9 + (h << 6) + (h >> 2); - } - size_t operator()( IntrusiveCuckooSetHdrTest::find_key const& i) const - { - size_t h = ~( base_class::operator()(i)); - return ~h + 0x9e3779b9 + (h << 6) + (h >> 2); - } - }; - - template - struct equal_to - { - bool operator ()(const T& v1, const T& v2 ) const - { - return v1.key() == v2.key(); - } - - template - bool operator ()(const T& v1, const Q& v2 ) const - { - return v1.key() == v2; - } - - template - bool operator ()(const Q& v1, const T& v2 ) const - { - return v1 == v2.key(); - } - }; - - } -} // namespace set - -#endif // #ifndef CDSTEST_HDR_INTRUSIVE_CUCKOO_SET_COMMON_H -- 2.34.1