Use Parallel_if_available_tag to simplify code that used CGAL_LINKED_WITH_TBB

This commit is contained in:
Mael Rouxel-Labbé 2019-11-20 12:24:54 +01:00
parent cb74e536f1
commit e73b973b62
52 changed files with 80 additions and 264 deletions

View File

@ -11,16 +11,12 @@
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Classification.h>
#include <CGAL/bounding_box.h>
#include <CGAL/tags.h>
#include <CGAL/IO/read_ply_points.h>
#include <CGAL/Real_timer.h>
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_3 Point;

View File

@ -18,11 +18,7 @@
#include <CGAL/Shape_detection/Region_growing.h>
#include <CGAL/Real_timer.h>
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_3 Point;

View File

@ -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).

View File

@ -225,7 +225,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 +241,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>
@ -309,7 +307,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 +322,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>
@ -395,7 +391,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 +404,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>

View File

@ -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

View File

@ -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>

View File

@ -334,7 +334,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
@ -424,7 +424,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
@ -502,7 +502,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

View File

@ -145,8 +145,9 @@ int main()
#ifdef CGAL_LINKED_WITH_TBB
Triangulation_3 T3;
fct3(T3);
fct3(T3);
#endif
return 0;
}

View File

@ -12,8 +12,8 @@ type to be used for the 3D triangulation embedding the mesh.
and defaults to `Kernel_traits<MD>::%Kernel`.
\tparam Concurrency_tag enables sequential versus parallel meshing and optimization algorithms.
Possible values are `Sequential_tag` (the default) and
`Parallel_tag`.
Possible values are `Sequential_tag` (the default), `Parallel_tag`,
and `Parallel_if_available_tag`.
\tparam Vertex_base must be a model of `MeshVertexBase_3` or `Default`
and defaults to `Mesh_vertex_base_3<Gt, MD>`.

View File

