diff options
author | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-01-30 18:04:20 +0100 |
---|---|---|
committer | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-01-30 18:04:20 +0100 |
commit | 0cbf41493cee2b9bd598557b97df9b1211da2b9d (patch) | |
tree | 434c210004518a58be79a76a362c4d0b4a4d1af7 /src/Nerve_GIC | |
parent | 5d5f40493ce60f2a606793645bf713c60fb5284d (diff) |
Use mutex from stl instead of tbb one that is deprecated
Diffstat (limited to 'src/Nerve_GIC')
-rw-r--r-- | src/Nerve_GIC/include/gudhi/GIC.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Nerve_GIC/include/gudhi/GIC.h b/src/Nerve_GIC/include/gudhi/GIC.h index a47d6889..2a6d4788 100644 --- a/src/Nerve_GIC/include/gudhi/GIC.h +++ b/src/Nerve_GIC/include/gudhi/GIC.h @@ -14,7 +14,7 @@ #ifdef GUDHI_USE_TBB #include <tbb/parallel_for.h> -#include <tbb/mutex.h> +#include <mutex> #endif #include <gudhi/Debug_utils.h> @@ -459,7 +459,7 @@ class Cover_complex { // This cannot be parallelized if thread_local is not defined // thread_local is not defined for XCode < v.8 #if defined(GUDHI_USE_TBB) && defined(GUDHI_CAN_USE_CXX11_THREAD_LOCAL) - tbb::mutex deltamutex; + std::mutex deltamutex; tbb::parallel_for(0, N, [&](int i){ std::vector<int> samples(m); SampleWithoutReplacement(n, m, samples); @@ -765,7 +765,7 @@ class Cover_complex { #ifdef GUDHI_USE_TBB if (verbose) std::cout << "Computing connected components (parallelized)..." << std::endl; - tbb::mutex covermutex, idmutex; + std::mutex covermutex, idmutex; tbb::parallel_for(0, res, [&](int i){ // Compute connected components Graph G = one_skeleton.create_subgraph(); @@ -895,7 +895,7 @@ class Cover_complex { // Compute the geodesic distances to subsamples with Dijkstra #ifdef GUDHI_USE_TBB if (verbose) std::cout << "Computing geodesic distances (parallelized)..." << std::endl; - tbb::mutex coverMutex; tbb::mutex mindistMutex; + std::mutex coverMutex; std::mutex mindistMutex; tbb::parallel_for(0, m, [&](int i){ int seed = voronoi_subsamples[i]; std::vector<double> dmap(n); |