Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit 7261077

Browse files
committed
Persistent concurrent hash map data structure.
Implementation is based on concurrent_hash_map from Intel TBB library. Test for persistent_concurrent_hash_map is built and executed only if Intel TBB library found by CMake. Update README for Intel TBB related tests. Extend Docker images to support Intel TBB Add clang-format checks for experimental folder Fix CPack issue with deb package Add abstraction for RW mutex Add pmreorder test for concurrent_hash_map
1 parent f93a0d7 commit 7261077

21 files changed

+5242
-3
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ if(BUILD_TESTS OR BUILD_EXAMPLES)
144144
endif()
145145

146146
math(EXPR LIBPMEMOBJ_VERSION_NUM "${LIBPMEMOBJ_VERSION_PATCH} + ${LIBPMEMOBJ_VERSION_MINOR} * 100 + ${LIBPMEMOBJ_VERSION_MAJOR} * 10000")
147+
148+
find_package(TBB COMPONENTS tbb)
147149
endif()
148150

149151
add_executable(check_license EXCLUDE_FROM_ALL utils/check_license/check-license.c)

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ $GEN is type of package generator and can be RPM or DEB
4444

4545
CMAKE_INSTALL_PREFIX must be set to a destination were packages will be installed
4646

47+
#### To use Intel(R) Threading Building Blocks library ####
48+
49+
By default concurrent_hash_map uses pmem::obj::shared_mutex internally. But read-write mutex from Intel(R) Threading Building Blocks library can be used instead to achive better performance. To enable it in your application set the following compilation flag:
50+
- -DLIBPMEMOBJ_CPP_USE_TBB_RW_MUTEX=1
51+
52+
If you want to build tests for concurrent_hash_map with read-write mutex from Intel(R) Threading Building Blocks library, run cmake with ```-DUSE_TBB=1 -DTBB_DIR=<Path to Intel TBB>/cmake``` option:
53+
54+
Intel(R) Threading Building Blocks library can be downloaded from the official [release page](https://github.com/01org/tbb/releases).
55+
4756
#### To use with Valgrind ####
4857

4958
In order to build your application with libpmemobj-cpp and

0 commit comments

Comments
 (0)