summaryrefslogtreecommitdiff
path: root/src/Simplex_tree
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-06-06 22:00:46 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-06-06 22:00:46 +0000
commit027dac0358de7d07f772c32cbdf2306dfeae714b (patch)
tree4538783c8561a2d966e52a1f4d6d7f98f1b29a52 /src/Simplex_tree
parent2fd6f14cbe1c949d5724ffe762ce27ab9ab95941 (diff)
Merge of branch thread_local_optional_vincent to take into account XCode < v.8 as thread local is not available
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3554 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 9dcf072a4606d1131a925bca4571f0f1b5547d14
Diffstat (limited to 'src/Simplex_tree')
-rw-r--r--src/Simplex_tree/include/gudhi/Simplex_tree.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h
index 74a7281d..ee96d5a2 100644
--- a/src/Simplex_tree/include/gudhi/Simplex_tree.h
+++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h
@@ -689,7 +689,11 @@ class Simplex_tree {
return { null_simplex(), true }; // ----->>
// Copy before sorting
- thread_local std::vector<Vertex_handle> copy;
+ // Thread local is not available on XCode version < V.8 - It will slow down computation
+#ifdef GUDHI_CAN_USE_CXX11_THREAD_LOCAL
+ thread_local
+#endif // GUDHI_CAN_USE_CXX11_THREAD_LOCAL
+ std::vector<Vertex_handle> copy;
copy.clear();
copy.insert(copy.end(), first, last);
std::sort(std::begin(copy), std::end(copy));