@ -16,12 +16,7 @@ typedef Kernel::Point_3 Point;
typedef boost::tuple<int, Point, int, int, int> IndexedPointWithColorTuple;
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
int main(int argc, char*argv[])
{

View File

@ -17,12 +17,7 @@ typedef Kernel::Vector_3 Vector;
typedef std::pair<Point, Vector> PointVectorPair;
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
int main(int argc, char*argv[])
{

View File

@ -18,12 +18,7 @@ typedef Kernel::Point_3 Point;
typedef CGAL::Random_points_on_sphere_3<Point> Generator;
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
// instance of std::function<bool(double)>
struct Progress_to_std_cerr_callback

View File

@ -16,12 +16,7 @@ typedef Kernel::Vector_3 Vector;
typedef std::pair<Point, Vector> PointVectorPair;
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
int main(int argc, char* argv[])
{

View File

@ -8,12 +8,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::Point_3 Point;
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
int main(void)
{

View File

@ -48,12 +48,7 @@ typedef std::pair<Point, Vector> PointVectorPair;
typedef std::vector<PointVectorPair> PointList;
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
// ----------------------------------------------------------------------------
// Private functions

View File

@ -18,11 +18,7 @@ typedef Kernel::Vector_3 Vector;
typedef std::pair<Point, Vector> PointVectorPair;
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
int main(int argc, char*argv[])
{

View File

@ -12,11 +12,7 @@
#include <fstream>
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
// Types
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;

View File

@ -12,11 +12,7 @@ typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_3 Point;
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
int main(int argc, char** argv)
{

View File

@ -349,9 +349,8 @@ public:
\pre Normals must be unit vectors
\pre k >= 2
\tparam ConcurrencyTag enables sequential versus parallel algorithm.
Possible values are `Sequential_tag`
And `Parallel_tag`.
\tparam ConcurrencyTag enables sequential versus parallel algorithm. Possible values are `Sequential_tag`,
`Parallel_tag`, and `Parallel_if_available_tag`.
\tparam PointRange is a model of `Range`. The value type of
its iterator is the key type of the named parameter `point_map`.

View File

@ -150,9 +150,8 @@ compute_average_spacing(const typename Kernel::Point_3& query, ///< 3D point who
\pre `k >= 2.`
\tparam ConcurrencyTag enables sequential versus parallel algorithm.
Possible values are `Sequential_tag`
and `Parallel_tag`.
\tparam ConcurrencyTag enables sequential versus parallel algorithm. Possible values are `Sequential_tag`,
`Parallel_tag`, and `Parallel_if_available_tag`.
\tparam PointRange is a model of `ConstRange`. The value type of
its iterator is the key type of the named parameter `point_map`.

View File

@ -280,8 +280,8 @@ update_new_point(
Normals of points are required as input. For more details, please refer to \cgalCite{ear-2013}.
\tparam ConcurrencyTag enables sequential versus parallel versions
of `compute_average_spacing()` (called internally). Possible
values are `Sequential_tag` and `Parallel_tag`.
of `compute_average_spacing()` (called internally). Possible
values are `Sequential_tag`, `Parallel_tag`, and `Parallel_if_available_tag`.
\tparam PointRange is a model of `ConstRange`. The value type of
its iterator is the key type of the named parameter `point_map`.
\tparam OutputIterator Type of the output iterator.

View File

@ -152,9 +152,8 @@ jet_estimate_normal(const typename Kernel::Point_3& query, ///< point to compute
\pre `k >= 2`
\tparam ConcurrencyTag enables sequential versus parallel algorithm.
Possible values are `Sequential_tag`
and `Parallel_tag`.
\tparam ConcurrencyTag enables sequential versus parallel algorithm. Possible values are `Sequential_tag`,
`Parallel_tag`, and `Parallel_if_available_tag`.
\tparam PointRange is a model of `Range`. The value type of
its iterator is the key type of the named parameter `point_map`.

View File

@ -156,9 +156,8 @@ jet_smooth_point(
\pre `k >= 2`
\tparam ConcurrencyTag enables sequential versus parallel algorithm.
Possible values are `Sequential_tag`
and `Parallel_tag`.
\tparam ConcurrencyTag enables sequential versus parallel algorithm. Possible values are `Sequential_tag`,
`Parallel_tag`, and `Parallel_if_available_tag`.
\tparam PointRange is a model of `Range`. The value type of
its iterator is the key type of the named parameter `point_map`.

View File

@ -142,9 +142,8 @@ pca_estimate_normal(const typename Kernel::Point_3& query, ///< point to compute
\pre `k >= 2`
\tparam ConcurrencyTag enables sequential versus parallel algorithm.
Possible values are `Sequential_tag`
and `Parallel_tag`.
\tparam ConcurrencyTag enables sequential versus parallel algorithm. Possible values are `Sequential_tag`,
`Parallel_tag`, and `Parallel_if_available_tag`.
\tparam PointRange is a model of `Range`. The value type of
its iterator is the key type of the named parameter `point_map`.

View File

@ -411,9 +411,8 @@ public:
See the <a href="https://www.threadingbuildingblocks.org/documentation">TBB documentation</a>
for more details.
\tparam ConcurrencyTag enables sequential versus parallel algorithm.
Possible values are `Sequential_tag`
and `Parallel_tag`.
\tparam ConcurrencyTag enables sequential versus parallel algorithm. Possible values are `Sequential_tag`,
`Parallel_tag`, and `Parallel_if_available_tag`.
\tparam PointRange is a model of `Range`. The value type of
its iterator is the key type of the named parameter `point_map`.
\tparam OutputIterator Type of the output iterator.

View File

@ -33,12 +33,7 @@ typedef Kernel::FT FT;
typedef Kernel::Point_3 Point;
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
// ----------------------------------------------------------------------------
// Tests

View File

@ -36,12 +36,7 @@ typedef Kernel::Vector_3 Vector;
typedef std::pair<Point, Vector> PointVectorPair;
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
// ----------------------------------------------------------------------------
// Tests

View File

@ -45,12 +45,7 @@ typedef CGAL::Point_with_normal_3<Kernel> Point_with_normal; // position + norma
typedef std::vector<Point_with_normal> PointList;
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
// ----------------------------------------------------------------------------
// Tests

View File

@ -36,11 +36,7 @@ typedef Kernel::Point_3 Point;
typedef Kernel::Vector_3 Vector;
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
// ----------------------------------------------------------------------------
// Tests

View File

@ -3,11 +3,7 @@
#include <CGAL/Polygon_mesh_processing/distance.h>
#include <CGAL/Polygon_mesh_processing/remesh.h>
#if defined(CGAL_LINKED_WITH_TBB)
#define TAG CGAL::Parallel_tag
#else
#define TAG CGAL::Sequential_tag
#endif
#define TAG CGAL::Parallel_if_available_tag
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_3 Point;

View File

@ -589,8 +589,7 @@ double approximate_Hausdorff_distance(
* for more details.
*
* @tparam Concurrency_tag enables sequential versus parallel algorithm.
* Possible values are `Sequential_tag`
* and `Parallel_tag`.
* Possible values are `Sequential_tag`, `Parallel_tag`, and `Parallel_if_available_tag`.
* @tparam TriangleMesh a model of the concept `FaceListGraph`
* @tparam NamedParameters1 a sequence of \ref pmp_namedparameters "Named Parameters" for `tm1`
* @tparam NamedParameters2 a sequence of \ref pmp_namedparameters "Named Parameters" for `tm2`

View File

@ -24,17 +24,10 @@
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
namespace CGAL {
namespace internal {
namespace internal {
/**
* Computes the confidences of the candidate faces.

View File

@ -15,12 +15,7 @@
#include <iostream>
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
class Cluster_classification : public Item_classification_base
{

View File

@ -16,13 +16,7 @@
#include <iostream>
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
// This class represents a point set in the OpenGL scene
class Point_set_item_classification : public Item_classification_base

View File

@ -16,11 +16,7 @@
#include <iostream>
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
class Surface_mesh_item_classification : public Item_classification_base
{

View File

@ -20,11 +20,7 @@
#include "run_with_qprogressdialog.h"
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
struct Compute_average_spacing_functor
: public Functor_with_signal_callback

View File

@ -21,11 +21,7 @@
#include "ui_Point_set_bilateral_smoothing_plugin.h"
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
struct Bilateral_smoothing_functor
: public Functor_with_signal_callback

View File

@ -16,11 +16,8 @@
#include <QMainWindow>
using namespace CGAL::Three;
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
class Point_set_interference_plugin:
public QObject,

View File

@ -25,11 +25,7 @@
#include "ui_Point_set_normal_estimation_plugin.h"
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
struct PCA_estimate_normals_functor
: public Functor_with_signal_callback

View File

@ -22,11 +22,7 @@
#include "ui_Point_set_simplification_plugin.h"
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
struct Compute_average_spacing_functor
: public Functor_with_signal_callback

View File

@ -15,11 +15,7 @@
#include "run_with_qprogressdialog.h"
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
struct Jet_smoothing_functor
: public Functor_with_signal_callback

View File

@ -19,12 +19,8 @@
#include "ui_Point_set_upsampling_plugin.h"
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
using namespace CGAL::Three;
class Polyhedron_demo_point_set_upsampling_plugin :
public QObject,

View File

@ -20,11 +20,7 @@
#include "ui_Point_set_wlop_plugin.h"
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
struct Compute_average_spacing_functor
: public Functor_with_signal_callback

View File

@ -25,14 +25,8 @@
#include "SMesh_type.h"
#include "Scene_points_with_normal_item.h"
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
template <typename Triangulation>
class Marching_tets

View File

@ -13,11 +13,7 @@
// Concurrency
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
typedef CGAL::Scale_space_surface_reconstruction_3<Kernel> ScaleSpace;
typedef CGAL::Scale_space_reconstruction_3::Advancing_front_mesher<Kernel> ScaleSpaceAFM;

View File

@ -38,23 +38,13 @@ class VSA_WRAPPER_EXPORT VSA_wrapper {
typedef boost::property_map<SMesh, Face_center_tag>::type Face_center_map;
typedef boost::property_map<SMesh, Face_area_tag>::type Face_area_map;
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Variational_shape_approximation<SMesh, Vertex_point_map,
CGAL::Default, EPICK, CGAL::Parallel_tag> L21_approx;
#else
typedef CGAL::Variational_shape_approximation<SMesh, Vertex_point_map,
CGAL::Default, EPICK> L21_approx;
#endif
CGAL::Default, EPICK, CGAL::Parallel_if_available_tag> L21_approx;
typedef L21_approx::Error_metric L21_metric;
typedef VSA::L2_metric_plane_proxy<SMesh> L2_metric;
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Variational_shape_approximation<SMesh, Vertex_point_map,
L2_metric, EPICK, CGAL::Parallel_tag> L2_approx;
#else
typedef CGAL::Variational_shape_approximation<SMesh, Vertex_point_map,
L2_metric, EPICK> L2_approx;
#endif
L2_metric, EPICK, CGAL::Parallel_if_available_tag> L2_approx;
// user defined point-wise compact metric
struct Compact_metric_point_proxy {
@ -89,14 +79,8 @@ class VSA_WRAPPER_EXPORT VSA_wrapper {
};
typedef Compact_metric_point_proxy Compact_metric;
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Variational_shape_approximation<SMesh, Vertex_point_map,
Compact_metric, EPICK, CGAL::Parallel_tag> Compact_approx;
#else
typedef CGAL::Variational_shape_approximation<SMesh, Vertex_point_map,
Compact_metric, EPICK> Compact_approx;
#endif
Compact_metric, EPICK, CGAL::Parallel_if_available_tag> Compact_approx;
public:
enum Metric { L21, L2, Compact };

View File

@ -7,12 +7,7 @@
#include "Callback_signaler.h"
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Parallel_tag Concurrency_tag;
#else
typedef CGAL::Sequential_tag Concurrency_tag;
#endif
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
class Signal_callback
{

View File

@ -63,7 +63,6 @@ typedef CGAL::Parallel_tag Parallel_if_available_tag;
#else
typedef CGAL::Sequential_tag Parallel_if_available_tag;
#endif
// A function that asserts a specific compile time tag
// forcing its two arguments to have equal type.

View File

@ -39,17 +39,15 @@ namespace Scale_space_reconstruction_3
* `RealEmbeddable` field number type. Generally,
* `Exact_predicates_inexact_constructions_kernel` is preferred.
* \tparam ConcurrencyTag indicates whether to use concurrent
* processing. It can be omitted: if TBB (or greater) is available
* processing. It can be omitted: if \ref thirdpartyTBB is available
* and `CGAL_LINKED_WITH_TBB` is defined then `Parallel_tag` is
* used. Otherwise, `Sequential_tag` is used.
*/
template <typename Geom_traits,
#ifdef DOXYGEN_RUNNING
typename ConcurrencyTag>
#elif CGAL_LINKED_WITH_TBB
typename ConcurrencyTag = CGAL::Parallel_tag>
#else
typename ConcurrencyTag = CGAL::Sequential_tag>
typename ConcurrencyTag = CGAL::Parallel_if_available_tag>
#endif
class Jet_smoother
{

View File

@ -55,21 +55,17 @@ namespace Scale_space_reconstruction_3
* that case, an overload using `Eigen_diagonalize_traits` is
* provided.
* \tparam ConcurrencyTag indicates whether to use concurrent
* processing. It can be omitted: if TBB (or greater) is available
* processing. It can be omitted: if \ref thirdpartyTBB is available
* and `CGAL_LINKED_WITH_TBB` is defined then `Parallel_tag` is
* used. Otherwise, `Sequential_tag` is used.
*/
template <typename Geom_traits,
#ifdef DOXYGEN_RUNNING
typename DiagonalizeTraits, typename ConcurrencyTag>
typename DiagonalizeTraits,
typename ConcurrencyTag>
#else // DOXYGEN_RUNNING
typename DiagonalizeTraits
= CGAL::Default_diagonalize_traits<typename Geom_traits::FT, 3>,
#ifdef CGAL_LINKED_WITH_TBB
typename ConcurrencyTag = CGAL::Parallel_tag>
#else
typename ConcurrencyTag = CGAL::Sequential_tag>
#endif // CGAL_LINKED_WITH_TBB
typename DiagonalizeTraits = CGAL::Default_diagonalize_traits<typename Geom_traits::FT, 3>,
typename ConcurrencyTag = CGAL::Parallel_if_available_tag>
#endif // DOXYGEN_RUNNING
class Weighted_PCA_smoother
{

View File

@ -26,7 +26,7 @@ They have the default values `Triangulation_ds_vertex_base_3<TDS>` and
The `Concurrency_tag` parameter allows to enable the use of a concurrent
container to store vertices and cells. It can be `Sequential_tag` (use of a
`Compact_container` to store vertices and cells) or `Parallel_tag`
`Compact_container` to store vertices and cells) or `Parallel_tag`
(use of a `Concurrent_compact_container`). If it is
`Parallel_tag`, the following functions can be called concurrently:
`create_vertex`, `create_cell`, `delete_vertex`, `delete_cell`.

View File

@ -111,7 +111,7 @@ typedef unspecified_type Vertex_handle;
typedef unspecified_type Cell_handle;
/*!
Can be `CGAL::Sequential_tag` or `CGAL::Parallel_tag`. If it is
Can be `CGAL::Sequential_tag`, `CGAL::Parallel_tag`, or `Parallel_if_available_tag`. If it is
`CGAL::Parallel_tag`, the following functions can be called concurrently:
`create_vertex`, `create_cell`, `delete_vertex`, `delete_cell`.
*/