├── CDS_test ├── libcds │ ├── build │ │ └── cmake │ │ │ ├── post_install_script.sh │ │ │ ├── post_uninstall_script.sh │ │ │ └── description.txt │ ├── test │ │ ├── stress │ │ │ ├── framework │ │ │ │ ├── city.h │ │ │ │ └── michael_alloc.cpp │ │ │ ├── data │ │ │ │ ├── text.txt │ │ │ │ └── split.pl │ │ │ ├── set │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── delodd │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── set_delodd_cuckoo.cpp │ │ │ │ │ ├── set_delodd_skip.cpp │ │ │ │ │ └── set_delodd_michael.cpp │ │ │ │ ├── insdel_func │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── set_insdel_func_cuckoo.cpp │ │ │ │ ├── insdel_find │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── set_insdelfind_std.cpp │ │ │ │ │ ├── set_insdelfind_cuckoo.cpp │ │ │ │ │ └── set_insdelfind_skip.cpp │ │ │ │ └── insdel_string │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── set_insdel_string_std.cpp │ │ │ ├── stack │ │ │ │ └── CMakeLists.txt │ │ │ ├── pqueue │ │ │ │ └── CMakeLists.txt │ │ │ ├── queue │ │ │ │ └── CMakeLists.txt │ │ │ ├── map │ │ │ │ ├── delodd │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── map_delodd_cuckoo.cpp │ │ │ │ │ ├── map_delodd_skip.cpp │ │ │ │ │ ├── map_delodd_michael.cpp │ │ │ │ │ └── map_delodd_split.cpp │ │ │ │ ├── find_int │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── insfind_int │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── map_insfind_std.cpp │ │ │ │ │ └── map_insfind_cuckoo.cpp │ │ │ │ ├── insdel_func │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── insdel_int │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── map_insdel_int_std.cpp │ │ │ │ │ ├── map_insdel_int_cuckoo.cpp │ │ │ │ │ ├── map_insdel_int_skip.cpp │ │ │ │ │ ├── map_insdel_int_michael.cpp │ │ │ │ │ └── map_insdel_int_split.cpp │ │ │ │ ├── insdelfind │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── map_insdelfind_std.cpp │ │ │ │ │ ├── map_insdelfind_cuckoo.cpp │ │ │ │ │ └── map_insdelfind_skip.cpp │ │ │ │ ├── find_string │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── insdel_item_int │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── insdel_string │ │ │ │ │ └── CMakeLists.txt │ │ │ │ └── CMakeLists.txt │ │ │ └── CMakeLists.txt │ │ ├── CMakeLists.txt │ │ └── unit │ │ │ ├── deque │ │ │ └── CMakeLists.txt │ │ │ ├── pqueue │ │ │ └── CMakeLists.txt │ │ │ ├── misc │ │ │ └── CMakeLists.txt │ │ │ ├── stack │ │ │ └── CMakeLists.txt │ │ │ ├── striped-map │ │ │ └── CMakeLists.txt │ │ │ ├── CMakeLists.txt │ │ │ ├── striped-set │ │ │ └── CMakeLists.txt │ │ │ ├── queue │ │ │ └── CMakeLists.txt │ │ │ └── tree │ │ │ ├── CMakeLists.txt │ │ │ └── ellen_bintree_update_desc_pool.cpp │ ├── tools │ │ ├── make_distrib.bat │ │ ├── make_docs.bat │ │ └── tsan-suppression │ ├── doxygen │ │ ├── images.odp │ │ ├── image │ │ │ └── feldman_hashset.png │ │ ├── footer.html │ │ └── index.html │ ├── projects │ │ └── Win │ │ │ ├── build-vc12.cmd │ │ │ ├── build-vc14.cmd │ │ │ ├── build-msbuild.cmd │ │ │ └── vc14 │ │ │ ├── gtest-deque.vcxproj.filters │ │ │ └── stress-pqueue.vcxproj.filters │ ├── thanks │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ └── cds │ │ ├── os │ │ ├── hpux │ │ │ ├── timer.h │ │ │ └── alloc_aligned.h │ │ ├── aix │ │ │ └── alloc_aligned.h │ │ ├── sunos │ │ │ └── alloc_aligned.h │ │ └── free_bsd │ │ │ └── alloc_aligned.h │ │ ├── algo │ │ └── flat_combining.h │ │ ├── intrusive │ │ ├── skip_list_hp.h │ │ ├── skip_list_dhp.h │ │ └── lazy_list_hp.h │ │ └── gc │ │ └── dhp.h ├── Readme.md ├── libcds-amd64-vcv140.dll ├── libcds-amd64-vcv140.lib ├── bench_show.sh ├── x64 │ └── Release │ │ ├── libcds-amd64-vcv140.dll │ │ ├── libcds-amd64-vcv140.lib │ │ └── bench.cmd ├── Makefile ├── bench.sh └── CDS_test.sln ├── Real_app_bench ├── libcds │ ├── build │ │ └── cmake │ │ │ ├── post_install_script.sh │ │ │ ├── post_uninstall_script.sh │ │ │ └── description.txt │ ├── test │ │ ├── stress │ │ │ ├── framework │ │ │ │ ├── city.h │ │ │ │ └── michael_alloc.cpp │ │ │ ├── data │ │ │ │ ├── text.txt │ │ │ │ └── split.pl │ │ │ ├── set │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── delodd │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── set_delodd_cuckoo.cpp │ │ │ │ ├── insdel_func │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── insdel_find │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── set_insdelfind_std.cpp │ │ │ │ └── insdel_string │ │ │ │ │ └── CMakeLists.txt │ │ │ ├── stack │ │ │ │ └── CMakeLists.txt │ │ │ ├── pqueue │ │ │ │ └── CMakeLists.txt │ │ │ ├── queue │ │ │ │ └── CMakeLists.txt │ │ │ ├── map │ │ │ │ ├── delodd │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── map_delodd_cuckoo.cpp │ │ │ │ ├── find_int │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── insfind_int │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── map_insfind_std.cpp │ │ │ │ ├── insdel_func │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── insdel_int │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── map_insdel_int_std.cpp │ │ │ │ ├── insdelfind │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── map_insdelfind_std.cpp │ │ │ │ ├── find_string │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── insdel_item_int │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── insdel_string │ │ │ │ │ └── CMakeLists.txt │ │ │ │ └── CMakeLists.txt │ │ │ └── CMakeLists.txt │ │ ├── CMakeLists.txt │ │ └── unit │ │ │ ├── deque │ │ │ └── CMakeLists.txt │ │ │ ├── pqueue │ │ │ └── CMakeLists.txt │ │ │ ├── misc │ │ │ └── CMakeLists.txt │ │ │ ├── stack │ │ │ └── CMakeLists.txt │ │ │ ├── striped-map │ │ │ └── CMakeLists.txt │ │ │ ├── CMakeLists.txt │ │ │ ├── striped-set │ │ │ └── CMakeLists.txt │ │ │ ├── queue │ │ │ └── CMakeLists.txt │ │ │ └── tree │ │ │ └── CMakeLists.txt │ ├── tools │ │ ├── make_distrib.bat │ │ ├── make_docs.bat │ │ └── tsan-suppression │ ├── doxygen │ │ ├── images.odp │ │ ├── image │ │ │ └── feldman_hashset.png │ │ ├── footer.html │ │ └── index.html │ ├── projects │ │ └── Win │ │ │ ├── build-vc12.cmd │ │ │ ├── build-vc14.cmd │ │ │ ├── build-msbuild.cmd │ │ │ └── vc14 │ │ │ ├── gtest-deque.vcxproj.filters │ │ │ └── stress-pqueue.vcxproj.filters │ ├── thanks │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ └── cds │ │ ├── os │ │ ├── hpux │ │ │ ├── timer.h │ │ │ └── alloc_aligned.h │ │ ├── aix │ │ │ └── alloc_aligned.h │ │ ├── sunos │ │ │ └── alloc_aligned.h │ │ └── free_bsd │ │ │ └── alloc_aligned.h │ │ ├── algo │ │ └── flat_combining.h │ │ ├── intrusive │ │ └── skip_list_hp.h │ │ └── gc │ │ └── dhp.h ├── Readme.md ├── libcds-amd64-vcv140.dll ├── libcds-amd64-vcv140.lib ├── x64 │ └── Release │ │ ├── libcds-amd64-vcv140.dll │ │ ├── libcds-amd64-vcv140.lib │ │ └── bench.cmd ├── bench.sh ├── Makefile └── Real_app_bench.sln ├── benchmark ├── Readme.md ├── Makefile ├── bench.sh └── benchmark.sln ├── bench_contfree ├── Readme.md ├── Makefile ├── bench.sh └── bench_contfree.sln ├── any_object_threadsafe ├── any_object_threadsafe.v12.suo ├── Makefile ├── Readme.md └── any_object_threadsafe.sln ├── contfree_shared_mutex ├── contfree_shared_mutex.v12.suo ├── Makefile ├── Readme.md ├── main.cpp └── contfree_shared_mutex.sln ├── examples ├── Readme.md ├── main_3.cpp ├── main_8.cpp ├── main_19.cpp ├── main_21.cpp ├── main_20.cpp ├── main_22.cpp ├── main_23.cpp ├── main_24.cpp ├── main_4.cpp ├── main_26.cpp ├── main_6.cpp ├── main_5.cpp ├── main_7.cpp ├── main45.cpp └── main_25.cpp └── .github └── FUNDING.yml /CDS_test/libcds/build/cmake/post_install_script.sh: -------------------------------------------------------------------------------- 1 | ldconfig -------------------------------------------------------------------------------- /CDS_test/libcds/build/cmake/post_uninstall_script.sh: -------------------------------------------------------------------------------- 1 | ldconfig -------------------------------------------------------------------------------- /Real_app_bench/libcds/build/cmake/post_install_script.sh: -------------------------------------------------------------------------------- 1 | ldconfig -------------------------------------------------------------------------------- /Real_app_bench/libcds/build/cmake/post_uninstall_script.sh: -------------------------------------------------------------------------------- 1 | ldconfig -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/framework/city.h: -------------------------------------------------------------------------------- 1 | #include -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/framework/city.h: -------------------------------------------------------------------------------- 1 | #include -------------------------------------------------------------------------------- /CDS_test/libcds/build/cmake/description.txt: -------------------------------------------------------------------------------- 1 | libcds - Concurrent Data Structure C++ library -------------------------------------------------------------------------------- /CDS_test/Readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/CDS_test/Readme.md -------------------------------------------------------------------------------- /CDS_test/libcds/tools/make_distrib.bat: -------------------------------------------------------------------------------- 1 | 2 | cd .. 3 | perl -X tools/make_distrib.pl 4 | cd tools -------------------------------------------------------------------------------- /Real_app_bench/libcds/build/cmake/description.txt: -------------------------------------------------------------------------------- 1 | libcds - Concurrent Data Structure C++ library -------------------------------------------------------------------------------- /Real_app_bench/libcds/tools/make_distrib.bat: -------------------------------------------------------------------------------- 1 | 2 | cd .. 3 | perl -X tools/make_distrib.pl 4 | cd tools -------------------------------------------------------------------------------- /benchmark/Readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/benchmark/Readme.md -------------------------------------------------------------------------------- /Real_app_bench/Readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/Real_app_bench/Readme.md -------------------------------------------------------------------------------- /bench_contfree/Readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/bench_contfree/Readme.md -------------------------------------------------------------------------------- /CDS_test/libcds-amd64-vcv140.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/CDS_test/libcds-amd64-vcv140.dll -------------------------------------------------------------------------------- /CDS_test/libcds-amd64-vcv140.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/CDS_test/libcds-amd64-vcv140.lib -------------------------------------------------------------------------------- /CDS_test/libcds/doxygen/images.odp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/CDS_test/libcds/doxygen/images.odp -------------------------------------------------------------------------------- /CDS_test/libcds/projects/Win/build-vc12.cmd: -------------------------------------------------------------------------------- 1 | call "%VS120COMNTOOLS%"\vsvars32.bat 2 | call build-msbuild.cmd vc12 Release /tv:12.0 /m 3 | -------------------------------------------------------------------------------- /CDS_test/libcds/projects/Win/build-vc14.cmd: -------------------------------------------------------------------------------- 1 | call "%VS140COMNTOOLS%"\vsvars32.bat 2 | call build-msbuild.cmd vc14 Release /tv:14.0 /m 3 | -------------------------------------------------------------------------------- /Real_app_bench/libcds-amd64-vcv140.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/Real_app_bench/libcds-amd64-vcv140.dll -------------------------------------------------------------------------------- /Real_app_bench/libcds-amd64-vcv140.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/Real_app_bench/libcds-amd64-vcv140.lib -------------------------------------------------------------------------------- /CDS_test/bench_show.sh: -------------------------------------------------------------------------------- 1 | #sudo apt-get install numactl 2 | 3 | 4 | numactl --localalloc --cpunodebind=0 ./benchmark 18 5 | 6 | # ./benchmark -------------------------------------------------------------------------------- /Real_app_bench/libcds/doxygen/images.odp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/Real_app_bench/libcds/doxygen/images.odp -------------------------------------------------------------------------------- /Real_app_bench/libcds/projects/Win/build-vc12.cmd: -------------------------------------------------------------------------------- 1 | call "%VS120COMNTOOLS%"\vsvars32.bat 2 | call build-msbuild.cmd vc12 Release /tv:12.0 /m 3 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/projects/Win/build-vc14.cmd: -------------------------------------------------------------------------------- 1 | call "%VS140COMNTOOLS%"\vsvars32.bat 2 | call build-msbuild.cmd vc14 Release /tv:14.0 /m 3 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/data/text.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/CDS_test/libcds/test/stress/data/text.txt -------------------------------------------------------------------------------- /CDS_test/x64/Release/libcds-amd64-vcv140.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/CDS_test/x64/Release/libcds-amd64-vcv140.dll -------------------------------------------------------------------------------- /CDS_test/x64/Release/libcds-amd64-vcv140.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/CDS_test/x64/Release/libcds-amd64-vcv140.lib -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/data/text.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/Real_app_bench/libcds/test/stress/data/text.txt -------------------------------------------------------------------------------- /CDS_test/libcds/doxygen/image/feldman_hashset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/CDS_test/libcds/doxygen/image/feldman_hashset.png -------------------------------------------------------------------------------- /Real_app_bench/x64/Release/libcds-amd64-vcv140.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/Real_app_bench/x64/Release/libcds-amd64-vcv140.dll -------------------------------------------------------------------------------- /Real_app_bench/x64/Release/libcds-amd64-vcv140.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/Real_app_bench/x64/Release/libcds-amd64-vcv140.lib -------------------------------------------------------------------------------- /any_object_threadsafe/any_object_threadsafe.v12.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/any_object_threadsafe/any_object_threadsafe.v12.suo -------------------------------------------------------------------------------- /contfree_shared_mutex/contfree_shared_mutex.v12.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/contfree_shared_mutex/contfree_shared_mutex.v12.suo -------------------------------------------------------------------------------- /Real_app_bench/libcds/doxygen/image/feldman_hashset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexeyAB/object_threadsafe/HEAD/Real_app_bench/libcds/doxygen/image/feldman_hashset.png -------------------------------------------------------------------------------- /CDS_test/x64/Release/bench.cmd: -------------------------------------------------------------------------------- 1 | echo ---------------------------------------------------------------------- >> bench_cds_log.txt 2 | time /T >> bench_cds_log.txt 3 | CDS_test.exe >> bench_cds_log.txt -------------------------------------------------------------------------------- /Real_app_bench/x64/Release/bench.cmd: -------------------------------------------------------------------------------- 1 | echo ---------------------------------------------------------------------- >> bench_cds_log.txt 2 | time /T >> bench_cds_log.txt 3 | Real_app_bench.exe >> bench_cds_log.txt -------------------------------------------------------------------------------- /CDS_test/libcds/tools/make_docs.bat: -------------------------------------------------------------------------------- 1 | set DOXYPRJ_ROOT=. 2 | cd .. 3 | rm -fr doc 4 | md doc 5 | "%DOXYGEN_PATH%\bin\doxygen" doxygen\cds.doxy > tools\doxygen.log 2>&1 6 | cp -f doxygen/index.html doc/index.html 7 | cd tools 8 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/tools/make_docs.bat: -------------------------------------------------------------------------------- 1 | set DOXYPRJ_ROOT=. 2 | cd .. 3 | rm -fr doc 4 | md doc 5 | "%DOXYGEN_PATH%\bin\doxygen" doxygen\cds.doxy > tools\doxygen.log 2>&1 6 | cp -f doxygen/index.html doc/index.html 7 | cd tools 8 | -------------------------------------------------------------------------------- /benchmark/Makefile: -------------------------------------------------------------------------------- 1 | benchmark : main.o 2 | g++ -lm -pthread -O3 -o benchmark main.o 3 | 4 | 5 | gcc = g++ -std=c++14 -pthread -O3 -c 6 | 7 | main.o : main.cpp 8 | $(gcc) main.cpp 9 | 10 | 11 | clean : 12 | rm main.o benchmark 13 | -------------------------------------------------------------------------------- /examples/Readme.md: -------------------------------------------------------------------------------- 1 | ## All examples from online compilers in articles 2 | 3 | You can copy-paste content of any of these files into the online compiler: http://coliru.stacked-crooked.com/ 4 | 5 | Then press bottom-right button: Compile, link and run... -------------------------------------------------------------------------------- /bench_contfree/Makefile: -------------------------------------------------------------------------------- 1 | benchmark : main.o 2 | g++ -lm -pthread -O3 -o benchmark main.o 3 | 4 | 5 | gcc = g++ -std=c++14 -pthread -O3 -c 6 | 7 | main.o : main.cpp 8 | $(gcc) main.cpp 9 | 10 | 11 | clean : 12 | rm main.o benchmark 13 | -------------------------------------------------------------------------------- /benchmark/bench.sh: -------------------------------------------------------------------------------- 1 | echo ------------------------------- >> bench_log.txt 2 | ##date +%F >> bench_log.txt 3 | date +%T >> bench_log.txt 4 | 5 | numactl --localalloc --cpunodebind=0 ./benchmark 16 >> bench_log.txt 6 | 7 | # ./benchmark >> bench_log.txt 8 | -------------------------------------------------------------------------------- /bench_contfree/bench.sh: -------------------------------------------------------------------------------- 1 | echo ------------------------------- >> bench_log.txt 2 | ##date +%F >> bench_log.txt 3 | date +%T >> bench_log.txt 4 | 5 | numactl --localalloc --cpunodebind=0 ./benchmark 16 >> bench_log.txt 6 | 7 | # ./benchmark >> bench_log.txt 8 | -------------------------------------------------------------------------------- /Real_app_bench/bench.sh: -------------------------------------------------------------------------------- 1 | #sudo apt-get install numactl 2 | echo ------------------------------- >> bench_cds_log.txt 3 | ##date +%F >> bench_cds_log.txt 4 | date +%T >> bench_cds_log.txt 5 | 6 | ./benchmark >> bench_cds_log.txt 7 | 8 | # ./benchmark >> bench_cds_log.txt 9 | -------------------------------------------------------------------------------- /CDS_test/Makefile: -------------------------------------------------------------------------------- 1 | benchmark : main.o 2 | g++ -lm -pthread -O3 -o benchmark main.o ./libcds/bin/libcds-s.a 3 | 4 | 5 | gcc = g++ -std=c++14 -pthread -I./libcds -O3 -c 6 | 7 | main.o : main.cpp 8 | $(gcc) main.cpp 9 | 10 | 11 | clean : 12 | rm main.o benchmark 13 | -------------------------------------------------------------------------------- /Real_app_bench/Makefile: -------------------------------------------------------------------------------- 1 | benchmark : main.o 2 | g++ -lm -pthread -O3 -o benchmark main.o ./libcds/bin/libcds-s.a 3 | 4 | 5 | gcc = g++ -std=c++14 -pthread -I./libcds -O3 -c 6 | 7 | main.o : main.cpp 8 | $(gcc) main.cpp 9 | 10 | 11 | clean : 12 | rm main.o benchmark 13 | -------------------------------------------------------------------------------- /any_object_threadsafe/Makefile: -------------------------------------------------------------------------------- 1 | any_object_threadsafe : main.o 2 | g++ -lm -pthread -O3 -o any_object_threadsafe main.o 3 | 4 | 5 | gcc = g++ -std=c++14 -pthread -O3 -c 6 | 7 | main.o : main.cpp 8 | $(gcc) main.cpp 9 | 10 | 11 | clean : 12 | rm main.o any_object_threadsafe 13 | -------------------------------------------------------------------------------- /contfree_shared_mutex/Makefile: -------------------------------------------------------------------------------- 1 | contfree_shared_mutex : main.o 2 | g++ -lm -pthread -O3 -o contfree_shared_mutex main.o 3 | 4 | 5 | gcc = g++ -std=c++14 -pthread -O3 -c 6 | 7 | main.o : main.cpp 8 | $(gcc) main.cpp 9 | 10 | 11 | clean : 12 | rm main.o contfree_shared_mutex 13 | -------------------------------------------------------------------------------- /CDS_test/libcds/doxygen/footer.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | $projectname $projectnumber 4 | Developed by Maxim Khizhinsky aka khizmax 2007 - 2016 5 |
6 | Autogenerated $datetime by Doxygen $doxygenversion 7 |
8 | 9 | 10 | -------------------------------------------------------------------------------- /CDS_test/libcds/doxygen/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Automatic redirection failed, please go to index.html. 9 | 10 | 11 | -------------------------------------------------------------------------------- /CDS_test/bench.sh: -------------------------------------------------------------------------------- 1 | #sudo apt-get install numactl 2 | echo ------------------------------- >> bench_cds_log.txt 3 | ##date +%F >> bench_cds_log.txt 4 | date +%T >> bench_cds_log.txt 5 | 6 | numactl --localalloc --cpunodebind=0 ./benchmark 18 >> bench_cds_log.txt 7 | 8 | # ./benchmark >> bench_cds_log.txt 9 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/doxygen/footer.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | $projectname $projectnumber 4 | Developed by Maxim Khizhinsky aka khizmax 2007 - 2016 5 |
6 | Autogenerated $datetime by Doxygen $doxygenversion 7 |
8 | 9 | 10 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/doxygen/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Automatic redirection failed, please go to index.html. 9 | 10 | 11 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | find_package(GTest REQUIRED) 3 | 4 | include_directories( 5 | ${CMAKE_CURRENT_SOURCE_DIR}/include 6 | ${GTEST_INCLUDE_DIRS} 7 | ) 8 | 9 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGTEST_LANG_CXX11") 10 | 11 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/unit) 12 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/stress) 13 | -------------------------------------------------------------------------------- /any_object_threadsafe/Readme.md: -------------------------------------------------------------------------------- 1 | ## We make any object thread-safe 2 | 3 | This is a Windows/Linux example of how to use `safe_ptr<>` pointer in C++ to make any object thread-safe. 4 | 5 | This code is in the online compiler: http://coliru.stacked-crooked.com/a/a97a84ff26c6e9ee 6 | 7 | To build and test do: 8 | 9 | ``` 10 | make 11 | ./any_object_threadsafe 12 | ``` 13 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | find_package(GTest REQUIRED) 3 | 4 | include_directories( 5 | ${CMAKE_CURRENT_SOURCE_DIR}/include 6 | ${GTEST_INCLUDE_DIRS} 7 | ) 8 | 9 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGTEST_LANG_CXX11") 10 | 11 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/unit) 12 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/stress) 13 | -------------------------------------------------------------------------------- /contfree_shared_mutex/Readme.md: -------------------------------------------------------------------------------- 1 | ## We make a std::shared_mutex 10 times faster 2 | 3 | This is an Windows/Linux example of how to use `contention_free_shared_mutex<>` in C++ as highly optimized shared_mutex. 4 | 5 | This code is in the online compiler: http://coliru.stacked-crooked.com/a/11c191b06aeb5fb6 6 | 7 | To build and test do: 8 | 9 | ``` 10 | make 11 | ./contfree_shared_mutex 12 | ``` 13 | -------------------------------------------------------------------------------- /CDS_test/libcds/tools/tsan-suppression: -------------------------------------------------------------------------------- 1 | # Boost race [?] in test framework. Do not affect to libcds 2 | race:CppUnitMini::ThreadPool::~ThreadPool 3 | 4 | # DHP 5 | race:cds::gc::details::retired_ptr::free 6 | 7 | # uRCU false positive 8 | race:cds::urcu::gc*::batch_retire* 9 | 10 | # EllenBinTree false positive 11 | race:ellen_bintree_pool::internal_node_allocator*::allocate 12 | 13 | # TODO: TSan false positive or library issues? 14 | race:cds::container::OptimisticQueue*::alloc_node 15 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/tools/tsan-suppression: -------------------------------------------------------------------------------- 1 | # Boost race [?] in test framework. Do not affect to libcds 2 | race:CppUnitMini::ThreadPool::~ThreadPool 3 | 4 | # DHP 5 | race:cds::gc::details::retired_ptr::free 6 | 7 | # uRCU false positive 8 | race:cds::urcu::gc*::batch_retire* 9 | 10 | # EllenBinTree false positive 11 | race:ellen_bintree_pool::internal_node_allocator*::allocate 12 | 13 | # TODO: TSan false positive or library issues? 14 | race:cds::container::OptimisticQueue*::alloc_node 15 | -------------------------------------------------------------------------------- /examples/main_3.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | void thread_func(std::atomic &shared_val) 6 | { 7 | shared_val += 10; // thread-safe: OK 8 | } 9 | 10 | int main() { 11 | std::atomic shared_val; 12 | shared_val = 0; 13 | 14 | std::thread t1( thread_func, std::ref(shared_val) ); 15 | std::thread t2( thread_func, std::ref(shared_val) ); 16 | t1.join(); 17 | t2.join(); 18 | std::cout << "shared_val = " << shared_val; 19 | 20 | return 0; 21 | } -------------------------------------------------------------------------------- /examples/main_8.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | struct T4 { int a = 1, b = 2, c = 3; }; 5 | T4 t4; 6 | 7 | struct T3 { T4* operator -> () { return &t4; } }; 8 | struct T2 { T3 operator -> () { return T3(); } }; 9 | struct T1 { T2 operator -> () { return T2(); } }; 10 | 11 | int main() 12 | { 13 | T1 t1; 14 | std::cout << t1->c << std::endl; 15 | std::cout << (t1.operator->())->c << std::endl; 16 | std::cout << (t1.operator->().operator->())->c << std::endl; 17 | 18 | return 0; 19 | } -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/set/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCDSUNIT_USE_URCU") 3 | 4 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/delodd) 5 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_find) 6 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_func) 7 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_string) 8 | 9 | add_custom_target( stress-set 10 | DEPENDS 11 | stress-set-delodd 12 | stress-set-insdelfind 13 | stress-set-insdel-func 14 | stress-set-insdel-string 15 | ) 16 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/set/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCDSUNIT_USE_URCU") 3 | 4 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/delodd) 5 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_find) 6 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_func) 7 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_string) 8 | 9 | add_custom_target( stress-set 10 | DEPENDS 11 | stress-set-delodd 12 | stress-set-insdelfind 13 | stress-set-insdel-func 14 | stress-set-insdel-string 15 | ) 16 | -------------------------------------------------------------------------------- /CDS_test/libcds/thanks: -------------------------------------------------------------------------------- 1 | Many thanks to the contributors who feedbacks the errors and propositions for libcds. 2 | In alphabetical order: 3 | 4 | Amila Jayasekara 5 | blinkenlichten (https://github.com/blinkenlichten) 6 | Eugeny Kalishenko (https://github.com/eugenyk) 7 | Jelle van den Hooff 8 | Kyle Hegeman (https://github.com/khegeman) 9 | Lily Tsai (https://github.com/tslilyai) 10 | Lucas Larsch 11 | Markus Elfring 12 | Marsel Galimullin 13 | Mykola Dimura 14 | Mike Krinkin (https://github.com/krinkinmu) 15 | Nikolai Rapotkin 16 | rwf (https://github.com/rfw) 17 | Tamas Lengyel 18 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/thanks: -------------------------------------------------------------------------------- 1 | Many thanks to the contributors who feedbacks the errors and propositions for libcds. 2 | In alphabetical order: 3 | 4 | Amila Jayasekara 5 | blinkenlichten (https://github.com/blinkenlichten) 6 | Eugeny Kalishenko (https://github.com/eugenyk) 7 | Jelle van den Hooff 8 | Kyle Hegeman (https://github.com/khegeman) 9 | Lily Tsai (https://github.com/tslilyai) 10 | Lucas Larsch 11 | Markus Elfring 12 | Marsel Galimullin 13 | Mykola Dimura 14 | Mike Krinkin (https://github.com/krinkinmu) 15 | Nikolai Rapotkin 16 | rwf (https://github.com/rfw) 17 | Tamas Lengyel 18 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/unit/deque/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME unit-deque) 2 | 3 | set(CDSGTEST_DEQUE_SOURCES 4 | ../main.cpp 5 | fcdeque.cpp 6 | ) 7 | 8 | include_directories( 9 | ${CMAKE_CURRENT_SOURCE_DIR} 10 | ) 11 | 12 | add_executable(${PACKAGE_NAME} ${CDSGTEST_DEQUE_SOURCES}) 13 | target_link_libraries(${PACKAGE_NAME} 14 | ${CDS_SHARED_LIBRARY} 15 | ${GTEST_LIBRARY} 16 | ${Boost_THREAD_LIBRARY} 17 | ${Boost_SYSTEM_LIBRARY} 18 | ${CMAKE_THREAD_LIBS_INIT} 19 | ) 20 | 21 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/unit/deque/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME unit-deque) 2 | 3 | set(CDSGTEST_DEQUE_SOURCES 4 | ../main.cpp 5 | fcdeque.cpp 6 | ) 7 | 8 | include_directories( 9 | ${CMAKE_CURRENT_SOURCE_DIR} 10 | ) 11 | 12 | add_executable(${PACKAGE_NAME} ${CDSGTEST_DEQUE_SOURCES}) 13 | target_link_libraries(${PACKAGE_NAME} 14 | ${CDS_SHARED_LIBRARY} 15 | ${GTEST_LIBRARY} 16 | ${Boost_THREAD_LIBRARY} 17 | ${Boost_SYSTEM_LIBRARY} 18 | ${CMAKE_THREAD_LIBS_INIT} 19 | ) 20 | 21 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/projects/Win/build-msbuild.cmd: -------------------------------------------------------------------------------- 1 | :: Command line arguments: 2 | :: %1 - Visual C++ version: vc12 (2013), vc14 (2015) 3 | :: %2 - configuration to build (Release, Debug etc) 4 | :: %3,%4,...%9 - [optional] additional MSBuild options 5 | 6 | set vcXX=%1 7 | set cfg=%2 8 | set MSBUILD=msbuild 9 | 10 | :make 11 | for %%A in (x64 Win32) do ( 12 | %MSBUILD% %vcXX%\cds.sln /t:Clean /p:Configuration=%cfg% /p:Platform=%%A %3 %4 %5 %6 %7 %8 %9 13 | %MSBUILD% %vcXX%\cds.sln /t:Build /p:Configuration=%cfg% /p:Platform=%%A /fl /flp:LogFile=%vcXX%_%%A.log;Encoding=UTF-8;Verbosity=minimal /v:minimal /maxcpucount %3 %4 %5 %6 %7 %8 %9 14 | ) 15 | -------------------------------------------------------------------------------- /CDS_test/libcds/.gitignore: -------------------------------------------------------------------------------- 1 | /doc 2 | /sandbox 3 | /projects/Win/vc12/cds.opensdf 4 | /projects/Win/vc12/cds.sdf 5 | /projects/Win/vc12/cds.v12.suo 6 | /tests/cppunit/*.o 7 | *.o 8 | *.d 9 | /tests/data/dictionary.txt 10 | /bin 11 | /obj 12 | /projects/Win/vc12/*.user 13 | /projects/Win/vc14/cds.sdf 14 | /projects/Win/vc14/cds.v14.suo 15 | /projects/Win/vc14/*.user 16 | /projects/Win/vc14/*.opensdf 17 | /projects/Win/vc14/.vs/ 18 | /todo-2.1.txt 19 | *.log 20 | /.project 21 | /projects/Win/vc14/*.opendb 22 | /test/stress/data/dictionary.txt 23 | /projects/Win/vc14/cds.VC.db 24 | /todo-2.2.txt 25 | /build/Makefile 26 | /build/build.sh 27 | /build/sample 28 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/projects/Win/build-msbuild.cmd: -------------------------------------------------------------------------------- 1 | :: Command line arguments: 2 | :: %1 - Visual C++ version: vc12 (2013), vc14 (2015) 3 | :: %2 - configuration to build (Release, Debug etc) 4 | :: %3,%4,...%9 - [optional] additional MSBuild options 5 | 6 | set vcXX=%1 7 | set cfg=%2 8 | set MSBUILD=msbuild 9 | 10 | :make 11 | for %%A in (x64 Win32) do ( 12 | %MSBUILD% %vcXX%\cds.sln /t:Clean /p:Configuration=%cfg% /p:Platform=%%A %3 %4 %5 %6 %7 %8 %9 13 | %MSBUILD% %vcXX%\cds.sln /t:Build /p:Configuration=%cfg% /p:Platform=%%A /fl /flp:LogFile=%vcXX%_%%A.log;Encoding=UTF-8;Verbosity=minimal /v:minimal /maxcpucount %3 %4 %5 %6 %7 %8 %9 14 | ) 15 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/.gitignore: -------------------------------------------------------------------------------- 1 | /doc 2 | /sandbox 3 | /projects/Win/vc12/cds.opensdf 4 | /projects/Win/vc12/cds.sdf 5 | /projects/Win/vc12/cds.v12.suo 6 | /tests/cppunit/*.o 7 | *.o 8 | *.d 9 | /tests/data/dictionary.txt 10 | /bin 11 | /obj 12 | /projects/Win/vc12/*.user 13 | /projects/Win/vc14/cds.sdf 14 | /projects/Win/vc14/cds.v14.suo 15 | /projects/Win/vc14/*.user 16 | /projects/Win/vc14/*.opensdf 17 | /projects/Win/vc14/.vs/ 18 | /todo-2.1.txt 19 | *.log 20 | /.project 21 | /projects/Win/vc14/*.opendb 22 | /test/stress/data/dictionary.txt 23 | /projects/Win/vc14/cds.VC.db 24 | /todo-2.2.txt 25 | /build/Makefile 26 | /build/build.sh 27 | /build/sample 28 | -------------------------------------------------------------------------------- /examples/main_19.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int shared_value = 0; 6 | std::atomic_flag lock_flag; 7 | 8 | void add_to_shared() { 9 | while(lock_flag.test_and_set(std::memory_order_acquire)); 10 | shared_value += 25; 11 | lock_flag.clear(std::memory_order_release); 12 | int new_shared_value = shared_value; // can be reordered 13 | } 14 | 15 | int main() { 16 | lock_flag.clear(); 17 | std::thread t1([&]() { add_to_shared(); }); 18 | std::thread t2([&]() { add_to_shared(); }); 19 | t1.join(); t2.join(); 20 | std::cout << "shared_value = " << shared_value 21 | << std::endl; 22 | return 0; 23 | } -------------------------------------------------------------------------------- /examples/main_21.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int shared_value = 0; 6 | std::atomic_flag lock_flag; 7 | 8 | void add_to_shared() { 9 | while(lock_flag.test_and_set(std::memory_order_acquire)); 10 | shared_value += 25; 11 | lock_flag.clear(std::memory_order_release); 12 | int new_shared_value = shared_value; // can be reordered 13 | } 14 | 15 | int main() { 16 | lock_flag.clear(); 17 | std::thread t1([&]() { add_to_shared(); }); 18 | std::thread t2([&]() { add_to_shared(); }); 19 | t1.join(); t2.join(); 20 | std::cout << "shared_value = " << shared_value 21 | << std::endl; 22 | return 0; 23 | } -------------------------------------------------------------------------------- /examples/main_20.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int shared_value = 0; 6 | std::atomic lock_flag; 7 | 8 | void add_to_shared() { 9 | int expected = 0; 10 | while(!lock_flag.compare_exchange_weak(expected, 1, std::memory_order_acquire)) 11 | expected = 0; 12 | shared_value += 25; 13 | lock_flag.store(0, std::memory_order_release); 14 | int new_shared_value = shared_value; // can be reordered 15 | } 16 | 17 | int main() { 18 | lock_flag = 0; 19 | std::thread t1([&]() { add_to_shared(); }); 20 | std::thread t2([&]() { add_to_shared(); }); 21 | t1.join(); t2.join(); 22 | std::cout << "shared_value = " << shared_value 23 | << std::endl; 24 | return 0; 25 | } -------------------------------------------------------------------------------- /examples/main_22.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int shared_value = 0; 6 | std::atomic lock_flag; 7 | 8 | void add_to_shared() { 9 | int expected = 0; 10 | while(!lock_flag.compare_exchange_weak(expected, 1, std::memory_order_acquire)) 11 | expected = 0; 12 | shared_value += 25; 13 | lock_flag.store(0, std::memory_order_release); 14 | int new_shared_value = shared_value; // can be reordered 15 | } 16 | 17 | int main() { 18 | lock_flag = 0; 19 | std::thread t1([&]() { add_to_shared(); }); 20 | std::thread t2([&]() { add_to_shared(); }); 21 | t1.join(); t2.join(); 22 | std::cout << "shared_value = " << shared_value 23 | << std::endl; 24 | return 0; 25 | } -------------------------------------------------------------------------------- /CDS_test/libcds/test/unit/pqueue/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME unit-pqueue) 2 | 3 | set(CDSGTEST_PQUEUE_SOURCES 4 | ../main.cpp 5 | fcpqueue_boost_stable_vector.cpp 6 | fcpqueue_deque.cpp 7 | fcpqueue_vector.cpp 8 | intrusive_mspqueue.cpp 9 | mspqueue.cpp 10 | ) 11 | 12 | include_directories( 13 | ${CMAKE_CURRENT_SOURCE_DIR} 14 | ) 15 | 16 | add_executable(${PACKAGE_NAME} ${CDSGTEST_PQUEUE_SOURCES}) 17 | target_link_libraries(${PACKAGE_NAME} 18 | ${CDS_SHARED_LIBRARY} 19 | ${GTEST_LIBRARY} 20 | ${Boost_THREAD_LIBRARY} 21 | ${Boost_SYSTEM_LIBRARY} 22 | ${CMAKE_THREAD_LIBS_INIT} 23 | ) 24 | 25 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/unit/pqueue/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME unit-pqueue) 2 | 3 | set(CDSGTEST_PQUEUE_SOURCES 4 | ../main.cpp 5 | fcpqueue_boost_stable_vector.cpp 6 | fcpqueue_deque.cpp 7 | fcpqueue_vector.cpp 8 | intrusive_mspqueue.cpp 9 | mspqueue.cpp 10 | ) 11 | 12 | include_directories( 13 | ${CMAKE_CURRENT_SOURCE_DIR} 14 | ) 15 | 16 | add_executable(${PACKAGE_NAME} ${CDSGTEST_PQUEUE_SOURCES}) 17 | target_link_libraries(${PACKAGE_NAME} 18 | ${CDS_SHARED_LIBRARY} 19 | ${GTEST_LIBRARY} 20 | ${Boost_THREAD_LIBRARY} 21 | ${Boost_SYSTEM_LIBRARY} 22 | ${CMAKE_THREAD_LIBS_INIT} 23 | ) 24 | 25 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/stack/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-stack) 2 | 3 | set(CDSSTRESS_STACK_SOURCES 4 | ../main.cpp 5 | intrusive_push_pop.cpp 6 | intrusive_push_pop_fcstack.cpp 7 | push.cpp 8 | push_pop.cpp 9 | ) 10 | 11 | include_directories( 12 | ${CMAKE_CURRENT_SOURCE_DIR} 13 | ) 14 | 15 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_STACK_SOURCES} $) 16 | target_link_libraries(${PACKAGE_NAME} 17 | ${CDS_SHARED_LIBRARY} 18 | ${GTEST_LIBRARY} 19 | ${Boost_THREAD_LIBRARY} 20 | ${Boost_SYSTEM_LIBRARY} 21 | ${CMAKE_THREAD_LIBS_INIT} 22 | ) 23 | 24 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/stack/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-stack) 2 | 3 | set(CDSSTRESS_STACK_SOURCES 4 | ../main.cpp 5 | intrusive_push_pop.cpp 6 | intrusive_push_pop_fcstack.cpp 7 | push.cpp 8 | push_pop.cpp 9 | ) 10 | 11 | include_directories( 12 | ${CMAKE_CURRENT_SOURCE_DIR} 13 | ) 14 | 15 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_STACK_SOURCES} $) 16 | target_link_libraries(${PACKAGE_NAME} 17 | ${CDS_SHARED_LIBRARY} 18 | ${GTEST_LIBRARY} 19 | ${Boost_THREAD_LIBRARY} 20 | ${Boost_SYSTEM_LIBRARY} 21 | ${CMAKE_THREAD_LIBS_INIT} 22 | ) 23 | 24 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/pqueue/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-pqueue) 2 | 3 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCDSUNIT_USE_URCU") 4 | 5 | set(CDSSTRESS_PQUEUE_SOURCES 6 | ../main.cpp 7 | pop.cpp 8 | push.cpp 9 | push_pop.cpp 10 | ) 11 | 12 | include_directories( 13 | ${CMAKE_CURRENT_SOURCE_DIR} 14 | ) 15 | 16 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_PQUEUE_SOURCES} $) 17 | target_link_libraries(${PACKAGE_NAME} 18 | ${CDS_SHARED_LIBRARY} 19 | ${GTEST_LIBRARY} 20 | ${Boost_THREAD_LIBRARY} 21 | ${Boost_SYSTEM_LIBRARY} 22 | ${CMAKE_THREAD_LIBS_INIT} 23 | ) 24 | 25 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/test/unit/misc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME unit-misc) 2 | 3 | set(CDSGTEST_MISC_SOURCES 4 | ../main.cpp 5 | bitop.cpp 6 | cxx11_atomic_class.cpp 7 | cxx11_atomic_func.cpp 8 | find_option.cpp 9 | hash_tuple.cpp 10 | permutation_generator.cpp 11 | split_bitstring.cpp 12 | ) 13 | 14 | include_directories( 15 | ${CMAKE_CURRENT_SOURCE_DIR} 16 | ) 17 | 18 | add_executable(${PACKAGE_NAME} ${CDSGTEST_MISC_SOURCES}) 19 | target_link_libraries(${PACKAGE_NAME} 20 | ${CDS_SHARED_LIBRARY} 21 | ${GTEST_LIBRARY} 22 | ${Boost_THREAD_LIBRARY} 23 | ${Boost_SYSTEM_LIBRARY} 24 | ${CMAKE_THREAD_LIBS_INIT} 25 | ) 26 | 27 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/test/unit/stack/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME unit-stack) 2 | 3 | set(CDSGTEST_STACK_SOURCES 4 | ../main.cpp 5 | fcstack.cpp 6 | intrusive_fcstack.cpp 7 | intrusive_treiber_stack_dhp.cpp 8 | intrusive_treiber_stack_hp.cpp 9 | treiber_stack_dhp.cpp 10 | treiber_stack_hp.cpp 11 | ) 12 | 13 | include_directories( 14 | ${CMAKE_CURRENT_SOURCE_DIR} 15 | ) 16 | 17 | add_executable(${PACKAGE_NAME} ${CDSGTEST_STACK_SOURCES}) 18 | target_link_libraries(${PACKAGE_NAME} 19 | ${CDS_SHARED_LIBRARY} 20 | ${GTEST_LIBRARY} 21 | ${Boost_THREAD_LIBRARY} 22 | ${Boost_SYSTEM_LIBRARY} 23 | ${CMAKE_THREAD_LIBS_INIT} 24 | ) 25 | 26 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/pqueue/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-pqueue) 2 | 3 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCDSUNIT_USE_URCU") 4 | 5 | set(CDSSTRESS_PQUEUE_SOURCES 6 | ../main.cpp 7 | pop.cpp 8 | push.cpp 9 | push_pop.cpp 10 | ) 11 | 12 | include_directories( 13 | ${CMAKE_CURRENT_SOURCE_DIR} 14 | ) 15 | 16 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_PQUEUE_SOURCES} $) 17 | target_link_libraries(${PACKAGE_NAME} 18 | ${CDS_SHARED_LIBRARY} 19 | ${GTEST_LIBRARY} 20 | ${Boost_THREAD_LIBRARY} 21 | ${Boost_SYSTEM_LIBRARY} 22 | ${CMAKE_THREAD_LIBS_INIT} 23 | ) 24 | 25 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/unit/misc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME unit-misc) 2 | 3 | set(CDSGTEST_MISC_SOURCES 4 | ../main.cpp 5 | bitop.cpp 6 | cxx11_atomic_class.cpp 7 | cxx11_atomic_func.cpp 8 | find_option.cpp 9 | hash_tuple.cpp 10 | permutation_generator.cpp 11 | split_bitstring.cpp 12 | ) 13 | 14 | include_directories( 15 | ${CMAKE_CURRENT_SOURCE_DIR} 16 | ) 17 | 18 | add_executable(${PACKAGE_NAME} ${CDSGTEST_MISC_SOURCES}) 19 | target_link_libraries(${PACKAGE_NAME} 20 | ${CDS_SHARED_LIBRARY} 21 | ${GTEST_LIBRARY} 22 | ${Boost_THREAD_LIBRARY} 23 | ${Boost_SYSTEM_LIBRARY} 24 | ${CMAKE_THREAD_LIBS_INIT} 25 | ) 26 | 27 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/queue/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-queue) 2 | 3 | set(CDSSTRESS_QUEUE_SOURCES 4 | ../main.cpp 5 | bounded_queue_fulness.cpp 6 | intrusive_push_pop.cpp 7 | pop.cpp 8 | push.cpp 9 | push_pop.cpp 10 | random.cpp 11 | ) 12 | 13 | include_directories( 14 | ${CMAKE_CURRENT_SOURCE_DIR} 15 | ) 16 | 17 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_QUEUE_SOURCES} $) 18 | target_link_libraries(${PACKAGE_NAME} 19 | ${CDS_SHARED_LIBRARY} 20 | ${GTEST_LIBRARY} 21 | ${Boost_THREAD_LIBRARY} 22 | ${Boost_SYSTEM_LIBRARY} 23 | ${CMAKE_THREAD_LIBS_INIT} 24 | ) 25 | 26 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/unit/stack/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME unit-stack) 2 | 3 | set(CDSGTEST_STACK_SOURCES 4 | ../main.cpp 5 | fcstack.cpp 6 | intrusive_fcstack.cpp 7 | intrusive_treiber_stack_dhp.cpp 8 | intrusive_treiber_stack_hp.cpp 9 | treiber_stack_dhp.cpp 10 | treiber_stack_hp.cpp 11 | ) 12 | 13 | include_directories( 14 | ${CMAKE_CURRENT_SOURCE_DIR} 15 | ) 16 | 17 | add_executable(${PACKAGE_NAME} ${CDSGTEST_STACK_SOURCES}) 18 | target_link_libraries(${PACKAGE_NAME} 19 | ${CDS_SHARED_LIBRARY} 20 | ${GTEST_LIBRARY} 21 | ${Boost_THREAD_LIBRARY} 22 | ${Boost_SYSTEM_LIBRARY} 23 | ${CMAKE_THREAD_LIBS_INIT} 24 | ) 25 | 26 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/queue/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-queue) 2 | 3 | set(CDSSTRESS_QUEUE_SOURCES 4 | ../main.cpp 5 | bounded_queue_fulness.cpp 6 | intrusive_push_pop.cpp 7 | pop.cpp 8 | push.cpp 9 | push_pop.cpp 10 | random.cpp 11 | ) 12 | 13 | include_directories( 14 | ${CMAKE_CURRENT_SOURCE_DIR} 15 | ) 16 | 17 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_QUEUE_SOURCES} $) 18 | target_link_libraries(${PACKAGE_NAME} 19 | ${CDS_SHARED_LIBRARY} 20 | ${GTEST_LIBRARY} 21 | ${Boost_THREAD_LIBRARY} 22 | ${Boost_SYSTEM_LIBRARY} 23 | ${CMAKE_THREAD_LIBS_INIT} 24 | ) 25 | 26 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /examples/main_23.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | class spinlock_t { 6 | std::atomic_flag lock_flag; 7 | public: 8 | spinlock_t() { lock_flag.clear(); } 9 | 10 | bool try_lock() { return !lock_flag.test_and_set(std::memory_order_acquire); } 11 | void lock() { for (size_t i = 0; !try_lock(); ++i) if (i % 100 == 0) std::this_thread::yield(); } 12 | void unlock() { lock_flag.clear(std::memory_order_release); } 13 | }; 14 | 15 | int shared_value = 0; 16 | spinlock_t spinlock; 17 | 18 | void add_to_shared() { 19 | spinlock.lock(); 20 | shared_value += 25; 21 | spinlock.unlock(); 22 | } 23 | 24 | int main() { 25 | 26 | std::thread t1([&]() { add_to_shared(); }); 27 | std::thread t2([&]() { add_to_shared(); }); 28 | t1.join(); t2.join(); 29 | std::cout << "shared_value = " << shared_value 30 | << std::endl; 31 | return 0; 32 | } -------------------------------------------------------------------------------- /examples/main_24.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | class spinlock_t { 6 | std::atomic_flag lock_flag; 7 | public: 8 | spinlock_t() { lock_flag.clear(); } 9 | 10 | bool try_lock() { return !lock_flag.test_and_set(std::memory_order_acquire); } 11 | void lock() { for (size_t i = 0; !try_lock(); ++i) if (i % 100 == 0) std::this_thread::yield(); } 12 | void unlock() { lock_flag.clear(std::memory_order_release); } 13 | }; 14 | 15 | int shared_value = 0; 16 | spinlock_t spinlock; 17 | 18 | void add_to_shared() { 19 | spinlock.lock(); 20 | shared_value += 25; 21 | spinlock.unlock(); 22 | } 23 | 24 | int main() { 25 | 26 | std::thread t1([&]() { add_to_shared(); }); 27 | std::thread t2([&]() { add_to_shared(); }); 28 | t1.join(); t2.join(); 29 | std::cout << "shared_value = " << shared_value 30 | << std::endl; 31 | return 0; 32 | } -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/set/delodd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-set-delodd) 2 | 3 | set(CDSSTRESS_SET_DELODD_SOURCES 4 | ../../main.cpp 5 | set_delodd.cpp 6 | set_delodd_cuckoo.cpp 7 | set_delodd_ellentree.cpp 8 | set_delodd_feldman_hashset.cpp 9 | set_delodd_michael.cpp 10 | set_delodd_skip.cpp 11 | set_delodd_split.cpp 12 | ) 13 | 14 | include_directories( 15 | ${CMAKE_CURRENT_SOURCE_DIR} 16 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 17 | ) 18 | 19 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_SET_DELODD_SOURCES} $) 20 | target_link_libraries(${PACKAGE_NAME} 21 | ${CDS_SHARED_LIBRARY} 22 | ${GTEST_LIBRARY} 23 | ${Boost_THREAD_LIBRARY} 24 | ${Boost_SYSTEM_LIBRARY} 25 | ${CMAKE_THREAD_LIBS_INIT} 26 | ) 27 | 28 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/set/delodd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-set-delodd) 2 | 3 | set(CDSSTRESS_SET_DELODD_SOURCES 4 | ../../main.cpp 5 | set_delodd.cpp 6 | set_delodd_cuckoo.cpp 7 | set_delodd_ellentree.cpp 8 | set_delodd_feldman_hashset.cpp 9 | set_delodd_michael.cpp 10 | set_delodd_skip.cpp 11 | set_delodd_split.cpp 12 | ) 13 | 14 | include_directories( 15 | ${CMAKE_CURRENT_SOURCE_DIR} 16 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 17 | ) 18 | 19 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_SET_DELODD_SOURCES} $) 20 | target_link_libraries(${PACKAGE_NAME} 21 | ${CDS_SHARED_LIBRARY} 22 | ${GTEST_LIBRARY} 23 | ${Boost_THREAD_LIBRARY} 24 | ${Boost_SYSTEM_LIBRARY} 25 | ${CMAKE_THREAD_LIBS_INIT} 26 | ) 27 | 28 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/test/unit/striped-map/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME unit-striped-map) 2 | 3 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCDSUNIT_ENABLE_BOOST_CONTAINER") 4 | 5 | set(CDSGTEST_STRIPED_MAP_SOURCES 6 | ../main.cpp 7 | cuckoo_map.cpp 8 | map_boost_flat_map.cpp 9 | map_boost_list.cpp 10 | map_boost_map.cpp 11 | map_boost_slist.cpp 12 | map_boost_unordered_map.cpp 13 | map_std_list.cpp 14 | map_std_map.cpp 15 | map_std_unordered_map.cpp 16 | ) 17 | 18 | include_directories( 19 | ${CMAKE_CURRENT_SOURCE_DIR} 20 | ) 21 | 22 | add_executable(${PACKAGE_NAME} ${CDSGTEST_STRIPED_MAP_SOURCES}) 23 | target_link_libraries(${PACKAGE_NAME} 24 | ${CDS_SHARED_LIBRARY} 25 | ${GTEST_LIBRARY} 26 | ${Boost_THREAD_LIBRARY} 27 | ${Boost_SYSTEM_LIBRARY} 28 | ${CMAKE_THREAD_LIBS_INIT} 29 | ) 30 | 31 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/delodd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-map-delodd) 2 | 3 | set(CDSSTRESS_MAP_DELODD_SOURCES 4 | ../../main.cpp 5 | map_delodd.cpp 6 | map_delodd_bronsonavltree.cpp 7 | map_delodd_cuckoo.cpp 8 | map_delodd_ellentree.cpp 9 | map_delodd_feldman_hashset.cpp 10 | map_delodd_michael.cpp 11 | map_delodd_skip.cpp 12 | map_delodd_split.cpp 13 | ) 14 | 15 | include_directories( 16 | ${CMAKE_CURRENT_SOURCE_DIR} 17 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 18 | ) 19 | 20 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_DELODD_SOURCES} $) 21 | target_link_libraries(${PACKAGE_NAME} 22 | ${CDS_SHARED_LIBRARY} 23 | ${GTEST_LIBRARY} 24 | ${Boost_THREAD_LIBRARY} 25 | ${Boost_SYSTEM_LIBRARY} 26 | ${CMAKE_THREAD_LIBS_INIT} 27 | ) 28 | 29 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /contfree_shared_mutex/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "safe_ptr.h" 6 | 7 | template 8 | void func(T &s_m, int &a, int &b) 9 | { 10 | for (size_t i = 0; i < 100000; ++i) 11 | { 12 | // x-lock for modification 13 | { 14 | s_m.lock(); 15 | a++; 16 | b++; 17 | s_m.unlock(); 18 | } 19 | 20 | // s-lock for reading 21 | { 22 | s_m.lock_shared(); 23 | assert(a == b); // will never happen 24 | s_m.unlock_shared(); 25 | } 26 | } 27 | } 28 | 29 | int main() { 30 | 31 | int a = 0; 32 | int b = 0; 33 | sf::contention_free_shared_mutex<> s_m; 34 | 35 | // 19 threads 36 | std::vector vec_thread(20); 37 | for (auto &i : vec_thread) i = std::move(std::thread([&]() { func(s_m, a, b); })); 38 | for (auto &i : vec_thread) i.join(); 39 | 40 | std::cout << "a = " << a << ", b = " << b << std::endl; 41 | getchar(); 42 | 43 | return 0; 44 | } -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/map/delodd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-map-delodd) 2 | 3 | set(CDSSTRESS_MAP_DELODD_SOURCES 4 | ../../main.cpp 5 | map_delodd.cpp 6 | map_delodd_bronsonavltree.cpp 7 | map_delodd_cuckoo.cpp 8 | map_delodd_ellentree.cpp 9 | map_delodd_feldman_hashset.cpp 10 | map_delodd_michael.cpp 11 | map_delodd_skip.cpp 12 | map_delodd_split.cpp 13 | ) 14 | 15 | include_directories( 16 | ${CMAKE_CURRENT_SOURCE_DIR} 17 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 18 | ) 19 | 20 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_DELODD_SOURCES} $) 21 | target_link_libraries(${PACKAGE_NAME} 22 | ${CDS_SHARED_LIBRARY} 23 | ${GTEST_LIBRARY} 24 | ${Boost_THREAD_LIBRARY} 25 | ${Boost_SYSTEM_LIBRARY} 26 | ${CMAKE_THREAD_LIBS_INIT} 27 | ) 28 | 29 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/unit/striped-map/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME unit-striped-map) 2 | 3 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCDSUNIT_ENABLE_BOOST_CONTAINER") 4 | 5 | set(CDSGTEST_STRIPED_MAP_SOURCES 6 | ../main.cpp 7 | cuckoo_map.cpp 8 | map_boost_flat_map.cpp 9 | map_boost_list.cpp 10 | map_boost_map.cpp 11 | map_boost_slist.cpp 12 | map_boost_unordered_map.cpp 13 | map_std_list.cpp 14 | map_std_map.cpp 15 | map_std_unordered_map.cpp 16 | ) 17 | 18 | include_directories( 19 | ${CMAKE_CURRENT_SOURCE_DIR} 20 | ) 21 | 22 | add_executable(${PACKAGE_NAME} ${CDSGTEST_STRIPED_MAP_SOURCES}) 23 | target_link_libraries(${PACKAGE_NAME} 24 | ${CDS_SHARED_LIBRARY} 25 | ${GTEST_LIBRARY} 26 | ${Boost_THREAD_LIBRARY} 27 | ${Boost_SYSTEM_LIBRARY} 28 | ${CMAKE_THREAD_LIBS_INIT} 29 | ) 30 | 31 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /examples/main_4.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | void thread_func(std::atomic &shared_val) 6 | { 7 | // but both are not thread-safe: error 8 | // shared_val /= 2; // thread-safe: OK 9 | // here shared_val can be changed by another thread 10 | // shared_val += 10; // thread-safe: OK 11 | 12 | // thread-safe - Sequential consistency: OK 13 | int old_local_val, new_local_val; 14 | do { 15 | old_local_val = shared_val; 16 | new_local_val = old_local_val/2 + 10; 17 | } while(!shared_val.compare_exchange_weak(old_local_val, new_local_val)); 18 | 19 | } 20 | 21 | int main() { 22 | std::atomic shared_val; 23 | shared_val = 10; 24 | 25 | // 15 = 10/2 + 10 26 | // 17 = 15/2 + 10 27 | std::thread t1( thread_func, std::ref(shared_val) ); 28 | std::thread t2( thread_func, std::ref(shared_val) ); 29 | t1.join(); 30 | t2.join(); 31 | std::cout << "shared_val = " << shared_val; 32 | 33 | return 0; 34 | } -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/set/insdel_func/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-set-insdel-func) 2 | 3 | set(CDSSTRESS_SET_INSDEL_FUNC_SOURCES 4 | ../../main.cpp 5 | set_insdel_func.cpp 6 | set_insdel_func_cuckoo.cpp 7 | set_insdel_func_ellentree.cpp 8 | set_insdel_func_feldman_hashset.cpp 9 | set_insdel_func_michael.cpp 10 | set_insdel_func_skip.cpp 11 | set_insdel_func_split.cpp 12 | set_insdel_func_striped.cpp 13 | ) 14 | 15 | include_directories( 16 | ${CMAKE_CURRENT_SOURCE_DIR} 17 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 18 | ) 19 | 20 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_SET_INSDEL_FUNC_SOURCES} $) 21 | target_link_libraries(${PACKAGE_NAME} 22 | ${CDS_SHARED_LIBRARY} 23 | ${GTEST_LIBRARY} 24 | ${Boost_THREAD_LIBRARY} 25 | ${Boost_SYSTEM_LIBRARY} 26 | ${CMAKE_THREAD_LIBS_INIT} 27 | ) 28 | 29 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/set/insdel_func/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-set-insdel-func) 2 | 3 | set(CDSSTRESS_SET_INSDEL_FUNC_SOURCES 4 | ../../main.cpp 5 | set_insdel_func.cpp 6 | set_insdel_func_cuckoo.cpp 7 | set_insdel_func_ellentree.cpp 8 | set_insdel_func_feldman_hashset.cpp 9 | set_insdel_func_michael.cpp 10 | set_insdel_func_skip.cpp 11 | set_insdel_func_split.cpp 12 | set_insdel_func_striped.cpp 13 | ) 14 | 15 | include_directories( 16 | ${CMAKE_CURRENT_SOURCE_DIR} 17 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 18 | ) 19 | 20 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_SET_INSDEL_FUNC_SOURCES} $) 21 | target_link_libraries(${PACKAGE_NAME} 22 | ${CDS_SHARED_LIBRARY} 23 | ${GTEST_LIBRARY} 24 | ${Boost_THREAD_LIBRARY} 25 | ${Boost_SYSTEM_LIBRARY} 26 | ${CMAKE_THREAD_LIBS_INIT} 27 | ) 28 | 29 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/set/insdel_find/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-set-insdelfind) 2 | 3 | set(CDSSTRESS_SET_INSDELFIND_SOURCES 4 | ../../main.cpp 5 | set_insdelfind.cpp 6 | set_insdelfind_cuckoo.cpp 7 | set_insdelfind_ellentree.cpp 8 | set_insdelfind_feldman_hashset.cpp 9 | set_insdelfind_michael.cpp 10 | set_insdelfind_skip.cpp 11 | set_insdelfind_split.cpp 12 | set_insdelfind_std.cpp 13 | set_insdelfind_striped.cpp 14 | ) 15 | 16 | include_directories( 17 | ${CMAKE_CURRENT_SOURCE_DIR} 18 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 19 | ) 20 | 21 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_SET_INSDELFIND_SOURCES} $) 22 | target_link_libraries(${PACKAGE_NAME} 23 | ${CDS_SHARED_LIBRARY} 24 | ${GTEST_LIBRARY} 25 | ${Boost_THREAD_LIBRARY} 26 | ${Boost_SYSTEM_LIBRARY} 27 | ${CMAKE_THREAD_LIBS_INIT} 28 | ) 29 | 30 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /examples/main_26.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | class spinlock_t { 6 | std::atomic_flag lock_flag; 7 | public: 8 | spinlock_t() { lock_flag.clear(); } 9 | 10 | bool try_lock() { return !lock_flag.test_and_set(std::memory_order_acquire); } 11 | void lock() { for (size_t i = 0; !try_lock(); ++i) if (i % 100 == 0) std::this_thread::yield(); } 12 | void unlock() { lock_flag.clear(std::memory_order_release); } 13 | }; 14 | 15 | int shared_value = 0; 16 | spinlock_t spinlock; 17 | 18 | void add_to_shared() { 19 | spinlock.lock(); // 1 lock - OK 20 | spinlock.lock(); // 2 lock - error!!! (already locked spinlock) 21 | shared_value += 25; 22 | spinlock.unlock(); 23 | spinlock.unlock(); 24 | } 25 | 26 | int main() { 27 | 28 | std::thread t1([&]() { add_to_shared(); }); 29 | std::thread t2([&]() { add_to_shared(); }); 30 | t1.join(); t2.join(); 31 | std::cout << "shared_value = " << shared_value 32 | << std::endl; 33 | return 0; 34 | } -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/set/insdel_find/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-set-insdelfind) 2 | 3 | set(CDSSTRESS_SET_INSDELFIND_SOURCES 4 | ../../main.cpp 5 | set_insdelfind.cpp 6 | set_insdelfind_cuckoo.cpp 7 | set_insdelfind_ellentree.cpp 8 | set_insdelfind_feldman_hashset.cpp 9 | set_insdelfind_michael.cpp 10 | set_insdelfind_skip.cpp 11 | set_insdelfind_split.cpp 12 | set_insdelfind_std.cpp 13 | set_insdelfind_striped.cpp 14 | ) 15 | 16 | include_directories( 17 | ${CMAKE_CURRENT_SOURCE_DIR} 18 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 19 | ) 20 | 21 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_SET_INSDELFIND_SOURCES} $) 22 | target_link_libraries(${PACKAGE_NAME} 23 | ${CDS_SHARED_LIBRARY} 24 | ${GTEST_LIBRARY} 25 | ${Boost_THREAD_LIBRARY} 26 | ${Boost_SYSTEM_LIBRARY} 27 | ${CMAKE_THREAD_LIBS_INIT} 28 | ) 29 | 30 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: ['https://paypal.me/alexeyab84', 'https://blockchain.coinmarketcap.com/address/bitcoin/36La9T7DoLVMrUQzm6rBDGsxutyvDzbHnp', 'https://etherscan.io/address/0x193d56BE3C65e3Fb8f48c291B17C0702e211A588#', 'https://explorer.zcha.in/accounts/t1PzwJ28Prb7Nk8fgfT3RXCr6Xtw54tgjoy'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | 14 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/find_int/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-map-find-int) 2 | 3 | set(CDSSTRESS_MAP_FIND_INT_SOURCES 4 | ../../main.cpp 5 | map_find_int.cpp 6 | map_find_int_bronsonavltree.cpp 7 | map_find_int_cuckoo.cpp 8 | map_find_int_ellentree.cpp 9 | map_find_int_feldman_hashset.cpp 10 | map_find_int_michael.cpp 11 | map_find_int_skip.cpp 12 | map_find_int_split.cpp 13 | map_find_int_std.cpp 14 | map_find_int_striped.cpp 15 | ) 16 | 17 | include_directories( 18 | ${CMAKE_CURRENT_SOURCE_DIR} 19 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 20 | ) 21 | 22 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_FIND_INT_SOURCES} $) 23 | target_link_libraries(${PACKAGE_NAME} 24 | ${CDS_SHARED_LIBRARY} 25 | ${GTEST_LIBRARY} 26 | ${Boost_THREAD_LIBRARY} 27 | ${Boost_SYSTEM_LIBRARY} 28 | ${CMAKE_THREAD_LIBS_INIT} 29 | ) 30 | 31 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/insfind_int/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-map-insfind-int) 2 | 3 | set(CDSSTRESS_MAP_INSFIND_INT_SOURCES 4 | ../../main.cpp 5 | map_insfind.cpp 6 | map_insfind_bronsonavltree.cpp 7 | map_insfind_cuckoo.cpp 8 | map_insfind_ellentree.cpp 9 | map_insfind_feldman_hashset.cpp 10 | map_insfind_michael.cpp 11 | map_insfind_skip.cpp 12 | map_insfind_split.cpp 13 | map_insfind_std.cpp 14 | map_insfind_striped.cpp 15 | ) 16 | 17 | include_directories( 18 | ${CMAKE_CURRENT_SOURCE_DIR} 19 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 20 | ) 21 | 22 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_INSFIND_INT_SOURCES} $) 23 | target_link_libraries(${PACKAGE_NAME} 24 | ${CDS_SHARED_LIBRARY} 25 | ${GTEST_LIBRARY} 26 | ${Boost_THREAD_LIBRARY} 27 | ${Boost_SYSTEM_LIBRARY} 28 | ${CMAKE_THREAD_LIBS_INIT} 29 | ) 30 | 31 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/test/unit/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/deque) 2 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/list) 3 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/map) 4 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/misc) 5 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/pqueue) 6 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/queue) 7 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/intrusive-set) 8 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/set) 9 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/striped-map) 10 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/striped-set) 11 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/stack) 12 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tree) 13 | 14 | add_custom_target(unit-all 15 | DEPENDS 16 | unit-deque 17 | unit-list 18 | unit-map 19 | unit-misc 20 | unit-pqueue 21 | unit-queue 22 | unit-intrusive-set 23 | unit-set 24 | unit-striped-set 25 | unit-stack 26 | unit-tree 27 | ) 28 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/map/find_int/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-map-find-int) 2 | 3 | set(CDSSTRESS_MAP_FIND_INT_SOURCES 4 | ../../main.cpp 5 | map_find_int.cpp 6 | map_find_int_bronsonavltree.cpp 7 | map_find_int_cuckoo.cpp 8 | map_find_int_ellentree.cpp 9 | map_find_int_feldman_hashset.cpp 10 | map_find_int_michael.cpp 11 | map_find_int_skip.cpp 12 | map_find_int_split.cpp 13 | map_find_int_std.cpp 14 | map_find_int_striped.cpp 15 | ) 16 | 17 | include_directories( 18 | ${CMAKE_CURRENT_SOURCE_DIR} 19 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 20 | ) 21 | 22 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_FIND_INT_SOURCES} $) 23 | target_link_libraries(${PACKAGE_NAME} 24 | ${CDS_SHARED_LIBRARY} 25 | ${GTEST_LIBRARY} 26 | ${Boost_THREAD_LIBRARY} 27 | ${Boost_SYSTEM_LIBRARY} 28 | ${CMAKE_THREAD_LIBS_INIT} 29 | ) 30 | 31 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/map/insfind_int/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-map-insfind-int) 2 | 3 | set(CDSSTRESS_MAP_INSFIND_INT_SOURCES 4 | ../../main.cpp 5 | map_insfind.cpp 6 | map_insfind_bronsonavltree.cpp 7 | map_insfind_cuckoo.cpp 8 | map_insfind_ellentree.cpp 9 | map_insfind_feldman_hashset.cpp 10 | map_insfind_michael.cpp 11 | map_insfind_skip.cpp 12 | map_insfind_split.cpp 13 | map_insfind_std.cpp 14 | map_insfind_striped.cpp 15 | ) 16 | 17 | include_directories( 18 | ${CMAKE_CURRENT_SOURCE_DIR} 19 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 20 | ) 21 | 22 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_INSFIND_INT_SOURCES} $) 23 | target_link_libraries(${PACKAGE_NAME} 24 | ${CDS_SHARED_LIBRARY} 25 | ${GTEST_LIBRARY} 26 | ${Boost_THREAD_LIBRARY} 27 | ${Boost_SYSTEM_LIBRARY} 28 | ${CMAKE_THREAD_LIBS_INIT} 29 | ) 30 | 31 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/insdel_func/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-map-insdel-func) 2 | 3 | set(CDSSTRESS_MAP_INSDEL_FUNC_SOURCES 4 | ../../main.cpp 5 | map_insdel_func.cpp 6 | map_insdel_func_bronsonavltree.cpp 7 | map_insdel_func_cuckoo.cpp 8 | map_insdel_func_ellentree.cpp 9 | map_insdel_func_feldman_hashset.cpp 10 | map_insdel_func_michael.cpp 11 | map_insdel_func_skip.cpp 12 | map_insdel_func_split.cpp 13 | map_insdel_func_striped.cpp 14 | ) 15 | 16 | include_directories( 17 | ${CMAKE_CURRENT_SOURCE_DIR} 18 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 19 | ) 20 | 21 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_INSDEL_FUNC_SOURCES} $) 22 | target_link_libraries(${PACKAGE_NAME} 23 | ${CDS_SHARED_LIBRARY} 24 | ${GTEST_LIBRARY} 25 | ${Boost_THREAD_LIBRARY} 26 | ${Boost_SYSTEM_LIBRARY} 27 | ${CMAKE_THREAD_LIBS_INIT} 28 | ) 29 | 30 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/unit/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/deque) 2 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/list) 3 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/map) 4 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/misc) 5 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/pqueue) 6 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/queue) 7 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/intrusive-set) 8 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/set) 9 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/striped-map) 10 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/striped-set) 11 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/stack) 12 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tree) 13 | 14 | add_custom_target(unit-all 15 | DEPENDS 16 | unit-deque 17 | unit-list 18 | unit-map 19 | unit-misc 20 | unit-pqueue 21 | unit-queue 22 | unit-intrusive-set 23 | unit-set 24 | unit-striped-set 25 | unit-stack 26 | unit-tree 27 | ) 28 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/data/split.pl: -------------------------------------------------------------------------------- 1 | #!/bin/perl 2 | 3 | my %words ; 4 | 5 | my $input_file = shift; 6 | my $output_file = shift; 7 | 8 | open( my $f, $input_file ) or die "Cannot open input file $input_file"; 9 | binmode $f ; 10 | 11 | my $text = '' ; 12 | $text .= $_ while (<$f>) ; 13 | close $f ; 14 | 15 | my @a = split /[^\w'-]/, $text ; 16 | foreach my $w (@a) { 17 | $words{$w} += 1 if $w ; 18 | } 19 | for (my $j = 1; $j < 30; ++$j ) { 20 | for ( my $i = 0; $i + $j - 1 < @a; $i += 1 ) { 21 | my $s = ''; 22 | for ( my $k = 0; $k < $j; ++$k ) { 23 | $s .= ' '.$a[$i+$k]; 24 | } 25 | $s =~ /\s*(\S.+\S)\s*/; 26 | $s = $1 ; 27 | $s =~ s/\s\s+/ /g ; 28 | $words{$s} += 1 ; 29 | } 30 | } 31 | 32 | open (my $dst, ">$output_file") or die "Cannot open output file $output_file"; 33 | binmode $dst ; 34 | 35 | my $nCount = 0 ; 36 | $nCount++ foreach (keys %words) ; 37 | print $dst $nCount, "\n" ; 38 | 39 | print "Generate test dictionary $output_file ...\n" ; 40 | print $dst $_, "\n" foreach (keys %words) ; 41 | 42 | close $dst ; 43 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/map/insdel_func/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-map-insdel-func) 2 | 3 | set(CDSSTRESS_MAP_INSDEL_FUNC_SOURCES 4 | ../../main.cpp 5 | map_insdel_func.cpp 6 | map_insdel_func_bronsonavltree.cpp 7 | map_insdel_func_cuckoo.cpp 8 | map_insdel_func_ellentree.cpp 9 | map_insdel_func_feldman_hashset.cpp 10 | map_insdel_func_michael.cpp 11 | map_insdel_func_skip.cpp 12 | map_insdel_func_split.cpp 13 | map_insdel_func_striped.cpp 14 | ) 15 | 16 | include_directories( 17 | ${CMAKE_CURRENT_SOURCE_DIR} 18 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 19 | ) 20 | 21 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_INSDEL_FUNC_SOURCES} $) 22 | target_link_libraries(${PACKAGE_NAME} 23 | ${CDS_SHARED_LIBRARY} 24 | ${GTEST_LIBRARY} 25 | ${Boost_THREAD_LIBRARY} 26 | ${Boost_SYSTEM_LIBRARY} 27 | ${CMAKE_THREAD_LIBS_INIT} 28 | ) 29 | 30 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/data/split.pl: -------------------------------------------------------------------------------- 1 | #!/bin/perl 2 | 3 | my %words ; 4 | 5 | my $input_file = shift; 6 | my $output_file = shift; 7 | 8 | open( my $f, $input_file ) or die "Cannot open input file $input_file"; 9 | binmode $f ; 10 | 11 | my $text = '' ; 12 | $text .= $_ while (<$f>) ; 13 | close $f ; 14 | 15 | my @a = split /[^\w'-]/, $text ; 16 | foreach my $w (@a) { 17 | $words{$w} += 1 if $w ; 18 | } 19 | for (my $j = 1; $j < 30; ++$j ) { 20 | for ( my $i = 0; $i + $j - 1 < @a; $i += 1 ) { 21 | my $s = ''; 22 | for ( my $k = 0; $k < $j; ++$k ) { 23 | $s .= ' '.$a[$i+$k]; 24 | } 25 | $s =~ /\s*(\S.+\S)\s*/; 26 | $s = $1 ; 27 | $s =~ s/\s\s+/ /g ; 28 | $words{$s} += 1 ; 29 | } 30 | } 31 | 32 | open (my $dst, ">$output_file") or die "Cannot open output file $output_file"; 33 | binmode $dst ; 34 | 35 | my $nCount = 0 ; 36 | $nCount++ foreach (keys %words) ; 37 | print $dst $nCount, "\n" ; 38 | 39 | print "Generate test dictionary $output_file ...\n" ; 40 | print $dst $_, "\n" foreach (keys %words) ; 41 | 42 | close $dst ; 43 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/insdel_int/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-map-insdel-int) 2 | 3 | set(CDSSTRESS_MAP_INSDEL_INT_SOURCES 4 | ../../main.cpp 5 | map_insdel_int.cpp 6 | map_insdel_int_bronsonavltree.cpp 7 | map_insdel_int_cuckoo.cpp 8 | map_insdel_int_ellentree.cpp 9 | map_insdel_int_feldman_hashset.cpp 10 | map_insdel_int_michael.cpp 11 | map_insdel_int_skip.cpp 12 | map_insdel_int_split.cpp 13 | map_insdel_int_std.cpp 14 | map_insdel_int_striped.cpp 15 | ) 16 | 17 | include_directories( 18 | ${CMAKE_CURRENT_SOURCE_DIR} 19 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 20 | ) 21 | 22 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_INSDEL_INT_SOURCES} $) 23 | target_link_libraries(${PACKAGE_NAME} 24 | ${CDS_SHARED_LIBRARY} 25 | ${GTEST_LIBRARY} 26 | ${Boost_THREAD_LIBRARY} 27 | ${Boost_SYSTEM_LIBRARY} 28 | ${CMAKE_THREAD_LIBS_INIT} 29 | ) 30 | 31 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/insdelfind/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-map-insdelfind) 2 | 3 | set(CDSSTRESS_MAP_INSDELFIND_SOURCES 4 | ../../main.cpp 5 | map_insdelfind.cpp 6 | map_insdelfind_bronsonavltree.cpp 7 | map_insdelfind_cuckoo.cpp 8 | map_insdelfind_ellentree.cpp 9 | map_insdelfind_feldman_hashset.cpp 10 | map_insdelfind_michael.cpp 11 | map_insdelfind_skip.cpp 12 | map_insdelfind_split.cpp 13 | map_insdelfind_std.cpp 14 | map_insdelfind_striped.cpp 15 | ) 16 | 17 | include_directories( 18 | ${CMAKE_CURRENT_SOURCE_DIR} 19 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 20 | ) 21 | 22 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_INSDELFIND_SOURCES} $) 23 | target_link_libraries(${PACKAGE_NAME} 24 | ${CDS_SHARED_LIBRARY} 25 | ${GTEST_LIBRARY} 26 | ${Boost_THREAD_LIBRARY} 27 | ${Boost_SYSTEM_LIBRARY} 28 | ${CMAKE_THREAD_LIBS_INIT} 29 | ) 30 | 31 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/set/insdel_string/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-set-insdel-string) 2 | 3 | set(CDSSTRESS_SET_INSDEL_STRING_SOURCES 4 | ../../main.cpp 5 | set_insdel_string.cpp 6 | set_insdel_string_cuckoo.cpp 7 | set_insdel_string_ellentree.cpp 8 | set_insdel_string_feldman_hashset.cpp 9 | set_insdel_string_michael.cpp 10 | set_insdel_string_skip.cpp 11 | set_insdel_string_split.cpp 12 | set_insdel_string_std.cpp 13 | set_insdel_string_striped.cpp 14 | ) 15 | 16 | include_directories( 17 | ${CMAKE_CURRENT_SOURCE_DIR} 18 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 19 | ) 20 | 21 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_SET_INSDEL_STRING_SOURCES} $) 22 | target_link_libraries(${PACKAGE_NAME} 23 | ${CDS_SHARED_LIBRARY} 24 | ${GTEST_LIBRARY} 25 | ${Boost_THREAD_LIBRARY} 26 | ${Boost_SYSTEM_LIBRARY} 27 | ${CMAKE_THREAD_LIBS_INIT} 28 | ) 29 | 30 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/set/insdel_string/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-set-insdel-string) 2 | 3 | set(CDSSTRESS_SET_INSDEL_STRING_SOURCES 4 | ../../main.cpp 5 | set_insdel_string.cpp 6 | set_insdel_string_cuckoo.cpp 7 | set_insdel_string_ellentree.cpp 8 | set_insdel_string_feldman_hashset.cpp 9 | set_insdel_string_michael.cpp 10 | set_insdel_string_skip.cpp 11 | set_insdel_string_split.cpp 12 | set_insdel_string_std.cpp 13 | set_insdel_string_striped.cpp 14 | ) 15 | 16 | include_directories( 17 | ${CMAKE_CURRENT_SOURCE_DIR} 18 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 19 | ) 20 | 21 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_SET_INSDEL_STRING_SOURCES} $) 22 | target_link_libraries(${PACKAGE_NAME} 23 | ${CDS_SHARED_LIBRARY} 24 | ${GTEST_LIBRARY} 25 | ${Boost_THREAD_LIBRARY} 26 | ${Boost_SYSTEM_LIBRARY} 27 | ${CMAKE_THREAD_LIBS_INIT} 28 | ) 29 | 30 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/map/insdel_int/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-map-insdel-int) 2 | 3 | set(CDSSTRESS_MAP_INSDEL_INT_SOURCES 4 | ../../main.cpp 5 | map_insdel_int.cpp 6 | map_insdel_int_bronsonavltree.cpp 7 | map_insdel_int_cuckoo.cpp 8 | map_insdel_int_ellentree.cpp 9 | map_insdel_int_feldman_hashset.cpp 10 | map_insdel_int_michael.cpp 11 | map_insdel_int_skip.cpp 12 | map_insdel_int_split.cpp 13 | map_insdel_int_std.cpp 14 | map_insdel_int_striped.cpp 15 | ) 16 | 17 | include_directories( 18 | ${CMAKE_CURRENT_SOURCE_DIR} 19 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 20 | ) 21 | 22 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_INSDEL_INT_SOURCES} $) 23 | target_link_libraries(${PACKAGE_NAME} 24 | ${CDS_SHARED_LIBRARY} 25 | ${GTEST_LIBRARY} 26 | ${Boost_THREAD_LIBRARY} 27 | ${Boost_SYSTEM_LIBRARY} 28 | ${CMAKE_THREAD_LIBS_INIT} 29 | ) 30 | 31 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/map/insdelfind/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-map-insdelfind) 2 | 3 | set(CDSSTRESS_MAP_INSDELFIND_SOURCES 4 | ../../main.cpp 5 | map_insdelfind.cpp 6 | map_insdelfind_bronsonavltree.cpp 7 | map_insdelfind_cuckoo.cpp 8 | map_insdelfind_ellentree.cpp 9 | map_insdelfind_feldman_hashset.cpp 10 | map_insdelfind_michael.cpp 11 | map_insdelfind_skip.cpp 12 | map_insdelfind_split.cpp 13 | map_insdelfind_std.cpp 14 | map_insdelfind_striped.cpp 15 | ) 16 | 17 | include_directories( 18 | ${CMAKE_CURRENT_SOURCE_DIR} 19 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 20 | ) 21 | 22 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_INSDELFIND_SOURCES} $) 23 | target_link_libraries(${PACKAGE_NAME} 24 | ${CDS_SHARED_LIBRARY} 25 | ${GTEST_LIBRARY} 26 | ${Boost_THREAD_LIBRARY} 27 | ${Boost_SYSTEM_LIBRARY} 28 | ${CMAKE_THREAD_LIBS_INIT} 29 | ) 30 | 31 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/find_string/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-map-find-string) 2 | 3 | set(CDSSTRESS_MAP_FIND_STRING_SOURCES 4 | ../../main.cpp 5 | map_find_string.cpp 6 | map_find_string_bronsonavltree.cpp 7 | map_find_string_cuckoo.cpp 8 | map_find_string_ellentree.cpp 9 | map_find_string_feldman_hashset.cpp 10 | map_find_string_michael.cpp 11 | map_find_string_skip.cpp 12 | map_find_string_split.cpp 13 | map_find_string_std.cpp 14 | map_find_string_striped.cpp 15 | ) 16 | 17 | include_directories( 18 | ${CMAKE_CURRENT_SOURCE_DIR} 19 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 20 | ) 21 | 22 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_FIND_STRING_SOURCES} $) 23 | target_link_libraries(${PACKAGE_NAME} 24 | ${CDS_SHARED_LIBRARY} 25 | ${GTEST_LIBRARY} 26 | ${Boost_THREAD_LIBRARY} 27 | ${Boost_SYSTEM_LIBRARY} 28 | ${CMAKE_THREAD_LIBS_INIT} 29 | ) 30 | 31 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/map/find_string/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-map-find-string) 2 | 3 | set(CDSSTRESS_MAP_FIND_STRING_SOURCES 4 | ../../main.cpp 5 | map_find_string.cpp 6 | map_find_string_bronsonavltree.cpp 7 | map_find_string_cuckoo.cpp 8 | map_find_string_ellentree.cpp 9 | map_find_string_feldman_hashset.cpp 10 | map_find_string_michael.cpp 11 | map_find_string_skip.cpp 12 | map_find_string_split.cpp 13 | map_find_string_std.cpp 14 | map_find_string_striped.cpp 15 | ) 16 | 17 | include_directories( 18 | ${CMAKE_CURRENT_SOURCE_DIR} 19 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 20 | ) 21 | 22 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_FIND_STRING_SOURCES} $) 23 | target_link_libraries(${PACKAGE_NAME} 24 | ${CDS_SHARED_LIBRARY} 25 | ${GTEST_LIBRARY} 26 | ${Boost_THREAD_LIBRARY} 27 | ${Boost_SYSTEM_LIBRARY} 28 | ${CMAKE_THREAD_LIBS_INIT} 29 | ) 30 | 31 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/insdel_item_int/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-map-insdel-item-int) 2 | 3 | set(CDSSTRESS_MAP_INSDEL_ITEM_INT_SOURCES 4 | ../../main.cpp 5 | map_insdel_item_int.cpp 6 | map_insdel_item_int_bronsonavltree.cpp 7 | map_insdel_item_int_cuckoo.cpp 8 | map_insdel_item_int_ellentree.cpp 9 | map_insdel_item_int_feldman_hashset.cpp 10 | map_insdel_item_int_michael.cpp 11 | map_insdel_item_int_skip.cpp 12 | map_insdel_item_int_split.cpp 13 | map_insdel_item_int_striped.cpp 14 | ) 15 | 16 | include_directories( 17 | ${CMAKE_CURRENT_SOURCE_DIR} 18 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 19 | ) 20 | 21 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_INSDEL_ITEM_INT_SOURCES} $) 22 | target_link_libraries(${PACKAGE_NAME} 23 | ${CDS_SHARED_LIBRARY} 24 | ${GTEST_LIBRARY} 25 | ${Boost_THREAD_LIBRARY} 26 | ${Boost_SYSTEM_LIBRARY} 27 | ${CMAKE_THREAD_LIBS_INIT} 28 | ) 29 | 30 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/map/insdel_item_int/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-map-insdel-item-int) 2 | 3 | set(CDSSTRESS_MAP_INSDEL_ITEM_INT_SOURCES 4 | ../../main.cpp 5 | map_insdel_item_int.cpp 6 | map_insdel_item_int_bronsonavltree.cpp 7 | map_insdel_item_int_cuckoo.cpp 8 | map_insdel_item_int_ellentree.cpp 9 | map_insdel_item_int_feldman_hashset.cpp 10 | map_insdel_item_int_michael.cpp 11 | map_insdel_item_int_skip.cpp 12 | map_insdel_item_int_split.cpp 13 | map_insdel_item_int_striped.cpp 14 | ) 15 | 16 | include_directories( 17 | ${CMAKE_CURRENT_SOURCE_DIR} 18 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 19 | ) 20 | 21 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_INSDEL_ITEM_INT_SOURCES} $) 22 | target_link_libraries(${PACKAGE_NAME} 23 | ${CDS_SHARED_LIBRARY} 24 | ${GTEST_LIBRARY} 25 | ${Boost_THREAD_LIBRARY} 26 | ${Boost_SYSTEM_LIBRARY} 27 | ${CMAKE_THREAD_LIBS_INIT} 28 | ) 29 | 30 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/insdel_string/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-map-insdel-string) 2 | 3 | set(CDSSTRESS_MAP_INSDEL_STRING_SOURCES 4 | ../../main.cpp 5 | map_insdel_string.cpp 6 | map_insdel_string_bronsonavltree.cpp 7 | map_insdel_string_cuckoo.cpp 8 | map_insdel_string_ellentree.cpp 9 | map_insdel_string_feldman_hashset.cpp 10 | map_insdel_string_michael.cpp 11 | map_insdel_string_skip.cpp 12 | map_insdel_string_split.cpp 13 | map_insdel_string_std.cpp 14 | map_insdel_string_striped.cpp 15 | ) 16 | 17 | include_directories( 18 | ${CMAKE_CURRENT_SOURCE_DIR} 19 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 20 | ) 21 | 22 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_INSDEL_STRING_SOURCES} $) 23 | target_link_libraries(${PACKAGE_NAME} 24 | ${CDS_SHARED_LIBRARY} 25 | ${GTEST_LIBRARY} 26 | ${Boost_THREAD_LIBRARY} 27 | ${Boost_SYSTEM_LIBRARY} 28 | ${CMAKE_THREAD_LIBS_INIT} 29 | ) 30 | 31 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/map/insdel_string/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME stress-map-insdel-string) 2 | 3 | set(CDSSTRESS_MAP_INSDEL_STRING_SOURCES 4 | ../../main.cpp 5 | map_insdel_string.cpp 6 | map_insdel_string_bronsonavltree.cpp 7 | map_insdel_string_cuckoo.cpp 8 | map_insdel_string_ellentree.cpp 9 | map_insdel_string_feldman_hashset.cpp 10 | map_insdel_string_michael.cpp 11 | map_insdel_string_skip.cpp 12 | map_insdel_string_split.cpp 13 | map_insdel_string_std.cpp 14 | map_insdel_string_striped.cpp 15 | ) 16 | 17 | include_directories( 18 | ${CMAKE_CURRENT_SOURCE_DIR} 19 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 20 | ) 21 | 22 | add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_INSDEL_STRING_SOURCES} $) 23 | target_link_libraries(${PACKAGE_NAME} 24 | ${CDS_SHARED_LIBRARY} 25 | ${GTEST_LIBRARY} 26 | ${Boost_THREAD_LIBRARY} 27 | ${Boost_SYSTEM_LIBRARY} 28 | ${CMAKE_THREAD_LIBS_INIT} 29 | ) 30 | 31 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/projects/Win/vc14/gtest-deque.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/projects/Win/vc14/gtest-deque.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCDSUNIT_USE_URCU") 3 | 4 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/delodd) 5 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/find_int) 6 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/find_string) 7 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_func) 8 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_int) 9 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_string) 10 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_item_int) 11 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdelfind) 12 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insfind_int) 13 | #add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_find) 14 | #add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_func) 15 | #add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_string) 16 | 17 | add_custom_target( stress-map 18 | DEPENDS 19 | stress-map-delodd 20 | stress-map-find-int 21 | stress-map-find-string 22 | stress-map-insdel-func 23 | stress-map-insdel-int 24 | stress-map-insdel-string 25 | stress-map-insdel-item-int 26 | stress-map-insdelfind 27 | stress-map-insfind-int 28 | ) 29 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/map/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCDSUNIT_USE_URCU") 3 | 4 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/delodd) 5 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/find_int) 6 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/find_string) 7 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_func) 8 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_int) 9 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_string) 10 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_item_int) 11 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdelfind) 12 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insfind_int) 13 | #add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_find) 14 | #add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_func) 15 | #add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_string) 16 | 17 | add_custom_target( stress-map 18 | DEPENDS 19 | stress-map-delodd 20 | stress-map-find-int 21 | stress-map-find-string 22 | stress-map-insdel-func 23 | stress-map-insdel-int 24 | stress-map-insdel-string 25 | stress-map-insdel-item-int 26 | stress-map-insdelfind 27 | stress-map-insfind-int 28 | ) 29 | -------------------------------------------------------------------------------- /examples/main_6.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | struct T { int price, count, total; }; 7 | 8 | void thread_func(std::map &shared_map, std::mutex &mtx) 9 | { 10 | std::lock_guard lock(mtx); // RAII (destructor will unlock mutex) 11 | 12 | auto it = shared_map.find(1); 13 | if(it != shared_map.end()) 14 | { 15 | T &ref_val = it->second; 16 | ref_val.count = ref_val.count + 1; 17 | ref_val.total = ref_val.price * ref_val.count; 18 | } 19 | else { 20 | shared_map.insert( std::make_pair(1, T({10,5,50})) ); 21 | } 22 | } // mutex will be unlocked automatically 23 | 24 | int main() { 25 | std::mutex mtx; 26 | std::map shared_map; 27 | 28 | std::thread t1( thread_func, std::ref(shared_map), std::ref(mtx) ); 29 | std::thread t2( thread_func, std::ref(shared_map), std::ref(mtx) ); 30 | std::thread t3( thread_func, std::ref(shared_map), std::ref(mtx) ); 31 | t1.join(); 32 | t2.join(); 33 | t3.join(); 34 | 35 | T local_result = shared_map[1]; 36 | std::cout << local_result.price << ", " << local_result.count << ", " 37 | << local_result.total; 38 | 39 | return 0; 40 | } -------------------------------------------------------------------------------- /examples/main_5.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | struct T { 6 | int price, count, total; 7 | }; 8 | 9 | void thread_func(std::atomic &shared_val) 10 | { 11 | 12 | // thread-safe - Sequential consistency: OK 13 | T old_local_val, new_local_val; 14 | do { 15 | old_local_val = shared_val; // lock-based operator= inside std::atomic 16 | // all required calculations 17 | new_local_val = old_local_val; 18 | new_local_val.count = new_local_val.count + 1; 19 | new_local_val.total = new_local_val.price * new_local_val.count; 20 | 21 | // lock-based function compare_exchange_weak() inside std::atomic 22 | } while(!shared_val.compare_exchange_weak(old_local_val, new_local_val)); 23 | 24 | } 25 | 26 | int main() { 27 | std::atomic shared_val; 28 | shared_val = {10,5,50}; 29 | std::cout << std::boolalpha << "shared_val.is_lock_free() = " << shared_val.is_lock_free() << std::endl; 30 | 31 | std::thread t1( thread_func, std::ref(shared_val) ); 32 | std::thread t2( thread_func, std::ref(shared_val) ); 33 | t1.join(); 34 | t2.join(); 35 | 36 | T local_result = shared_val; 37 | std::cout << local_result.price << ", " << local_result.count << ", " 38 | << local_result.total; 39 | 40 | return 0; 41 | } -------------------------------------------------------------------------------- /CDS_test/libcds/.travis.yml: -------------------------------------------------------------------------------- 1 | 2 | language: cpp 3 | compiler: g++ 4 | # - gcc 5 | # - clang 6 | 7 | before_install: 8 | - export LIBCDS_BUILD_DIR=`pwd` 9 | - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test 10 | - sudo apt-get update -qq 11 | - export GCC_VERSION=4.9 12 | - export BOOST_VERSION=57 13 | 14 | install: 15 | - sudo apt-get install -qq g++-${GCC_VERSION} 16 | - export CXX="g++-${GCC_VERSION}" 17 | - wget -O boost_1_${BOOST_VERSION}_0.tar.bz2 http://sourceforge.net/projects/boost/files/boost/1.${BOOST_VERSION}.0/boost_1_${BOOST_VERSION}_0.tar.bz2/download 18 | - tar xjf boost_1_${BOOST_VERSION}_0.tar.bz2 19 | - cd boost_1_${BOOST_VERSION}_0 20 | - ./bootstrap.sh 21 | - ./b2 --with-thread --with-atomic --with-date_time --with-system --with-timer --stagedir=stage64 --toolset=gcc-${GCC_VERSION} address-model=64 22 | - cd .. 23 | 24 | before_script: cd ./build 25 | 26 | script: ./build.sh -b 64 -j 2 -x ${CXX} -z '-Wall -Wextra -pedantic -Wno-unused-local-typedefs' --with-boost ../boost_1_${BOOST_VERSION}_0 -t test_hdr 27 | 28 | #after_success: 29 | 30 | #after_failure: 31 | 32 | after_script: cd .. 33 | 34 | # blacklist 35 | #branches: 36 | # except: 37 | # - integration 38 | 39 | # whitelist 40 | branches: 41 | only: 42 | - master 43 | - dev 44 | - integration 45 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/.travis.yml: -------------------------------------------------------------------------------- 1 | 2 | language: cpp 3 | compiler: g++ 4 | # - gcc 5 | # - clang 6 | 7 | before_install: 8 | - export LIBCDS_BUILD_DIR=`pwd` 9 | - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test 10 | - sudo apt-get update -qq 11 | - export GCC_VERSION=4.9 12 | - export BOOST_VERSION=57 13 | 14 | install: 15 | - sudo apt-get install -qq g++-${GCC_VERSION} 16 | - export CXX="g++-${GCC_VERSION}" 17 | - wget -O boost_1_${BOOST_VERSION}_0.tar.bz2 http://sourceforge.net/projects/boost/files/boost/1.${BOOST_VERSION}.0/boost_1_${BOOST_VERSION}_0.tar.bz2/download 18 | - tar xjf boost_1_${BOOST_VERSION}_0.tar.bz2 19 | - cd boost_1_${BOOST_VERSION}_0 20 | - ./bootstrap.sh 21 | - ./b2 --with-thread --with-atomic --with-date_time --with-system --with-timer --stagedir=stage64 --toolset=gcc-${GCC_VERSION} address-model=64 22 | - cd .. 23 | 24 | before_script: cd ./build 25 | 26 | script: ./build.sh -b 64 -j 2 -x ${CXX} -z '-Wall -Wextra -pedantic -Wno-unused-local-typedefs' --with-boost ../boost_1_${BOOST_VERSION}_0 -t test_hdr 27 | 28 | #after_success: 29 | 30 | #after_failure: 31 | 32 | after_script: cd .. 33 | 34 | # blacklist 35 | #branches: 36 | # except: 37 | # - integration 38 | 39 | # whitelist 40 | branches: 41 | only: 42 | - master 43 | - dev 44 | - integration 45 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/unit/striped-set/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME unit-striped-set) 2 | 3 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof -DCDSUNIT_ENABLE_BOOST_CONTAINER") 4 | 5 | set(CDSGTEST_SET_SOURCES 6 | ../main.cpp 7 | cuckoo_set.cpp 8 | intrusive_boost_avl_set.cpp 9 | intrusive_boost_list.cpp 10 | intrusive_boost_set.cpp 11 | intrusive_boost_sg_set.cpp 12 | intrusive_boost_slist.cpp 13 | intrusive_boost_splay_set.cpp 14 | intrusive_boost_treap_set.cpp 15 | intrusive_boost_unordered_set.cpp 16 | intrusive_cuckoo_set.cpp 17 | set_boost_flatset.cpp 18 | set_boost_list.cpp 19 | set_boost_set.cpp 20 | set_boost_slist.cpp 21 | set_boost_stable_vector.cpp 22 | set_boost_unordered_set.cpp 23 | set_boost_vector.cpp 24 | set_std_list.cpp 25 | set_std_set.cpp 26 | set_std_unordered_set.cpp 27 | set_std_vector.cpp 28 | ) 29 | 30 | include_directories( 31 | ${CMAKE_CURRENT_SOURCE_DIR} 32 | ) 33 | 34 | add_executable(${PACKAGE_NAME} ${CDSGTEST_SET_SOURCES}) 35 | target_link_libraries(${PACKAGE_NAME} 36 | ${CDS_SHARED_LIBRARY} 37 | ${GTEST_LIBRARY} 38 | ${Boost_THREAD_LIBRARY} 39 | ${Boost_SYSTEM_LIBRARY} 40 | ${CMAKE_THREAD_LIBS_INIT} 41 | ) 42 | 43 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/unit/striped-set/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME unit-striped-set) 2 | 3 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof -DCDSUNIT_ENABLE_BOOST_CONTAINER") 4 | 5 | set(CDSGTEST_SET_SOURCES 6 | ../main.cpp 7 | cuckoo_set.cpp 8 | intrusive_boost_avl_set.cpp 9 | intrusive_boost_list.cpp 10 | intrusive_boost_set.cpp 11 | intrusive_boost_sg_set.cpp 12 | intrusive_boost_slist.cpp 13 | intrusive_boost_splay_set.cpp 14 | intrusive_boost_treap_set.cpp 15 | intrusive_boost_unordered_set.cpp 16 | intrusive_cuckoo_set.cpp 17 | set_boost_flatset.cpp 18 | set_boost_list.cpp 19 | set_boost_set.cpp 20 | set_boost_slist.cpp 21 | set_boost_stable_vector.cpp 22 | set_boost_unordered_set.cpp 23 | set_boost_vector.cpp 24 | set_std_list.cpp 25 | set_std_set.cpp 26 | set_std_unordered_set.cpp 27 | set_std_vector.cpp 28 | ) 29 | 30 | include_directories( 31 | ${CMAKE_CURRENT_SOURCE_DIR} 32 | ) 33 | 34 | add_executable(${PACKAGE_NAME} ${CDSGTEST_SET_SOURCES}) 35 | target_link_libraries(${PACKAGE_NAME} 36 | ${CDS_SHARED_LIBRARY} 37 | ${GTEST_LIBRARY} 38 | ${Boost_THREAD_LIBRARY} 39 | ${Boost_SYSTEM_LIBRARY} 40 | ${CMAKE_THREAD_LIBS_INIT} 41 | ) 42 | 43 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/CDS_test.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CDS_test", "CDS_test.vcxproj", "{A532CC77-0CBC-47C0-86BD-EB1BFB67880B}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {A532CC77-0CBC-47C0-86BD-EB1BFB67880B}.Debug|x64.ActiveCfg = Debug|x64 17 | {A532CC77-0CBC-47C0-86BD-EB1BFB67880B}.Debug|x64.Build.0 = Debug|x64 18 | {A532CC77-0CBC-47C0-86BD-EB1BFB67880B}.Debug|x86.ActiveCfg = Debug|Win32 19 | {A532CC77-0CBC-47C0-86BD-EB1BFB67880B}.Debug|x86.Build.0 = Debug|Win32 20 | {A532CC77-0CBC-47C0-86BD-EB1BFB67880B}.Release|x64.ActiveCfg = Release|x64 21 | {A532CC77-0CBC-47C0-86BD-EB1BFB67880B}.Release|x64.Build.0 = Release|x64 22 | {A532CC77-0CBC-47C0-86BD-EB1BFB67880B}.Release|x86.ActiveCfg = Release|Win32 23 | {A532CC77-0CBC-47C0-86BD-EB1BFB67880B}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /benchmark/benchmark.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "benchmark", "benchmark.vcxproj", "{16C7B0DF-6F35-4DED-8667-BA781214C2C3}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {16C7B0DF-6F35-4DED-8667-BA781214C2C3}.Debug|x64.ActiveCfg = Debug|x64 17 | {16C7B0DF-6F35-4DED-8667-BA781214C2C3}.Debug|x64.Build.0 = Debug|x64 18 | {16C7B0DF-6F35-4DED-8667-BA781214C2C3}.Debug|x86.ActiveCfg = Debug|Win32 19 | {16C7B0DF-6F35-4DED-8667-BA781214C2C3}.Debug|x86.Build.0 = Debug|Win32 20 | {16C7B0DF-6F35-4DED-8667-BA781214C2C3}.Release|x64.ActiveCfg = Release|x64 21 | {16C7B0DF-6F35-4DED-8667-BA781214C2C3}.Release|x64.Build.0 = Release|x64 22 | {16C7B0DF-6F35-4DED-8667-BA781214C2C3}.Release|x86.ActiveCfg = Release|Win32 23 | {16C7B0DF-6F35-4DED-8667-BA781214C2C3}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /CDS_test/libcds/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Maxim Khizhinsky 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | -------------------------------------------------------------------------------- /Real_app_bench/Real_app_bench.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Real_app_bench", "Real_app_bench.vcxproj", "{3C009734-BBFC-4A0B-A2B9-2E405CA1FED5}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {3C009734-BBFC-4A0B-A2B9-2E405CA1FED5}.Debug|x64.ActiveCfg = Debug|x64 17 | {3C009734-BBFC-4A0B-A2B9-2E405CA1FED5}.Debug|x64.Build.0 = Debug|x64 18 | {3C009734-BBFC-4A0B-A2B9-2E405CA1FED5}.Debug|x86.ActiveCfg = Debug|Win32 19 | {3C009734-BBFC-4A0B-A2B9-2E405CA1FED5}.Debug|x86.Build.0 = Debug|Win32 20 | {3C009734-BBFC-4A0B-A2B9-2E405CA1FED5}.Release|x64.ActiveCfg = Release|x64 21 | {3C009734-BBFC-4A0B-A2B9-2E405CA1FED5}.Release|x64.Build.0 = Release|x64 22 | {3C009734-BBFC-4A0B-A2B9-2E405CA1FED5}.Release|x86.ActiveCfg = Release|Win32 23 | {3C009734-BBFC-4A0B-A2B9-2E405CA1FED5}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Maxim Khizhinsky 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | -------------------------------------------------------------------------------- /bench_contfree/bench_contfree.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bench_contfree", "bench_contfree.vcxproj", "{70F5E67A-1DC9-45FB-9833-F2ECC383B006}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {70F5E67A-1DC9-45FB-9833-F2ECC383B006}.Debug|x64.ActiveCfg = Debug|x64 17 | {70F5E67A-1DC9-45FB-9833-F2ECC383B006}.Debug|x64.Build.0 = Debug|x64 18 | {70F5E67A-1DC9-45FB-9833-F2ECC383B006}.Debug|x86.ActiveCfg = Debug|Win32 19 | {70F5E67A-1DC9-45FB-9833-F2ECC383B006}.Debug|x86.Build.0 = Debug|Win32 20 | {70F5E67A-1DC9-45FB-9833-F2ECC383B006}.Release|x64.ActiveCfg = Release|x64 21 | {70F5E67A-1DC9-45FB-9833-F2ECC383B006}.Release|x64.Build.0 = Release|x64 22 | {70F5E67A-1DC9-45FB-9833-F2ECC383B006}.Release|x86.ActiveCfg = Release|Win32 23 | {70F5E67A-1DC9-45FB-9833-F2ECC383B006}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/unit/queue/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME unit-queue) 2 | 3 | set(CDSGTEST_QUEUE_SOURCES 4 | ../main.cpp 5 | basket_queue_hp.cpp 6 | basket_queue_dhp.cpp 7 | fcqueue.cpp 8 | moirqueue_hp.cpp 9 | moirqueue_dhp.cpp 10 | msqueue_hp.cpp 11 | msqueue_dhp.cpp 12 | optimistic_queue_hp.cpp 13 | optimistic_queue_dhp.cpp 14 | rwqueue.cpp 15 | segmented_queue_hp.cpp 16 | segmented_queue_dhp.cpp 17 | tsigas_queue.cpp 18 | vyukov_mpmc_queue.cpp 19 | intrusive_basket_queue_hp.cpp 20 | intrusive_basket_queue_dhp.cpp 21 | intrusive_fcqueue.cpp 22 | intrusive_msqueue_hp.cpp 23 | intrusive_msqueue_dhp.cpp 24 | intrusive_moirqueue_hp.cpp 25 | intrusive_moirqueue_dhp.cpp 26 | intrusive_optqueue_hp.cpp 27 | intrusive_optqueue_dhp.cpp 28 | intrusive_segmented_queue_hp.cpp 29 | intrusive_segmented_queue_dhp.cpp 30 | intrusive_tsigas_queue.cpp 31 | intrusive_vyukov_queue.cpp 32 | ) 33 | 34 | include_directories( 35 | ${CMAKE_CURRENT_SOURCE_DIR} 36 | ) 37 | 38 | add_executable(${PACKAGE_NAME} ${CDSGTEST_QUEUE_SOURCES}) 39 | target_link_libraries(${PACKAGE_NAME} 40 | ${CDS_SHARED_LIBRARY} 41 | ${GTEST_LIBRARY} 42 | ${Boost_THREAD_LIBRARY} 43 | ${Boost_SYSTEM_LIBRARY} 44 | ${CMAKE_THREAD_LIBS_INIT} 45 | ) 46 | 47 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/unit/queue/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME unit-queue) 2 | 3 | set(CDSGTEST_QUEUE_SOURCES 4 | ../main.cpp 5 | basket_queue_hp.cpp 6 | basket_queue_dhp.cpp 7 | fcqueue.cpp 8 | moirqueue_hp.cpp 9 | moirqueue_dhp.cpp 10 | msqueue_hp.cpp 11 | msqueue_dhp.cpp 12 | optimistic_queue_hp.cpp 13 | optimistic_queue_dhp.cpp 14 | rwqueue.cpp 15 | segmented_queue_hp.cpp 16 | segmented_queue_dhp.cpp 17 | tsigas_queue.cpp 18 | vyukov_mpmc_queue.cpp 19 | intrusive_basket_queue_hp.cpp 20 | intrusive_basket_queue_dhp.cpp 21 | intrusive_fcqueue.cpp 22 | intrusive_msqueue_hp.cpp 23 | intrusive_msqueue_dhp.cpp 24 | intrusive_moirqueue_hp.cpp 25 | intrusive_moirqueue_dhp.cpp 26 | intrusive_optqueue_hp.cpp 27 | intrusive_optqueue_dhp.cpp 28 | intrusive_segmented_queue_hp.cpp 29 | intrusive_segmented_queue_dhp.cpp 30 | intrusive_tsigas_queue.cpp 31 | intrusive_vyukov_queue.cpp 32 | ) 33 | 34 | include_directories( 35 | ${CMAKE_CURRENT_SOURCE_DIR} 36 | ) 37 | 38 | add_executable(${PACKAGE_NAME} ${CDSGTEST_QUEUE_SOURCES}) 39 | target_link_libraries(${PACKAGE_NAME} 40 | ${CDS_SHARED_LIBRARY} 41 | ${GTEST_LIBRARY} 42 | ${Boost_THREAD_LIBRARY} 43 | ${Boost_SYSTEM_LIBRARY} 44 | ${CMAKE_THREAD_LIBS_INIT} 45 | ) 46 | 47 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /any_object_threadsafe/any_object_threadsafe.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "any_object_threadsafe", "any_object_threadsafe.vcxproj", "{FBF0ED2C-E8EB-4B73-B688-0120DBC9E216}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {FBF0ED2C-E8EB-4B73-B688-0120DBC9E216}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {FBF0ED2C-E8EB-4B73-B688-0120DBC9E216}.Debug|Win32.Build.0 = Debug|Win32 18 | {FBF0ED2C-E8EB-4B73-B688-0120DBC9E216}.Debug|x64.ActiveCfg = Debug|x64 19 | {FBF0ED2C-E8EB-4B73-B688-0120DBC9E216}.Debug|x64.Build.0 = Debug|x64 20 | {FBF0ED2C-E8EB-4B73-B688-0120DBC9E216}.Release|Win32.ActiveCfg = Release|Win32 21 | {FBF0ED2C-E8EB-4B73-B688-0120DBC9E216}.Release|Win32.Build.0 = Release|Win32 22 | {FBF0ED2C-E8EB-4B73-B688-0120DBC9E216}.Release|x64.ActiveCfg = Release|x64 23 | {FBF0ED2C-E8EB-4B73-B688-0120DBC9E216}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /contfree_shared_mutex/contfree_shared_mutex.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "contfree_shared_mutex", "contfree_shared_mutex.vcxproj", "{5A9BA9B3-D7AA-41C2-A7AE-FEC100560D8C}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {5A9BA9B3-D7AA-41C2-A7AE-FEC100560D8C}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {5A9BA9B3-D7AA-41C2-A7AE-FEC100560D8C}.Debug|Win32.Build.0 = Debug|Win32 18 | {5A9BA9B3-D7AA-41C2-A7AE-FEC100560D8C}.Debug|x64.ActiveCfg = Debug|x64 19 | {5A9BA9B3-D7AA-41C2-A7AE-FEC100560D8C}.Debug|x64.Build.0 = Debug|x64 20 | {5A9BA9B3-D7AA-41C2-A7AE-FEC100560D8C}.Release|Win32.ActiveCfg = Release|Win32 21 | {5A9BA9B3-D7AA-41C2-A7AE-FEC100560D8C}.Release|Win32.Build.0 = Release|Win32 22 | {5A9BA9B3-D7AA-41C2-A7AE-FEC100560D8C}.Release|x64.ActiveCfg = Release|x64 23 | {5A9BA9B3-D7AA-41C2-A7AE-FEC100560D8C}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(CDSSTRESS_FRAMEWORK_LIBRARY stress-framework) 2 | 3 | set(CDSSTRESS_FRAMEWORK_SOURCES 4 | framework/city.cpp 5 | framework/config.cpp 6 | framework/ellen_bintree_update_desc_pool.cpp 7 | framework/michael_alloc.cpp 8 | framework/stress_test.cpp 9 | ) 10 | 11 | add_custom_command( 12 | OUTPUT ${EXECUTABLE_OUTPUT_PATH}/dictionary.txt 13 | MAIN_DEPENDENCY ${PROJECT_SOURCE_DIR}/test/stress/data/text.txt 14 | COMMAND perl -X ${PROJECT_SOURCE_DIR}/test/stress/data/split.pl ${PROJECT_SOURCE_DIR}/test/stress/data/text.txt ${EXECUTABLE_OUTPUT_PATH}/dictionary.txt 15 | ) 16 | set_property(SOURCE framework/stress_test.cpp APPEND PROPERTY OBJECT_DEPENDS ${EXECUTABLE_OUTPUT_PATH}/dictionary.txt) 17 | 18 | add_library(${CDSSTRESS_FRAMEWORK_LIBRARY} OBJECT ${CDSSTRESS_FRAMEWORK_SOURCES}) 19 | 20 | include_directories( 21 | ${CMAKE_CURRENT_SOURCE_DIR} 22 | ) 23 | 24 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/map) 25 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/pqueue) 26 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/queue) 27 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/set) 28 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/stack) 29 | 30 | add_custom_target( stress-all 31 | DEPENDS 32 | stress-map 33 | stress-pqueue 34 | stress-queue 35 | stress-stack 36 | stress-set 37 | ) 38 | 39 | file(GLOB CONF_FILES ${PROJECT_SOURCE_DIR}/test/stress/data/*.conf) 40 | file(COPY ${CONF_FILES} DESTINATION ${EXECUTABLE_OUTPUT_PATH}) 41 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(CDSSTRESS_FRAMEWORK_LIBRARY stress-framework) 2 | 3 | set(CDSSTRESS_FRAMEWORK_SOURCES 4 | framework/city.cpp 5 | framework/config.cpp 6 | framework/ellen_bintree_update_desc_pool.cpp 7 | framework/michael_alloc.cpp 8 | framework/stress_test.cpp 9 | ) 10 | 11 | add_custom_command( 12 | OUTPUT ${EXECUTABLE_OUTPUT_PATH}/dictionary.txt 13 | MAIN_DEPENDENCY ${PROJECT_SOURCE_DIR}/test/stress/data/text.txt 14 | COMMAND perl -X ${PROJECT_SOURCE_DIR}/test/stress/data/split.pl ${PROJECT_SOURCE_DIR}/test/stress/data/text.txt ${EXECUTABLE_OUTPUT_PATH}/dictionary.txt 15 | ) 16 | set_property(SOURCE framework/stress_test.cpp APPEND PROPERTY OBJECT_DEPENDS ${EXECUTABLE_OUTPUT_PATH}/dictionary.txt) 17 | 18 | add_library(${CDSSTRESS_FRAMEWORK_LIBRARY} OBJECT ${CDSSTRESS_FRAMEWORK_SOURCES}) 19 | 20 | include_directories( 21 | ${CMAKE_CURRENT_SOURCE_DIR} 22 | ) 23 | 24 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/map) 25 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/pqueue) 26 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/queue) 27 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/set) 28 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/stack) 29 | 30 | add_custom_target( stress-all 31 | DEPENDS 32 | stress-map 33 | stress-pqueue 34 | stress-queue 35 | stress-stack 36 | stress-set 37 | ) 38 | 39 | file(GLOB CONF_FILES ${PROJECT_SOURCE_DIR}/test/stress/data/*.conf) 40 | file(COPY ${CONF_FILES} DESTINATION ${EXECUTABLE_OUTPUT_PATH}) 41 | -------------------------------------------------------------------------------- /CDS_test/libcds/projects/Win/vc14/stress-pqueue.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | 26 | 27 | Source Files 28 | 29 | 30 | Source Files 31 | 32 | 33 | Source Files 34 | 35 | 36 | Source Files 37 | 38 | 39 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/projects/Win/vc14/stress-pqueue.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | 26 | 27 | Source Files 28 | 29 | 30 | Source Files 31 | 32 | 33 | Source Files 34 | 35 | 36 | Source Files 37 | 38 | 39 | -------------------------------------------------------------------------------- /examples/main_7.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | template 10 | class execute_around { 11 | std::shared_ptr mtx; 12 | std::shared_ptr p; 13 | 14 | void lock() const { mtx->lock(); } 15 | void unlock() const { mtx->unlock(); } 16 | public: 17 | class proxy { 18 | std::unique_lock lock; 19 | T *const p; 20 | public: 21 | proxy (T * const _p, mutex_type& _mtx) : lock(_mtx), p(_p) { std::cout << "locked \n";} 22 | proxy(proxy &&px) : lock(std::move(px.lock)), p(px.p) {} 23 | ~proxy () { std::cout << "unlocked \n"; } 24 | T* operator -> () {return p;} 25 | const T* operator -> () const {return p;} 26 | }; 27 | 28 | template 29 | execute_around (Args ... args) : 30 | mtx(std::make_shared()), p(std::make_shared(args...)) {} 31 | 32 | proxy operator -> () { return proxy(p.get(), *mtx); } 33 | const proxy operator -> () const { return proxy(p.get(), *mtx); } 34 | template friend class std::lock_guard; 35 | }; 36 | 37 | template 38 | int my_accumulate(T b, T e, T2 v) { 39 | std::cout << "accumulate() - start \n"; 40 | int result = std::accumulate(b, e, v); 41 | std::cout << "accumulate() - finish \n"; 42 | return result; 43 | } 44 | 45 | int main() 46 | { 47 | execute_around> vecc(10, 10); 48 | 49 | int res = my_accumulate(vecc->begin(), vecc->end(), 0); // thread-safe 50 | 51 | std::cout << std::string("res = " + std::to_string(res) + "\n"); 52 | 53 | return 0; 54 | } -------------------------------------------------------------------------------- /examples/main45.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | template 10 | class execute_around { 11 | std::shared_ptr mtx; 12 | std::shared_ptr p; 13 | 14 | void lock() const { mtx->lock(); } 15 | void unlock() const { mtx->unlock(); } 16 | public: 17 | class proxy { 18 | std::unique_lock lock; 19 | T *const p; 20 | public: 21 | proxy (T * const _p, mutex_type& _mtx) : lock(_mtx), p(_p) { std::cout << "locked \n";} 22 | proxy(proxy &&px) : lock(std::move(px.lock)), p(px.p) {} 23 | ~proxy () { std::cout << "unlocked \n"; } 24 | T* operator -> () {return p;} 25 | const T* operator -> () const {return p;} 26 | }; 27 | 28 | template 29 | execute_around (Args ... args) : 30 | mtx(std::make_shared()), p(std::make_shared(args...)) {} 31 | 32 | proxy operator -> () { return proxy(p.get(), *mtx); } 33 | const proxy operator -> () const { return proxy(p.get(), *mtx); } 34 | template friend class std::lock_guard; 35 | }; 36 | 37 | template 38 | int my_accumulate(T b, T e, T2 v) { 39 | std::cout << "accumulate() - start \n"; 40 | int result = std::accumulate(b, e, v); 41 | std::cout << "accumulate() - finish \n"; 42 | return result; 43 | } 44 | 45 | int main() 46 | { 47 | typedef execute_around> T; 48 | 49 | T vecc(10, 10); 50 | 51 | int res = my_accumulate(vecc->begin(), vecc->end(), 0); // thread-safe 52 | 53 | std::cout << std::string("res = " + std::to_string(res) + "\n"); 54 | return 0; 55 | } -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/framework/michael_alloc.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "michael_alloc.h" 32 | 33 | namespace memory { 34 | michael_heap s_MichaelHeap; 35 | } 36 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/framework/michael_alloc.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "michael_alloc.h" 32 | 33 | namespace memory { 34 | michael_heap s_MichaelHeap; 35 | } 36 | -------------------------------------------------------------------------------- /CDS_test/libcds/cds/os/hpux/timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef CDSLIB_OS_HPUX_TIMER_H 32 | #define CDSLIB_OS_HPUX_TIMER_H 33 | 34 | #include 35 | 36 | #endif // #ifndef CDSLIB_OS_HPUX_TIMER_H 37 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/cds/os/hpux/timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef CDSLIB_OS_HPUX_TIMER_H 32 | #define CDSLIB_OS_HPUX_TIMER_H 33 | 34 | #include 35 | 36 | #endif // #ifndef CDSLIB_OS_HPUX_TIMER_H 37 | -------------------------------------------------------------------------------- /examples/main_25.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | class recursive_spinlock_t { 7 | std::atomic_flag lock_flag; 8 | int64_t recursive_counter; 9 | 10 | typedef std::thread::id thread_id_t; 11 | std::atomic owner_thread_id; 12 | std::thread::id get_fast_this_thread_id() { return std::this_thread::get_id(); } 13 | public: 14 | recursive_spinlock_t() : recursive_counter(0), owner_thread_id(thread_id_t()) { lock_flag.clear(); } 15 | 16 | bool try_lock() { 17 | if (!lock_flag.test_and_set(std::memory_order_acquire)) { 18 | owner_thread_id.store(get_fast_this_thread_id(), std::memory_order_release); 19 | } 20 | else { 21 | if (owner_thread_id.load(std::memory_order_acquire) != get_fast_this_thread_id()) 22 | return false; 23 | } 24 | ++recursive_counter; 25 | return true; 26 | } 27 | 28 | void lock() { 29 | for (volatile size_t i = 0; !try_lock(); ++i) 30 | if (i % 100000 == 0) std::this_thread::yield(); 31 | } 32 | 33 | void unlock() { 34 | assert(owner_thread_id.load(std::memory_order_acquire) == get_fast_this_thread_id()); 35 | assert(recursive_counter > 0); 36 | 37 | if (--recursive_counter == 0) { 38 | owner_thread_id.store(thread_id_t(), std::memory_order_release); 39 | lock_flag.clear(std::memory_order_release); 40 | } 41 | } 42 | }; 43 | // --------------------------------------------------------------- 44 | 45 | int shared_value = 0; 46 | recursive_spinlock_t recursive_spinlock; 47 | 48 | void add_to_shared() { 49 | recursive_spinlock.lock(); 50 | shared_value += 25; 51 | recursive_spinlock.unlock(); 52 | } 53 | 54 | int main() { 55 | 56 | std::thread t1([&]() { add_to_shared(); }); 57 | std::thread t2([&]() { add_to_shared(); }); 58 | t1.join(); t2.join(); 59 | std::cout << "shared_value = " << shared_value 60 | << std::endl; 61 | return 0; 62 | } -------------------------------------------------------------------------------- /CDS_test/libcds/cds/algo/flat_combining.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef CDSLIB_ALGO_FLAT_COMBINING_H 32 | #define CDSLIB_ALGO_FLAT_COMBINING_H 33 | 34 | #include 35 | 36 | #endif // #ifndef CDSLIB_ALGO_FLAT_COMBINING_H 37 | -------------------------------------------------------------------------------- /CDS_test/libcds/cds/intrusive/skip_list_hp.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef CDSLIB_INTRUSIVE_SKIP_LIST_HP_H 32 | #define CDSLIB_INTRUSIVE_SKIP_LIST_HP_H 33 | 34 | #include 35 | #include 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/cds/algo/flat_combining.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef CDSLIB_ALGO_FLAT_COMBINING_H 32 | #define CDSLIB_ALGO_FLAT_COMBINING_H 33 | 34 | #include 35 | 36 | #endif // #ifndef CDSLIB_ALGO_FLAT_COMBINING_H 37 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/cds/intrusive/skip_list_hp.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef CDSLIB_INTRUSIVE_SKIP_LIST_HP_H 32 | #define CDSLIB_INTRUSIVE_SKIP_LIST_HP_H 33 | 34 | #include 35 | #include 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /CDS_test/libcds/cds/os/aix/alloc_aligned.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef CDSLIB_OS_AIX_ALLOC_ALIGNED_H 32 | #define CDSLIB_OS_AIX_ALLOC_ALIGNED_H 33 | 34 | #include 35 | 36 | #endif // #ifndef CDSLIB_OS_AIX_ALLOC_ALIGNED_H 37 | 38 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/unit/tree/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME unit-tree) 2 | 3 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof") 4 | 5 | set(CDSGTEST_TREE_SOURCES 6 | ../main.cpp 7 | bronson_avltree_map_rcu_gpb.cpp 8 | bronson_avltree_map_rcu_gpi.cpp 9 | bronson_avltree_map_rcu_gpt.cpp 10 | bronson_avltree_map_rcu_shb.cpp 11 | bronson_avltree_map_rcu_sht.cpp 12 | bronson_avltree_map_ptr_rcu_gpb.cpp 13 | bronson_avltree_map_ptr_rcu_gpi.cpp 14 | bronson_avltree_map_ptr_rcu_gpt.cpp 15 | bronson_avltree_map_ptr_rcu_shb.cpp 16 | bronson_avltree_map_ptr_rcu_sht.cpp 17 | ellen_bintree_update_desc_pool.cpp 18 | ellen_bintree_map_hp.cpp 19 | ellen_bintree_map_dhp.cpp 20 | ellen_bintree_map_rcu_gpb.cpp 21 | ellen_bintree_map_rcu_gpi.cpp 22 | ellen_bintree_map_rcu_gpt.cpp 23 | ellen_bintree_map_rcu_shb.cpp 24 | ellen_bintree_map_rcu_sht.cpp 25 | ellen_bintree_set_dhp.cpp 26 | ellen_bintree_set_hp.cpp 27 | ellen_bintree_set_rcu_gpb.cpp 28 | ellen_bintree_set_rcu_gpi.cpp 29 | ellen_bintree_set_rcu_gpt.cpp 30 | ellen_bintree_set_rcu_shb.cpp 31 | ellen_bintree_set_rcu_sht.cpp 32 | intrusive_ellenbintree_hp.cpp 33 | intrusive_ellenbintree_dhp.cpp 34 | intrusive_ellenbintree_rcu_gpb.cpp 35 | intrusive_ellenbintree_rcu_gpi.cpp 36 | intrusive_ellenbintree_rcu_gpt.cpp 37 | intrusive_ellenbintree_rcu_shb.cpp 38 | intrusive_ellenbintree_rcu_sht.cpp 39 | ) 40 | 41 | include_directories( 42 | ${CMAKE_CURRENT_SOURCE_DIR} 43 | ) 44 | 45 | add_executable(${PACKAGE_NAME} ${CDSGTEST_TREE_SOURCES}) 46 | target_link_libraries(${PACKAGE_NAME} 47 | ${CDS_SHARED_LIBRARY} 48 | ${GTEST_LIBRARY} 49 | ${Boost_THREAD_LIBRARY} 50 | ${Boost_SYSTEM_LIBRARY} 51 | ${CMAKE_THREAD_LIBS_INIT} 52 | ) 53 | 54 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/cds/gc/dhp.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef CDSLIB_GC_DHP_H 32 | #define CDSLIB_GC_DHP_H 33 | 34 | #include 35 | #include 36 | #include 37 | 38 | #endif // #ifndef CDSLIB_GC_DHP_H 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/cds/os/hpux/alloc_aligned.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef CDSLIB_OS_HPUX_ALLOC_ALIGNED_H 32 | #define CDSLIB_OS_HPUX_ALLOC_ALIGNED_H 33 | 34 | #include 35 | 36 | #endif // #ifndef CDSLIB_OS_HPUX_ALLOC_ALIGNED_H 37 | 38 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/cds/os/aix/alloc_aligned.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef CDSLIB_OS_AIX_ALLOC_ALIGNED_H 32 | #define CDSLIB_OS_AIX_ALLOC_ALIGNED_H 33 | 34 | #include 35 | 36 | #endif // #ifndef CDSLIB_OS_AIX_ALLOC_ALIGNED_H 37 | 38 | -------------------------------------------------------------------------------- /CDS_test/libcds/cds/os/sunos/alloc_aligned.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef CDSLIB_OS_SUNOS_ALLOC_ALIGNED_H 32 | #define CDSLIB_OS_SUNOS_ALLOC_ALIGNED_H 33 | 34 | #include 35 | 36 | #endif // #ifndef CDSLIB_OS_SUNOS_ALLOC_ALIGNED_H 37 | 38 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/cds/gc/dhp.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef CDSLIB_GC_DHP_H 32 | #define CDSLIB_GC_DHP_H 33 | 34 | #include 35 | #include 36 | #include 37 | 38 | #endif // #ifndef CDSLIB_GC_DHP_H 39 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/cds/os/hpux/alloc_aligned.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef CDSLIB_OS_HPUX_ALLOC_ALIGNED_H 32 | #define CDSLIB_OS_HPUX_ALLOC_ALIGNED_H 33 | 34 | #include 35 | 36 | #endif // #ifndef CDSLIB_OS_HPUX_ALLOC_ALIGNED_H 37 | 38 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/unit/tree/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PACKAGE_NAME unit-tree) 2 | 3 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof") 4 | 5 | set(CDSGTEST_TREE_SOURCES 6 | ../main.cpp 7 | bronson_avltree_map_rcu_gpb.cpp 8 | bronson_avltree_map_rcu_gpi.cpp 9 | bronson_avltree_map_rcu_gpt.cpp 10 | bronson_avltree_map_rcu_shb.cpp 11 | bronson_avltree_map_rcu_sht.cpp 12 | bronson_avltree_map_ptr_rcu_gpb.cpp 13 | bronson_avltree_map_ptr_rcu_gpi.cpp 14 | bronson_avltree_map_ptr_rcu_gpt.cpp 15 | bronson_avltree_map_ptr_rcu_shb.cpp 16 | bronson_avltree_map_ptr_rcu_sht.cpp 17 | ellen_bintree_update_desc_pool.cpp 18 | ellen_bintree_map_hp.cpp 19 | ellen_bintree_map_dhp.cpp 20 | ellen_bintree_map_rcu_gpb.cpp 21 | ellen_bintree_map_rcu_gpi.cpp 22 | ellen_bintree_map_rcu_gpt.cpp 23 | ellen_bintree_map_rcu_shb.cpp 24 | ellen_bintree_map_rcu_sht.cpp 25 | ellen_bintree_set_dhp.cpp 26 | ellen_bintree_set_hp.cpp 27 | ellen_bintree_set_rcu_gpb.cpp 28 | ellen_bintree_set_rcu_gpi.cpp 29 | ellen_bintree_set_rcu_gpt.cpp 30 | ellen_bintree_set_rcu_shb.cpp 31 | ellen_bintree_set_rcu_sht.cpp 32 | intrusive_ellenbintree_hp.cpp 33 | intrusive_ellenbintree_dhp.cpp 34 | intrusive_ellenbintree_rcu_gpb.cpp 35 | intrusive_ellenbintree_rcu_gpi.cpp 36 | intrusive_ellenbintree_rcu_gpt.cpp 37 | intrusive_ellenbintree_rcu_shb.cpp 38 | intrusive_ellenbintree_rcu_sht.cpp 39 | ) 40 | 41 | include_directories( 42 | ${CMAKE_CURRENT_SOURCE_DIR} 43 | ) 44 | 45 | add_executable(${PACKAGE_NAME} ${CDSGTEST_TREE_SOURCES}) 46 | target_link_libraries(${PACKAGE_NAME} 47 | ${CDS_SHARED_LIBRARY} 48 | ${GTEST_LIBRARY} 49 | ${Boost_THREAD_LIBRARY} 50 | ${Boost_SYSTEM_LIBRARY} 51 | ${CMAKE_THREAD_LIBS_INIT} 52 | ) 53 | 54 | add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/delodd/map_delodd_cuckoo.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "map_delodd.h" 32 | #include "map_type_cuckoo.h" 33 | 34 | namespace map { 35 | 36 | CDSSTRESS_CuckooMap( Map_DelOdd, run_test, key_thread, size_t ) 37 | 38 | } // namespace map 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/set/delodd/set_delodd_cuckoo.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "set_delodd.h" 32 | #include "set_type_cuckoo.h" 33 | 34 | namespace set { 35 | 36 | CDSSTRESS_CuckooSet( Set_DelOdd, run_test, key_thread, size_t ) 37 | 38 | } // namespace set 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/set/insdel_find/set_insdelfind_std.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "set_insdelfind.h" 32 | #include "set_type_std.h" 33 | 34 | namespace set { 35 | CDSSTRESS_StdSet( Set_InsDelFind, run_test, size_t, size_t ) 36 | } // namespace set 37 | 38 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/cds/os/sunos/alloc_aligned.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef CDSLIB_OS_SUNOS_ALLOC_ALIGNED_H 32 | #define CDSLIB_OS_SUNOS_ALLOC_ALIGNED_H 33 | 34 | #include 35 | 36 | #endif // #ifndef CDSLIB_OS_SUNOS_ALLOC_ALIGNED_H 37 | 38 | -------------------------------------------------------------------------------- /CDS_test/libcds/cds/os/free_bsd/alloc_aligned.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef CDSLIB_OS_FREE_BSD_ALLOC_ALIGNED_H 32 | #define CDSLIB_OS_FREE_BSD_ALLOC_ALIGNED_H 33 | 34 | #include 35 | 36 | #endif // #ifndef CDSLIB_OS_FREE_BSD_ALLOC_ALIGNED_H 37 | 38 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/insdel_int/map_insdel_int_std.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "map_insdel_int.h" 32 | #include "map_type_std.h" 33 | 34 | namespace map { 35 | 36 | CDSSTRESS_StdMap( Map_InsDel_int, run_test, size_t, size_t ) 37 | 38 | } // namespace map 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/insdelfind/map_insdelfind_std.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "map_insdelfind.h" 32 | #include "map_type_std.h" 33 | 34 | namespace map { 35 | 36 | CDSSTRESS_StdMap( Map_InsDelFind, run_test, size_t, size_t ) 37 | 38 | } // namespace map 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/insfind_int/map_insfind_std.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "map_insfind_int.h" 32 | #include "map_type_std.h" 33 | 34 | namespace map { 35 | 36 | CDSSTRESS_StdMap( Map_InsFind_int, run_test, size_t, size_t ) 37 | 38 | } // namespace map 39 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/map/delodd/map_delodd_cuckoo.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "map_delodd.h" 32 | #include "map_type_cuckoo.h" 33 | 34 | namespace map { 35 | 36 | CDSSTRESS_CuckooMap( Map_DelOdd, run_test, key_thread, size_t ) 37 | 38 | } // namespace map 39 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/set/delodd/set_delodd_cuckoo.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "set_delodd.h" 32 | #include "set_type_cuckoo.h" 33 | 34 | namespace set { 35 | 36 | CDSSTRESS_CuckooSet( Set_DelOdd, run_test, key_thread, size_t ) 37 | 38 | } // namespace set 39 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/set/insdel_find/set_insdelfind_std.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "set_insdelfind.h" 32 | #include "set_type_std.h" 33 | 34 | namespace set { 35 | CDSSTRESS_StdSet( Set_InsDelFind, run_test, size_t, size_t ) 36 | } // namespace set 37 | 38 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/delodd/map_delodd_skip.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "map_delodd.h" 32 | #include "map_type_skip_list.h" 33 | 34 | namespace map { 35 | 36 | CDSSTRESS_SkipListMap( Map_DelOdd, run_test_extract, key_thread, size_t ) 37 | 38 | } // namespace map 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/set/delodd/set_delodd_skip.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "set_delodd.h" 32 | #include "set_type_skip_list.h" 33 | 34 | namespace set { 35 | 36 | CDSSTRESS_SkipListSet( Set_DelOdd, run_test_extract, key_thread, size_t ) 37 | 38 | } // namespace set 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/unit/tree/ellen_bintree_update_desc_pool.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include 32 | #include "test_ellen_bintree_update_desc_pool.h" 33 | 34 | namespace cds_test { 35 | pool_type s_Pool; 36 | lazy_pool_type s_LazyPool; 37 | } 38 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/cds/os/free_bsd/alloc_aligned.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef CDSLIB_OS_FREE_BSD_ALLOC_ALIGNED_H 32 | #define CDSLIB_OS_FREE_BSD_ALLOC_ALIGNED_H 33 | 34 | #include 35 | 36 | #endif // #ifndef CDSLIB_OS_FREE_BSD_ALLOC_ALIGNED_H 37 | 38 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/map/insdel_int/map_insdel_int_std.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "map_insdel_int.h" 32 | #include "map_type_std.h" 33 | 34 | namespace map { 35 | 36 | CDSSTRESS_StdMap( Map_InsDel_int, run_test, size_t, size_t ) 37 | 38 | } // namespace map 39 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/map/insdelfind/map_insdelfind_std.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "map_insdelfind.h" 32 | #include "map_type_std.h" 33 | 34 | namespace map { 35 | 36 | CDSSTRESS_StdMap( Map_InsDelFind, run_test, size_t, size_t ) 37 | 38 | } // namespace map 39 | -------------------------------------------------------------------------------- /Real_app_bench/libcds/test/stress/map/insfind_int/map_insfind_std.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "map_insfind_int.h" 32 | #include "map_type_std.h" 33 | 34 | namespace map { 35 | 36 | CDSSTRESS_StdMap( Map_InsFind_int, run_test, size_t, size_t ) 37 | 38 | } // namespace map 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/cds/intrusive/skip_list_dhp.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef CDSLIB_INTRUSIVE_SKIP_LIST_DHP_H 32 | #define CDSLIB_INTRUSIVE_SKIP_LIST_DHP_H 33 | 34 | #include 35 | #include 36 | 37 | #endif // CDSLIB_INTRUSIVE_SKIP_LIST_DHP_H 38 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/delodd/map_delodd_michael.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "map_delodd.h" 32 | #include "map_type_michael.h" 33 | 34 | namespace map { 35 | 36 | CDSSTRESS_MichaelMap( Map_DelOdd_LF, run_test_extract, key_thread, size_t ) 37 | 38 | } // namespace map 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/insdel_int/map_insdel_int_cuckoo.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "map_insdel_int.h" 32 | #include "map_type_cuckoo.h" 33 | 34 | namespace map { 35 | 36 | CDSSTRESS_CuckooMap( Map_InsDel_int, run_test, size_t, size_t ) 37 | 38 | } // namespace map 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/insdel_int/map_insdel_int_skip.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "map_insdel_int.h" 32 | #include "map_type_skip_list.h" 33 | 34 | namespace map { 35 | 36 | CDSSTRESS_SkipListMap( Map_InsDel_int, run_test, size_t, size_t ) 37 | 38 | } // namespace map 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/insdelfind/map_insdelfind_cuckoo.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "map_insdelfind.h" 32 | #include "map_type_cuckoo.h" 33 | 34 | namespace map { 35 | 36 | CDSSTRESS_CuckooMap( Map_InsDelFind, run_test, size_t, size_t ) 37 | 38 | } // namespace map 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/insdelfind/map_insdelfind_skip.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "map_insdelfind.h" 32 | #include "map_type_skip_list.h" 33 | 34 | namespace map { 35 | 36 | CDSSTRESS_SkipListMap( Map_InsDelFind, run_test, size_t, size_t ) 37 | 38 | } // namespace map 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/insfind_int/map_insfind_cuckoo.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "map_insfind_int.h" 32 | #include "map_type_cuckoo.h" 33 | 34 | namespace map { 35 | 36 | CDSSTRESS_CuckooMap( Map_InsFind_int, run_test, size_t, size_t ) 37 | 38 | } // namespace map 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/set/delodd/set_delodd_michael.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "set_delodd.h" 32 | #include "set_type_michael.h" 33 | 34 | namespace set { 35 | 36 | CDSSTRESS_MichaelSet( Set_DelOdd_LF, run_test_extract, key_thread, size_t ) 37 | 38 | } // namespace set 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/set/insdel_find/set_insdelfind_cuckoo.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "set_insdelfind.h" 32 | #include "set_type_cuckoo.h" 33 | 34 | namespace set { 35 | 36 | CDSSTRESS_CuckooSet( Set_InsDelFind, run_test, size_t, size_t ) 37 | 38 | } // namespace set 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/set/insdel_find/set_insdelfind_skip.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "set_insdelfind.h" 32 | #include "set_type_skip_list.h" 33 | 34 | namespace set { 35 | 36 | CDSSTRESS_SkipListSet( Set_InsDelFind, run_test, size_t, size_t ) 37 | 38 | } // namespace set 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/set/insdel_func/set_insdel_func_cuckoo.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "set_insdel_func.h" 32 | #include "set_type_cuckoo.h" 33 | 34 | namespace set { 35 | 36 | CDSSTRESS_CuckooSet( Set_InsDel_func, run_test, size_t, value ) 37 | 38 | } // namespace set 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/set/insdel_string/set_insdel_string_std.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "set_insdel_string.h" 32 | #include "set_type_std.h" 33 | 34 | namespace set { 35 | CDSSTRESS_StdSet( Set_InsDel_string, run_test, std::string, size_t ) 36 | } // namespace set 37 | 38 | -------------------------------------------------------------------------------- /CDS_test/libcds/cds/intrusive/lazy_list_hp.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef CDSLIB_INTRUSIVE_LAZY_LIST_HP_H 32 | #define CDSLIB_INTRUSIVE_LAZY_LIST_HP_H 33 | 34 | #include 35 | #include 36 | 37 | #endif // #ifndef CDSLIB_INTRUSIVE_LAZY_LIST_HP_H 38 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/delodd/map_delodd_split.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "map_delodd.h" 32 | #include "map_type_split_list.h" 33 | 34 | namespace map { 35 | 36 | CDSSTRESS_SplitListMap( Map_DelOdd_LF, run_test_extract, key_thread, size_t ) 37 | 38 | } // namespace map 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/insdel_int/map_insdel_int_michael.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "map_insdel_int.h" 32 | #include "map_type_michael.h" 33 | 34 | namespace map { 35 | 36 | CDSSTRESS_MichaelMap( Map_InsDel_int_LF, run_test, size_t, size_t ) 37 | 38 | } // namespace map 39 | -------------------------------------------------------------------------------- /CDS_test/libcds/test/stress/map/insdel_int/map_insdel_int_split.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of libcds - Concurrent Data Structures library 3 | 4 | (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 5 | 6 | Source code repo: http://github.com/khizmax/libcds/ 7 | Download: http://sourceforge.net/projects/libcds/files/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "map_insdel_int.h" 32 | #include "map_type_split_list.h" 33 | 34 | namespace map { 35 | 36 | CDSSTRESS_SplitListMap( Map_InsDel_int_LF, run_test, size_t, size_t ) 37 | 38 | } // namespace map 39 | --------------------------------------------------------------------------------