mirror of https://github.com/CGAL/cgal
replace usages of CGAL::cpp11::atomic and thread by std:: calls
This commit is contained in:
parent
e9b7595fff
commit
3e03d50b8a
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
|
||||
#include <CGAL/Apollonius_graph_2/basic.h>
|
||||
#include <atomic>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -32,8 +33,8 @@ public:
|
|||
typedef bool bool_;
|
||||
typedef unsigned long long_;
|
||||
#else
|
||||
typedef CGAL::cpp11::atomic<bool> bool_;
|
||||
typedef CGAL::cpp11::atomic<unsigned long> long_;
|
||||
typedef std::atomic<bool> bool_;
|
||||
typedef std::atomic<unsigned long> long_;
|
||||
#endif
|
||||
|
||||
static bool_ count_cases;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
|
||||
#include <CGAL/Apollonius_graph_2/basic.h>
|
||||
#include <atomic>
|
||||
|
||||
#define AG2_PROFILE_PREDICATES
|
||||
|
||||
|
|
@ -32,7 +33,7 @@ public:
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
typedef unsigned long long_;
|
||||
#else
|
||||
typedef CGAL::cpp11::atomic<unsigned long> long_;
|
||||
typedef std::atomic<unsigned long> long_;
|
||||
#endif
|
||||
|
||||
// high level predicates
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <CGAL/Arr_geometry_traits/Circle_segment_2.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <atomic>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -79,7 +80,7 @@ public:
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
static unsigned int index;
|
||||
#else
|
||||
static CGAL::cpp11::atomic<unsigned int> index;
|
||||
static std::atomic<unsigned int> index;
|
||||
#endif
|
||||
return (++index);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#include <fstream>
|
||||
#include <atomic>
|
||||
|
||||
#include <CGAL/tags.h>
|
||||
#include <CGAL/Arr_tags.h>
|
||||
|
|
@ -107,7 +108,7 @@ public:
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
static unsigned int index;
|
||||
#else
|
||||
static CGAL::cpp11::atomic<unsigned int> index;
|
||||
static std::atomic<unsigned int> index;
|
||||
#endif
|
||||
return (++index);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <iostream>
|
||||
#include <string.h>
|
||||
#include <atomic>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_enums.h>
|
||||
|
|
@ -949,7 +950,7 @@ public:
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
static unsigned int counter;
|
||||
#else
|
||||
static CGAL::cpp11::atomic<unsigned int> counter;
|
||||
static std::atomic<size_t> counter;
|
||||
#endif
|
||||
if (doit) ++counter;
|
||||
return counter;
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -37,7 +38,7 @@ struct Unique_numbers {
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
static std::size_t n = 0;
|
||||
#else
|
||||
static CGAL::cpp11::atomic<std::size_t> n; // initialized to 0
|
||||
static std::atomic<std::size_t> n; // initialized to 0
|
||||
#endif
|
||||
i = n++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@
|
|||
#include <CGAL/CORE/extLong.h>
|
||||
#include <CGAL/disable_warnings.h>
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#ifdef CGAL_HEADER_ONLY
|
||||
|
||||
#define CGAL_GLOBAL_STATE_VAR(TYPE, NAME, VALUE) \
|
||||
|
|
@ -74,7 +76,7 @@ namespace CORE {
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
CGAL_GLOBAL_STATE_VAR(bool, AbortFlag, true)
|
||||
#else
|
||||
CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic<bool>, AbortFlag, true)
|
||||
CGAL_GLOBAL_STATE_VAR(std::atomic<bool>, AbortFlag, true)
|
||||
#endif
|
||||
|
||||
/// Invalid Flag -- initiallly value is non-negative
|
||||
|
|
@ -85,7 +87,7 @@ CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic<bool>, AbortFlag, true)
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
CGAL_GLOBAL_STATE_VAR(int, InvalidFlag, 0)
|
||||
#else
|
||||
CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic<int>, InvalidFlag, 0)
|
||||
CGAL_GLOBAL_STATE_VAR(std::atomic<int>, InvalidFlag, 0)
|
||||
#endif
|
||||
|
||||
/// Escape Precision in bits
|
||||
|
|
@ -101,7 +103,7 @@ CGAL_GLOBAL_STATE_VAR(long, EscapePrecFlag, 0)
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
CGAL_GLOBAL_STATE_VAR(bool, EscapePrecWarning, true)
|
||||
#else
|
||||
CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic<bool>, EscapePrecWarning, true)
|
||||
CGAL_GLOBAL_STATE_VAR(std::atomic<bool>, EscapePrecWarning, true)
|
||||
#endif
|
||||
|
||||
// These following two values determine the precision of computing
|
||||
|
|
@ -123,7 +125,7 @@ CGAL_GLOBAL_STATE_VAR(extLong, defAbsPrec, CORE_posInfty)
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
CGAL_GLOBAL_STATE_VAR(long, defBigFloatOutputDigits, 10)
|
||||
#else
|
||||
CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic<long>, defBigFloatOutputDigits, 10)
|
||||
CGAL_GLOBAL_STATE_VAR(std::atomic<long>, defBigFloatOutputDigits, 10)
|
||||
#endif
|
||||
|
||||
/// default input precision in digits for converting a string to a Real or Expr
|
||||
|
|
@ -137,7 +139,7 @@ CGAL_GLOBAL_STATE_VAR(extLong, defInputDigits, CORE_posInfty)
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
CGAL_GLOBAL_STATE_VAR(long, defOutputDigits, 10) // == get_static_defBigFloatOutputDigits()
|
||||
#else
|
||||
CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic<long>, defOutputDigits, 10) // == get_static_defBigFloatOutputDigits()
|
||||
CGAL_GLOBAL_STATE_VAR(std::atomic<long>, defOutputDigits, 10) // == get_static_defBigFloatOutputDigits()
|
||||
#endif
|
||||
|
||||
/// default input precision in digits for converting a string to a BigFloat
|
||||
|
|
@ -145,7 +147,7 @@ CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic<long>, defOutputDigits, 10) // == get_
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
CGAL_GLOBAL_STATE_VAR(long, defBigFloatInputDigits, 16)
|
||||
#else
|
||||
CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic<long>, defBigFloatInputDigits, 16)
|
||||
CGAL_GLOBAL_STATE_VAR(std::atomic<long>, defBigFloatInputDigits, 16)
|
||||
#endif
|
||||
|
||||
inline
|
||||
|
|
@ -168,7 +170,7 @@ CGAL_GLOBAL_STATE_VAR(extLong, defBFsqrtAbsPrec, 54)
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
CGAL_GLOBAL_STATE_VAR(bool, fpFilterFlag, true)
|
||||
#else
|
||||
CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic<bool>, fpFilterFlag, true)
|
||||
CGAL_GLOBAL_STATE_VAR(std::atomic<bool>, fpFilterFlag, true)
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -176,7 +178,7 @@ CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic<bool>, fpFilterFlag, true)
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
CGAL_GLOBAL_STATE_VAR(bool, incrementalEvalFlag, true)
|
||||
#else
|
||||
CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic<bool>, incrementalEvalFlag, true)
|
||||
CGAL_GLOBAL_STATE_VAR(std::atomic<bool>, incrementalEvalFlag, true)
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -184,7 +186,7 @@ CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic<bool>, incrementalEvalFlag, true)
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
CGAL_GLOBAL_STATE_VAR(bool, progressiveEvalFlag, true)
|
||||
#else
|
||||
CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic<bool>, progressiveEvalFlag, true)
|
||||
CGAL_GLOBAL_STATE_VAR(std::atomic<bool>, progressiveEvalFlag, true)
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -192,14 +194,14 @@ CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic<bool>, progressiveEvalFlag, true)
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
CGAL_GLOBAL_STATE_VAR(bool, rationalReduceFlag, false)
|
||||
#else
|
||||
CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic<bool>, rationalReduceFlag, false)
|
||||
CGAL_GLOBAL_STATE_VAR(std::atomic<bool>, rationalReduceFlag, false)
|
||||
#endif
|
||||
|
||||
/// default initial (bit) precision for AddSub Progressive Evaluation
|
||||
#ifdef CGAL_NO_ATOMIC
|
||||
CGAL_GLOBAL_STATE_VAR(long, defInitialProgressivePrec, 64)
|
||||
#else
|
||||
CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic<long>, defInitialProgressivePrec, 64)
|
||||
CGAL_GLOBAL_STATE_VAR(std::atomic<long>, defInitialProgressivePrec, 64)
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
#include "CGAL/CORE/CoreDefs.h"
|
||||
|
||||
#include <atomic>
|
||||
|
||||
namespace CORE {
|
||||
|
||||
// Default Values
|
||||
|
|
@ -50,7 +52,7 @@ int IOErrorFlag = 0;
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
bool AbortFlag = true;
|
||||
#else
|
||||
CGAL::cpp11::atomic<bool> AbortFlag(true);
|
||||
std::atomic<bool> AbortFlag(true);
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
@ -61,7 +63,7 @@ CGAL::cpp11::atomic<bool> AbortFlag(true);
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
int InvalidFlag = 0;
|
||||
#else
|
||||
CGAL::cpp11::atomic<int> InvalidFlag(0);
|
||||
std::atomic<int> InvalidFlag(0);
|
||||
#endif
|
||||
|
||||
/* ************************************************************
|
||||
|
|
@ -97,7 +99,7 @@ long EscapePrecFlag = 0;
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
bool EscapePrecWarning = true;
|
||||
#else
|
||||
CGAL::cpp11::atomic<bool> EscapePrecWarning(true);
|
||||
std::atomic<bool> EscapePrecWarning(true);
|
||||
#endif
|
||||
|
||||
/** The Composite Precision [defAbsPrec, defRelPrec]
|
||||
|
|
@ -117,7 +119,7 @@ extLong defRelPrec = 60;
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
long defBigFloatOutputDigits = 10;
|
||||
#else
|
||||
CGAL::cpp11::atomic<long> defBigFloatOutputDigits(10);
|
||||
std::atomic<long> defBigFloatOutputDigits(10);
|
||||
#endif
|
||||
|
||||
/** NORMALLY, we like to make this equal to defBigFloatOutputDigits
|
||||
|
|
@ -125,7 +127,7 @@ CGAL::cpp11::atomic<long> defBigFloatOutputDigits(10);
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
long defOutputDigits = 10;
|
||||
#else
|
||||
CGAL::cpp11::atomic<long> defOutputDigits(10); // == defBigFloatOutputDigits;
|
||||
std::atomic<long> defOutputDigits(10); // == defBigFloatOutputDigits;
|
||||
#endif
|
||||
|
||||
/** String Input Precision */
|
||||
|
|
@ -142,7 +144,7 @@ extLong defInputDigits = CORE_posInfty;
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
long defBigFloatInputDigits = 16;
|
||||
#else
|
||||
CGAL::cpp11::atomic<long> defBigFloatInputDigits(16);
|
||||
std::atomic<long> defBigFloatInputDigits(16);
|
||||
#endif
|
||||
|
||||
/* ************************************************************
|
||||
|
|
@ -154,7 +156,7 @@ CGAL::cpp11::atomic<long> defBigFloatInputDigits(16);
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
bool fpFilterFlag = true;
|
||||
#else
|
||||
CGAL::cpp11::atomic<bool> fpFilterFlag(true);
|
||||
std::atomic<bool> fpFilterFlag(true);
|
||||
#endif
|
||||
|
||||
/** IncrementaL evaluation flag
|
||||
|
|
@ -163,7 +165,7 @@ CGAL::cpp11::atomic<bool> fpFilterFlag(true);
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
bool incrementalEvalFlag = true;
|
||||
#else
|
||||
CGAL::cpp11::atomic<bool> incrementalEvalFlag(true);
|
||||
std::atomic<bool> incrementalEvalFlag(true);
|
||||
#endif
|
||||
|
||||
/** Progressive evaluation flag
|
||||
|
|
@ -171,7 +173,7 @@ CGAL::cpp11::atomic<bool> incrementalEvalFlag(true);
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
bool progressiveEvalFlag = true;
|
||||
#else
|
||||
CGAL::cpp11::atomic<bool> progressiveEvalFlag(true);
|
||||
std::atomic<bool> progressiveEvalFlag(true);
|
||||
#endif
|
||||
|
||||
/** Initial progressive evaluation precision
|
||||
|
|
@ -179,7 +181,7 @@ CGAL::cpp11::atomic<bool> progressiveEvalFlag(true);
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
long defInitialProgressivePrec = 64;
|
||||
#else
|
||||
CGAL::cpp11::atomic<long> defInitialProgressivePrec(64);
|
||||
std::atomic<long> defInitialProgressivePrec(64);
|
||||
#endif
|
||||
|
||||
/** RATIONAL REDUCTION FLAG
|
||||
|
|
@ -187,7 +189,7 @@ CGAL::cpp11::atomic<long> defInitialProgressivePrec(64);
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
bool rationalReduceFlag = false;
|
||||
#else
|
||||
CGAL::cpp11::atomic<bool> rationalReduceFlag(false);
|
||||
std::atomic<bool> rationalReduceFlag(false);
|
||||
#endif
|
||||
#endif // CGAL_HEADER_ONLY
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@
|
|||
#include <boost/format.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <string>
|
||||
#include <atomic>
|
||||
|
||||
namespace CGAL {
|
||||
namespace Mesh_3 {
|
||||
|
|
@ -212,7 +213,7 @@ public:
|
|||
std::size_t maximal_number_of_vertices = 0,
|
||||
Mesh_error_code* error_code = 0
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
, CGAL::cpp11::atomic<bool>* stop_ptr = 0
|
||||
, std::atomic<bool>* stop_ptr = 0
|
||||
#endif
|
||||
);
|
||||
|
||||
|
|
@ -284,7 +285,7 @@ private:
|
|||
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
/// Pointer to the atomic Boolean that can stop the process
|
||||
CGAL::cpp11::atomic<bool>* const stop_ptr;
|
||||
std::atomic<bool>* const stop_ptr;
|
||||
#endif
|
||||
|
||||
#ifdef CGAL_LINKED_WITH_TBB
|
||||
|
|
@ -343,7 +344,7 @@ Mesher_3<C3T3,MC,MD>::Mesher_3(C3T3& c3t3,
|
|||
std::size_t maximal_number_of_vertices,
|
||||
Mesh_error_code* error_code
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
, CGAL::cpp11::atomic<bool>* stop_ptr
|
||||
, std::atomic<bool>* stop_ptr
|
||||
#endif
|
||||
)
|
||||
: Base(c3t3.bbox(),
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
# include <tbb/task.h>
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <atomic>
|
||||
|
||||
namespace CGAL { namespace Mesh_3 {
|
||||
|
||||
|
|
@ -676,7 +676,7 @@ public:
|
|||
void set_lock_ds(Lock_data_structure *) {}
|
||||
void set_worksharing_ds(WorksharingDataStructureType *) {}
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
void set_stop_pointer(CGAL::cpp11::atomic<bool>*) {}
|
||||
void set_stop_pointer(std::atomic<bool>*) {}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
|
@ -1148,7 +1148,7 @@ public:
|
|||
}
|
||||
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
void set_stop_pointer(CGAL::cpp11::atomic<bool>* stop_ptr)
|
||||
void set_stop_pointer(std::atomic<bool>* stop_ptr)
|
||||
{
|
||||
m_stop_ptr = stop_ptr;
|
||||
}
|
||||
|
|
@ -1178,7 +1178,7 @@ protected:
|
|||
|
||||
tbb::task *m_empty_root_task;
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
CGAL::cpp11::atomic<bool>* m_stop_ptr;
|
||||
std::atomic<bool>* m_stop_ptr;
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@
|
|||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <atomic>
|
||||
|
||||
namespace CGAL {
|
||||
namespace Mesh_3 {
|
||||
|
|
@ -143,7 +144,7 @@ public:
|
|||
std::size_t maximal_number_of_vertices = 0,
|
||||
Mesh_error_code* error_code = 0
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
, CGAL::cpp11::atomic<bool>* stop_ptr = 0
|
||||
, std::atomic<bool>* stop_ptr = 0
|
||||
#endif
|
||||
);
|
||||
|
||||
|
|
@ -469,7 +470,7 @@ private:
|
|||
Mesh_error_code* const error_code_;
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
/// Pointer to the atomic Boolean that can stop the process
|
||||
CGAL::cpp11::atomic<bool>* const stop_ptr_;
|
||||
std::atomic<bool>* const stop_ptr_;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
@ -481,7 +482,7 @@ Protect_edges_sizing_field(C3T3& c3t3, const MD& domain,
|
|||
std::size_t maximal_number_of_vertices,
|
||||
Mesh_error_code* error_code
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
, CGAL::cpp11::atomic<bool>* stop_ptr
|
||||
, std::atomic<bool>* stop_ptr
|
||||
#endif
|
||||
)
|
||||
: c3t3_(c3t3)
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <sstream>
|
||||
|
||||
#include <atomic>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -318,7 +318,7 @@ public:
|
|||
C3T3& c3t3,
|
||||
std::size_t maximal_number_of_vertices
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
, CGAL::cpp11::atomic<bool>* stop_ptr
|
||||
, std::atomic<bool>* stop_ptr
|
||||
#endif
|
||||
);
|
||||
// For parallel
|
||||
|
|
@ -331,7 +331,7 @@ public:
|
|||
WorksharingDataStructureType *worksharing_ds,
|
||||
std::size_t maximal_number_of_vertices
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
, CGAL::cpp11::atomic<bool>* stop_ptr
|
||||
, std::atomic<bool>* stop_ptr
|
||||
#endif
|
||||
);
|
||||
|
||||
|
|
@ -572,7 +572,7 @@ private:
|
|||
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
/// Pointer to the atomic Boolean that can stop the process
|
||||
CGAL::cpp11::atomic<bool>* const m_stop_ptr;
|
||||
std::atomic<bool>* const m_stop_ptr;
|
||||
#endif
|
||||
private:
|
||||
// Disabled copy constructor
|
||||
|
|
@ -594,7 +594,7 @@ Refine_cells_3(Tr& triangulation,
|
|||
C3T3& c3t3,
|
||||
std::size_t maximal_number_of_vertices
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
, CGAL::cpp11::atomic<bool>* stop_ptr
|
||||
, std::atomic<bool>* stop_ptr
|
||||
#endif
|
||||
)
|
||||
: Mesher_level<Tr, Self, Cell_handle, P_,
|
||||
|
|
@ -627,7 +627,7 @@ Refine_cells_3(Tr& triangulation,
|
|||
WorksharingDataStructureType *worksharing_ds,
|
||||
std::size_t maximal_number_of_vertices
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
, CGAL::cpp11::atomic<bool>* stop_ptr
|
||||
, std::atomic<bool>* stop_ptr
|
||||
#endif
|
||||
)
|
||||
: Mesher_level<Tr, Self, Cell_handle, P_,
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
#include <CGAL/tuple.h>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <sstream>
|
||||
#include <atomic>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -254,7 +255,7 @@ public:
|
|||
const Criteria& criteria,
|
||||
std::size_t maximal_number_of_vertices
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
, CGAL::cpp11::atomic<bool>* stop_ptr
|
||||
, std::atomic<bool>* stop_ptr
|
||||
#endif
|
||||
)
|
||||
: r_tr_(tr)
|
||||
|
|
@ -608,7 +609,7 @@ protected:
|
|||
std::size_t m_maximal_number_of_vertices_;
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
/// Pointer to the atomic Boolean that can stop the process
|
||||
CGAL::cpp11::atomic<bool>* const m_stop_ptr;
|
||||
std::atomic<bool>* const m_stop_ptr;
|
||||
#endif
|
||||
}; // end class template Refine_facets_3_base
|
||||
|
||||
|
|
@ -776,7 +777,7 @@ public:
|
|||
int mesh_topology,
|
||||
std::size_t maximal_number_of_vertices
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
, CGAL::cpp11::atomic<bool>* stop_ptr
|
||||
, std::atomic<bool>* stop_ptr
|
||||
#endif
|
||||
);
|
||||
// For parallel
|
||||
|
|
@ -789,7 +790,7 @@ public:
|
|||
WorksharingDataStructureType *worksharing_ds,
|
||||
std::size_t maximal_number_of_vertices
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
, CGAL::cpp11::atomic<bool>* stop_ptr
|
||||
, std::atomic<bool>* stop_ptr
|
||||
#endif
|
||||
);
|
||||
|
||||
|
|
@ -909,7 +910,7 @@ Refine_facets_3(Tr& triangulation,
|
|||
int mesh_topology,
|
||||
std::size_t maximal_number_of_vertices
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
, CGAL::cpp11::atomic<bool>* stop_ptr
|
||||
, std::atomic<bool>* stop_ptr
|
||||
#endif
|
||||
)
|
||||
: Rf_base(triangulation, c3t3, oracle, criteria, mesh_topology,
|
||||
|
|
@ -938,7 +939,7 @@ Refine_facets_3(Tr& triangulation,
|
|||
WorksharingDataStructureType *worksharing_ds,
|
||||
std::size_t maximal_number_of_vertices
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
, CGAL::cpp11::atomic<bool>* stop_ptr
|
||||
, std::atomic<bool>* stop_ptr
|
||||
#endif
|
||||
)
|
||||
: Rf_base(triangulation, c3t3, oracle, criteria, maximal_number_of_vertices
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#include <atomic>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -307,7 +308,7 @@ public:
|
|||
int mesh_topology,
|
||||
std::size_t maximal_number_of_vertices
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
, CGAL::cpp11::atomic<bool>* stop_ptr
|
||||
, std::atomic<bool>* stop_ptr
|
||||
#endif
|
||||
)
|
||||
: Base(triangulation,
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@
|
|||
#include <boost/mpl/has_xxx.hpp>
|
||||
#include <boost/parameter/preprocessor.hpp>
|
||||
|
||||
#include <atomic>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
namespace parameters {
|
||||
|
|
@ -192,7 +194,7 @@ void init_c3t3_with_features(C3T3& c3t3,
|
|||
std::size_t maximal_number_of_vertices = 0,
|
||||
Mesh_error_code* pointer_to_error_code = 0
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
, CGAL::cpp11::atomic<bool>* pointer_to_stop = 0
|
||||
, std::atomic<bool>* pointer_to_stop = 0
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@
|
|||
|
||||
#include <boost/parameter/preprocessor.hpp>
|
||||
|
||||
#include <atomic>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
namespace details {
|
||||
|
|
@ -195,7 +197,7 @@ struct Manifold_options {
|
|||
// Various Mesh_3 option
|
||||
struct Mesh_3_options {
|
||||
#ifndef CGAL_NO_ATOMIC
|
||||
typedef CGAL::cpp11::atomic<bool>* Pointer_to_stop_atomic_boolean_t;
|
||||
typedef std::atomic<bool>* Pointer_to_stop_atomic_boolean_t;
|
||||
#else
|
||||
typedef bool* Pointer_to_stop_atomic_boolean_t;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
#include <CGAL/Nef_3/SHalfloop.h>
|
||||
#include <CGAL/Nef_3/SFace.h>
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#undef CGAL_NEF_DEBUG
|
||||
#define CGAL_NEF_DEBUG 83
|
||||
#include <CGAL/Nef_2/debug.h>
|
||||
|
|
@ -39,7 +41,7 @@ class Index_generator {
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
static int unique;
|
||||
#else
|
||||
static CGAL::cpp11::atomic<int> unique;
|
||||
static std::atomic<int> unique;
|
||||
#endif
|
||||
return unique++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include <CGAL/number_type_basic.h>
|
||||
#include <CGAL/boost/iterator/transform_iterator.hpp> // for Root_of_selector
|
||||
#include <iostream>
|
||||
#include <atomic>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -29,7 +30,7 @@ class Counted_number {
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
static unsigned long
|
||||
#else
|
||||
static CGAL::cpp11::atomic<unsigned long>
|
||||
static std::atomic<unsigned long>
|
||||
#endif
|
||||
s_neg_count, s_add_count, s_sub_count,
|
||||
s_mul_count, s_div_count,
|
||||
|
|
@ -279,64 +280,64 @@ template< class NT >
|
|||
unsigned long Counted_number<NT>::s_mod_count = 0;
|
||||
#else
|
||||
template <class NT>
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_neg_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_neg_count;
|
||||
|
||||
template <class NT>
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_add_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_add_count;
|
||||
|
||||
template <class NT>
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_sub_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_sub_count;
|
||||
|
||||
template <class NT>
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_mul_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_mul_count;
|
||||
|
||||
template <class NT>
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_div_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_div_count;
|
||||
|
||||
template <class NT>
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_eq_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_eq_count;
|
||||
|
||||
template <class NT>
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_comp_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_comp_count;
|
||||
|
||||
template< class NT >
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_simplify_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_simplify_count;
|
||||
|
||||
template< class NT >
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_unit_part_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_unit_part_count;
|
||||
|
||||
template< class NT >
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_is_zero_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_is_zero_count;
|
||||
|
||||
template< class NT >
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_is_one_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_is_one_count;
|
||||
|
||||
template< class NT >
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_square_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_square_count;
|
||||
|
||||
template< class NT >
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_integral_division_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_integral_division_count;
|
||||
|
||||
template< class NT >
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_is_square_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_is_square_count;
|
||||
|
||||
template< class NT >
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_sqrt_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_sqrt_count;
|
||||
|
||||
template< class NT >
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_kth_root_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_kth_root_count;
|
||||
|
||||
template< class NT >
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_root_of_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_root_of_count;
|
||||
|
||||
template< class NT >
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_gcd_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_gcd_count;
|
||||
|
||||
template< class NT >
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_div_mod_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_div_mod_count;
|
||||
|
||||
template< class NT >
|
||||
CGAL::cpp11::atomic<unsigned long> Counted_number<NT>::s_mod_count;
|
||||
std::atomic<unsigned long> Counted_number<NT>::s_mod_count;
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
#include "Callback_signaler.h"
|
||||
|
||||
#include <atomic>
|
||||
|
||||
typedef CGAL::Parallel_if_available_tag Concurrency_tag;
|
||||
|
||||
class Signal_callback
|
||||
|
|
@ -111,7 +113,7 @@ void run_with_qprogressdialog (Functor& functor,
|
|||
#ifdef CGAL_HAS_STD_THREADS
|
||||
if (boost::is_convertible<ConcurrencyTag, CGAL::Parallel_tag>::value)
|
||||
{
|
||||
CGAL::cpp11::thread thread (functor);
|
||||
std::thread thread (functor);
|
||||
|
||||
while (*signal_callback->latest_adv != 1. &&
|
||||
*signal_callback->state)
|
||||
|
|
|
|||
Loading…
Reference in New Issue