Merge branch 'master' into BGL-Alpha_expansion_graphcut-GF
This commit is contained in:
@@ -127,11 +127,7 @@ public:
|
||||
std::size_t num_trees = 25,
|
||||
std::size_t max_depth = 20)
|
||||
{
|
||||
#ifdef CGAL_LINKED_WITH_TBB
|
||||
train<CGAL::Parallel_tag>(ground_truth, reset_trees, num_trees, max_depth);
|
||||
#else
|
||||
train<CGAL::Sequential_tag>(ground_truth, reset_trees, num_trees, max_depth);
|
||||
#endif
|
||||
train<CGAL::Parallel_if_available_tag>(ground_truth, reset_trees, num_trees, max_depth);
|
||||
}
|
||||
/// \endcond
|
||||
|
||||
@@ -146,7 +142,7 @@ public:
|
||||
label.
|
||||
|
||||
\tparam ConcurrencyTag enables sequential versus parallel
|
||||
algorithm. Possible values are `Parallel_tag` (default value is
|
||||
algorithm. Possible values are `Parallel_tag` (default value if
|
||||
%CGAL is linked with TBB) or `Sequential_tag` (default value
|
||||
otherwise).
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <tbb/parallel_for.h>
|
||||
#include <tbb/blocked_range.h>
|
||||
#include <tbb/scalable_allocator.h>
|
||||
#include <tbb/mutex.h>
|
||||
#include <mutex>
|
||||
#endif // CGAL_LINKED_WITH_TBB
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
#ifdef CGAL_LINKED_WITH_TBB
|
||||
#include <tbb/mutex.h>
|
||||
#include <mutex>
|
||||
#include <tbb/task_group.h>
|
||||
#endif // CGAL_LINKED_WITH_TBB
|
||||
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
#include <tbb/parallel_for.h>
|
||||
#include <tbb/blocked_range.h>
|
||||
#include <tbb/scalable_allocator.h>
|
||||
#include <tbb/mutex.h>
|
||||
#include <mutex>
|
||||
|
||||
#endif // CGAL_LINKED_WITH_TBB
|
||||
|
||||
namespace CGAL {
|
||||
@@ -69,7 +70,7 @@ private:
|
||||
PointMap m_point_map;
|
||||
const NeighborQuery& m_neighbor_query;
|
||||
float& m_mean_range;
|
||||
tbb::mutex& m_mutex;
|
||||
std::mutex& m_mutex;
|
||||
|
||||
public:
|
||||
|
||||
@@ -78,7 +79,7 @@ private:
|
||||
PointMap point_map,
|
||||
const NeighborQuery& neighbor_query,
|
||||
float& mean_range,
|
||||
tbb::mutex& mutex)
|
||||
std::mutex& mutex)
|
||||
: m_eigen (eigen), m_input (input), m_point_map (point_map),
|
||||
m_neighbor_query (neighbor_query), m_mean_range (mean_range), m_mutex (mutex)
|
||||
{ }
|
||||
@@ -120,7 +121,7 @@ private:
|
||||
const FaceListGraph& m_input;
|
||||
const NeighborQuery& m_neighbor_query;
|
||||
float& m_mean_range;
|
||||
tbb::mutex& m_mutex;
|
||||
std::mutex& m_mutex;
|
||||
|
||||
public:
|
||||
|
||||
@@ -128,7 +129,7 @@ private:
|
||||
const FaceListGraph& input,
|
||||
const NeighborQuery& neighbor_query,
|
||||
float& mean_range,
|
||||
tbb::mutex& mutex)
|
||||
std::mutex& mutex)
|
||||
: m_eigen (eigen), m_input (input),
|
||||
m_neighbor_query (neighbor_query), m_mean_range (mean_range), m_mutex (mutex)
|
||||
{ }
|
||||
@@ -225,7 +226,7 @@ public:
|
||||
is `CGAL::Point_3`.
|
||||
\tparam NeighborQuery model of `NeighborQuery`
|
||||
\tparam ConcurrencyTag enables sequential versus parallel
|
||||
algorithm. Possible values are `Parallel_tag` (default value is %CGAL
|
||||
algorithm. Possible values are `Parallel_tag` (default value if %CGAL
|
||||
is linked with TBB) or `Sequential_tag` (default value otherwise).
|
||||
\tparam DiagonalizeTraits model of `DiagonalizeTraits` used for
|
||||
matrix diagonalization. It can be omitted if Eigen 3 (or greater)
|
||||
@@ -241,10 +242,8 @@ public:
|
||||
typename NeighborQuery,
|
||||
#if defined(DOXYGEN_RUNNING)
|
||||
typename ConcurrencyTag,
|
||||
#elif defined(CGAL_LINKED_WITH_TBB)
|
||||
typename ConcurrencyTag = CGAL::Parallel_tag,
|
||||
#else
|
||||
typename ConcurrencyTag = CGAL::Sequential_tag,
|
||||
typename ConcurrencyTag = CGAL::Parallel_if_available_tag,
|
||||
#endif
|
||||
#if defined(DOXYGEN_RUNNING)
|
||||
typename DiagonalizeTraits>
|
||||
@@ -271,7 +270,7 @@ public:
|
||||
#else
|
||||
if (boost::is_convertible<ConcurrencyTag,Parallel_tag>::value)
|
||||
{
|
||||
tbb::mutex mutex;
|
||||
std::mutex mutex;
|
||||
Compute_eigen_values<PointRange, PointMap, NeighborQuery, DiagonalizeTraits>
|
||||
f(out, input, point_map, neighbor_query, out.m_content->mean_range, mutex);
|
||||
tbb::parallel_for(tbb::blocked_range<size_t>(0, input.size ()), f);
|
||||
@@ -309,7 +308,7 @@ public:
|
||||
\tparam FaceListGraph model of `FaceListGraph`.
|
||||
\tparam NeighborQuery model of `NeighborQuery`
|
||||
\tparam ConcurrencyTag enables sequential versus parallel
|
||||
algorithm. Possible values are `Parallel_tag` (default value is %CGAL
|
||||
algorithm. Possible values are `Parallel_tag` (default value if %CGAL
|
||||
is linked with TBB) or `Sequential_tag` (default value otherwise).
|
||||
\tparam DiagonalizeTraits model of `DiagonalizeTraits` used for
|
||||
matrix diagonalization. It can be omitted: if Eigen 3 (or greater)
|
||||
@@ -324,10 +323,8 @@ public:
|
||||
typename NeighborQuery,
|
||||
#if defined(DOXYGEN_RUNNING)
|
||||
typename ConcurrencyTag,
|
||||
#elif defined(CGAL_LINKED_WITH_TBB)
|
||||
typename ConcurrencyTag = CGAL::Parallel_tag,
|
||||
#else
|
||||
typename ConcurrencyTag = CGAL::Sequential_tag,
|
||||
typename ConcurrencyTag = CGAL::Parallel_if_available_tag,
|
||||
#endif
|
||||
#if defined(DOXYGEN_RUNNING)
|
||||
typename DiagonalizeTraits>
|
||||
@@ -361,7 +358,7 @@ public:
|
||||
#else
|
||||
if (boost::is_convertible<ConcurrencyTag,Parallel_tag>::value)
|
||||
{
|
||||
tbb::mutex mutex;
|
||||
std::mutex mutex;
|
||||
Compute_eigen_values_graph<FaceListGraph, NeighborQuery, DiagonalizeTraits>
|
||||
f(out, input, neighbor_query, out.m_content->mean_range, mutex);
|
||||
|
||||
@@ -395,7 +392,7 @@ public:
|
||||
`RandomAccessIterator` and its value type is the key type of
|
||||
`PointMap`.
|
||||
\tparam ConcurrencyTag enables sequential versus parallel
|
||||
algorithm. Possible values are `Parallel_tag` (default value is %CGAL
|
||||
algorithm. Possible values are `Parallel_tag` (default value if %CGAL
|
||||
is linked with TBB) or `Sequential_tag` (default value otherwise).
|
||||
\tparam DiagonalizeTraits model of `DiagonalizeTraits` used for
|
||||
matrix diagonalization. It can be omitted: if Eigen 3 (or greater)
|
||||
@@ -408,10 +405,8 @@ public:
|
||||
template <typename ClusterRange,
|
||||
#if defined(DOXYGEN_RUNNING)
|
||||
typename ConcurrencyTag,
|
||||
#elif defined(CGAL_LINKED_WITH_TBB)
|
||||
typename ConcurrencyTag = CGAL::Parallel_tag,
|
||||
#else
|
||||
typename ConcurrencyTag = CGAL::Sequential_tag,
|
||||
typename ConcurrencyTag = CGAL::Parallel_if_available_tag,
|
||||
#endif
|
||||
#if defined(DOXYGEN_RUNNING)
|
||||
typename DiagonalizeTraits>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
#ifdef CGAL_LINKED_WITH_TBB
|
||||
#include <tbb/task_group.h>
|
||||
#include <tbb/mutex.h>
|
||||
#include <mutex>
|
||||
#endif // CGAL_LINKED_WITH_TBB
|
||||
|
||||
namespace CGAL {
|
||||
@@ -79,7 +79,7 @@ namespace Classification {
|
||||
is `GeomTraits::Point_3`.
|
||||
\tparam ConcurrencyTag enables sequential versus parallel
|
||||
computation of `CGAL::Classification::Local_eigen_analysis`
|
||||
objects. Possible values are `Parallel_tag` (default value is %CGAL
|
||||
objects. Possible values are `Parallel_tag` (default value if %CGAL
|
||||
is linked with TBB) or `Sequential_tag` (default value otherwise).
|
||||
\tparam DiagonalizeTraits model of `DiagonalizeTraits` used for
|
||||
matrix diagonalization. It can be omitted: if Eigen 3 (or greater)
|
||||
@@ -93,10 +93,8 @@ template <typename GeomTraits,
|
||||
typename PointMap,
|
||||
#if defined(DOXYGEN_RUNNING)
|
||||
typename ConcurrencyTag,
|
||||
#elif defined(CGAL_LINKED_WITH_TBB)
|
||||
typename ConcurrencyTag = CGAL::Parallel_tag,
|
||||
#else
|
||||
typename ConcurrencyTag = CGAL::Sequential_tag,
|
||||
typename ConcurrencyTag = CGAL::Parallel_if_available_tag,
|
||||
#endif
|
||||
typename DiagonalizeTraits = CGAL::Default_diagonalize_traits<float,3> >
|
||||
class Mesh_feature_generator
|
||||
|
||||
@@ -90,10 +90,8 @@ template <typename GeomTraits,
|
||||
typename PointMap,
|
||||
#if defined(DOXYGEN_RUNNING)
|
||||
typename ConcurrencyTag,
|
||||
#elif defined(CGAL_LINKED_WITH_TBB)
|
||||
typename ConcurrencyTag = CGAL::Parallel_tag,
|
||||
#else
|
||||
typename ConcurrencyTag = CGAL::Sequential_tag,
|
||||
typename ConcurrencyTag = CGAL::Parallel_if_available_tag,
|
||||
#endif
|
||||
#if defined(DOXYGEN_RUNNING)
|
||||
typename DiagonalizeTraits>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <tbb/parallel_for.h>
|
||||
#include <tbb/blocked_range.h>
|
||||
#include <tbb/scalable_allocator.h>
|
||||
#include <tbb/mutex.h>
|
||||
#include <mutex>
|
||||
#endif // CGAL_LINKED_WITH_TBB
|
||||
|
||||
#define CLASSIFICATION_TRAINING_QUICK_ESTIMATION
|
||||
@@ -72,9 +72,9 @@ private:
|
||||
std::vector<std::size_t>& m_true_positives;
|
||||
std::vector<std::size_t>& m_false_positives;
|
||||
std::vector<std::size_t>& m_false_negatives;
|
||||
std::vector<tbb::mutex>& m_tp_mutex;
|
||||
std::vector<tbb::mutex>& m_fp_mutex;
|
||||
std::vector<tbb::mutex>& m_fn_mutex;
|
||||
std::vector<std::mutex>& m_tp_mutex;
|
||||
std::vector<std::mutex>& m_fp_mutex;
|
||||
std::vector<std::mutex>& m_fn_mutex;
|
||||
|
||||
|
||||
public:
|
||||
@@ -85,9 +85,9 @@ private:
|
||||
std::vector<std::size_t>& true_positives,
|
||||
std::vector<std::size_t>& false_positives,
|
||||
std::vector<std::size_t>& false_negatives,
|
||||
std::vector<tbb::mutex>& tp_mutex,
|
||||
std::vector<tbb::mutex>& fp_mutex,
|
||||
std::vector<tbb::mutex>& fn_mutex)
|
||||
std::vector<std::mutex>& tp_mutex,
|
||||
std::vector<std::mutex>& fp_mutex,
|
||||
std::vector<std::mutex>& fn_mutex)
|
||||
: m_training_set (training_set)
|
||||
, m_classifier (classifier)
|
||||
, m_label (label)
|
||||
@@ -901,9 +901,9 @@ private:
|
||||
#else
|
||||
if (boost::is_convertible<ConcurrencyTag,Parallel_tag>::value)
|
||||
{
|
||||
std::vector<tbb::mutex> tp_mutex (m_labels.size());
|
||||
std::vector<tbb::mutex> fp_mutex (m_labels.size());
|
||||
std::vector<tbb::mutex> fn_mutex (m_labels.size());
|
||||
std::vector<std::mutex> tp_mutex (m_labels.size());
|
||||
std::vector<std::mutex> fp_mutex (m_labels.size());
|
||||
std::vector<std::mutex> fn_mutex (m_labels.size());
|
||||
Compute_iou f(training_sets[j], *this, j,
|
||||
true_positives, false_positives, false_negatives,
|
||||
tp_mutex, fp_mutex, fn_mutex);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <tbb/parallel_for.h>
|
||||
#include <tbb/blocked_range.h>
|
||||
#include <tbb/scalable_allocator.h>
|
||||
#include <tbb/mutex.h>
|
||||
#include <mutex>
|
||||
#endif // CGAL_LINKED_WITH_TBB
|
||||
|
||||
namespace CGAL {
|
||||
@@ -327,7 +327,7 @@ namespace internal {
|
||||
suboptimal results.
|
||||
|
||||
\tparam ConcurrencyTag enables sequential versus parallel
|
||||
algorithm. Possible values are `Parallel_tag` or `Sequential_tag`.
|
||||
algorithm. Possible values are `Parallel_if_available_tag`, `Parallel_tag` or `Sequential_tag`.
|
||||
|
||||
\tparam ItemRange model of `ConstRange`. Its iterator type is
|
||||
`RandomAccessIterator`. Its value type depends on the data that is
|
||||
@@ -417,7 +417,7 @@ namespace internal {
|
||||
efficiency and better quality results.
|
||||
|
||||
\tparam ConcurrencyTag enables sequential versus parallel
|
||||
algorithm. Possible values are `Parallel_tag` or `Sequential_tag`.
|
||||
algorithm. Possible values are `Parallel_if_available_tag`, `Parallel_tag` or `Sequential_tag`.
|
||||
\tparam ItemRange model of `ConstRange`. Its iterator type is
|
||||
`RandomAccessIterator`.
|
||||
\tparam ItemMap model of `ReadablePropertyMap` whose key
|
||||
@@ -495,7 +495,7 @@ namespace internal {
|
||||
results.
|
||||
|
||||
\tparam ConcurrencyTag enables sequential versus parallel
|
||||
algorithm. Possible values are `Parallel_tag` or `Sequential_tag`.
|
||||
algorithm. Possible values are `Parallel_if_available_tag`, `Parallel_tag` or `Sequential_tag`.
|
||||
\tparam ItemRange model of `ConstRange`. Its iterator type is
|
||||
`RandomAccessIterator`.
|
||||
\tparam ItemMap model of `ReadablePropertyMap` whose key
|
||||
|
||||
Reference in New Issue
Block a user