diff options
author | Arnur Nigmetov <a.nigmetov@gmail.com> | 2018-01-20 19:11:29 +0100 |
---|---|---|
committer | Arnur Nigmetov <a.nigmetov@gmail.com> | 2018-01-20 19:11:29 +0100 |
commit | 0cc35ad04f9c2997014d7cf62a12f697e79fb534 (patch) | |
tree | 744c07bc2c12fba193934ac98417c5063bead189 /geom_matching/wasserstein/include/dnn/parallel/tbb.h | |
parent | 3552ce68bc7654df35da471bd937b09a9fde101f (diff) |
Major rewrite, templatized version
Diffstat (limited to 'geom_matching/wasserstein/include/dnn/parallel/tbb.h')
-rw-r--r-- | geom_matching/wasserstein/include/dnn/parallel/tbb.h | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/geom_matching/wasserstein/include/dnn/parallel/tbb.h b/geom_matching/wasserstein/include/dnn/parallel/tbb.h index 64c59e0..3f811d6 100644 --- a/geom_matching/wasserstein/include/dnn/parallel/tbb.h +++ b/geom_matching/wasserstein/include/dnn/parallel/tbb.h @@ -1,7 +1,6 @@ -#ifndef PARALLEL_H -#define PARALLEL_H +#ifndef HERA_WS_PARALLEL_H +#define HERA_WS_PARALLEL_H -//#include <iostream> #include <vector> #include <boost/range.hpp> @@ -18,6 +17,10 @@ #include <boost/serialization/collections_load_imp.hpp> #include <boost/serialization/collections_save_imp.hpp> +namespace hera +{ +namespace ws +{ namespace dnn { using tbb::mutex; @@ -87,7 +90,9 @@ namespace dnn tbb::tick_count start; }; -} +} // dnn +} // ws +} // hera // Serialization for tbb::concurrent_vector<...> namespace boost @@ -132,6 +137,10 @@ namespace boost #include <map> #include <boost/progress.hpp> +namespace hera +{ +namespace ws +{ namespace dnn { template<class T> @@ -207,14 +216,22 @@ namespace dnn }; using boost::progress_timer; -} +} // dnn +} // ws +} // hera #endif // TBB +namespace hera +{ +namespace ws +{ namespace dnn { template<class Range, class F> void do_foreach(const Range& range, const F& f) { do_foreach(boost::begin(range), boost::end(range), f); } -} +} // dnn +} // ws +} // hera #endif |