summaryrefslogtreecommitdiff
path: root/src/Persistent_cohomology/include
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-01-06 13:58:04 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-01-06 13:58:04 +0000
commit3b83c563f5a9992b2eb9a82738e6eebbe471b3e4 (patch)
treef972df246e3b5a1e7b5ee4b15c4d5568a107c358 /src/Persistent_cohomology/include
parent3a681ca7a0a6e0672b9ac29d80ff9628a3a5e347 (diff)
Test of thread_local solution
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/thread_local_no_static@1932 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: a1f31ab16d2a086d38d0d019bbdc59152f8e02e7
Diffstat (limited to 'src/Persistent_cohomology/include')
-rw-r--r--src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h
index bc8099e6..b3339b7d 100644
--- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h
+++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h
@@ -300,8 +300,7 @@ class Persistent_cohomology {
// with multiplicity. We used to sum the coefficients directly in
// annotations_in_boundary by using a map, we now do it later.
typedef std::pair<Column *, int> annotation_t;
- // Danger: not thread-safe!
- static std::vector<annotation_t> annotations_in_boundary;
+ thread_local std::vector<annotation_t> annotations_in_boundary;
annotations_in_boundary.clear();
int sign = 1 - 2 * (dim_sigma % 2); // \in {-1,1} provides the sign in the
// alternate sum in the boundary.