diff options
author | glisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-10-25 21:41:01 +0000 |
---|---|---|
committer | glisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-10-25 21:41:01 +0000 |
commit | 2814e25cbc70160e57f426ec708f6d99180ef5fd (patch) | |
tree | c5453cb77064cd05443c4674d2fd0eb1be9844cd /src/Hasse_complex/include/gudhi/Hasse_complex.h | |
parent | 91a2adbaeec76b4ee172123a5a833065f910f5ab (diff) |
Example to compute persistence of a Rips filtration "in parallel". On a machine
with a gazillion cores, it gains a factor >2 at the expense of some memory. At
this point, construction of the Rips graph and expansion are not negligible
anymore and could use some parallelism.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/tbb@875 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 53d6a74338f1346bd7d1ca018ec15dd1ee8287e8
Diffstat (limited to 'src/Hasse_complex/include/gudhi/Hasse_complex.h')
-rw-r--r-- | src/Hasse_complex/include/gudhi/Hasse_complex.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Hasse_complex/include/gudhi/Hasse_complex.h b/src/Hasse_complex/include/gudhi/Hasse_complex.h index af9ae5e9..38887264 100644 --- a/src/Hasse_complex/include/gudhi/Hasse_complex.h +++ b/src/Hasse_complex/include/gudhi/Hasse_complex.h @@ -44,8 +44,7 @@ struct Hasse_simplex { template< class Complex_ds > Hasse_simplex(Complex_ds & cpx , typename Complex_ds::Simplex_handle sh) - : key_(cpx.key(sh)) - , filtration_(cpx.filtration(sh)) + : filtration_(cpx.filtration(sh)) , boundary_() { boundary_.reserve(cpx.dimension(sh) + 1); for (auto b_sh : cpx.boundary_simplex_range(sh)) { @@ -55,7 +54,7 @@ struct Hasse_simplex { Hasse_simplex(typename HasseCpx::Simplex_key key , typename HasseCpx::Filtration_value fil - , std::vector<typename HasseCpx::Simplex_handle> boundary) + , std::vector<typename HasseCpx::Simplex_handle> const& boundary) : key_(key) , filtration_(fil) , boundary_(boundary) { } @@ -197,11 +196,12 @@ class Hasse_complex { } void initialize_filtration() { + // Setting the keys is done by pcoh, Simplex_tree doesn't do it either. +#if 0 Simplex_key key = 0; - for (auto & h_simp : complex_) { - h_simp.key_ = key; - ++key; - } + for (auto & h_simp : complex_) + h_simp.key_ = key++; +#endif } std::vector< Hasse_simp, Gudhi::no_init_allocator<Hasse_simp> > complex_; |