diff --git a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/comparator_profiler.h b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/comparator_profiler.h index fc95d4bf1b1..4395c25a54b 100644 --- a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/comparator_profiler.h +++ b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/comparator_profiler.h @@ -19,6 +19,7 @@ #include +#include namespace CGAL { @@ -32,8 +33,8 @@ public: typedef bool bool_; typedef unsigned long long_; #else - typedef CGAL::cpp11::atomic bool_; - typedef CGAL::cpp11::atomic long_; + typedef std::atomic bool_; + typedef std::atomic long_; #endif static bool_ count_cases; diff --git a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/predicate_profiler.h b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/predicate_profiler.h index b2b7b93e33d..cf78798b185 100644 --- a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/predicate_profiler.h +++ b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/predicate_profiler.h @@ -19,6 +19,7 @@ #include +#include #define AG2_PROFILE_PREDICATES @@ -32,7 +33,7 @@ public: #ifdef CGAL_NO_ATOMIC typedef unsigned long long_; #else - typedef CGAL::cpp11::atomic long_; + typedef std::atomic long_; #endif // high level predicates diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h index 8155e8b2cdd..dfa5bf667d0 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h @@ -28,6 +28,7 @@ #include #include +#include namespace CGAL { @@ -79,7 +80,7 @@ public: #ifdef CGAL_NO_ATOMIC static unsigned int index; #else - static CGAL::cpp11::atomic index; + static std::atomic index; #endif return (++index); } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h index 89b758557db..079ba7d1d04 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h @@ -23,6 +23,7 @@ */ #include +#include #include #include @@ -107,7 +108,7 @@ public: #ifdef CGAL_NO_ATOMIC static unsigned int index; #else - static CGAL::cpp11::atomic index; + static std::atomic index; #endif return (++index); } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h index 642ba527cd5..2a745798ec4 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -949,7 +950,7 @@ public: #ifdef CGAL_NO_ATOMIC static unsigned int counter; #else - static CGAL::cpp11::atomic counter; + static std::atomic counter; #endif if (doit) ++counter; return counter; diff --git a/Box_intersection_d/include/CGAL/Box_intersection_d/Box_d.h b/Box_intersection_d/include/CGAL/Box_intersection_d/Box_d.h index 7b0b74f5679..ddadb14852e 100644 --- a/Box_intersection_d/include/CGAL/Box_intersection_d/Box_d.h +++ b/Box_intersection_d/include/CGAL/Box_intersection_d/Box_d.h @@ -24,6 +24,7 @@ #include #include +#include namespace CGAL { @@ -37,7 +38,7 @@ struct Unique_numbers { #ifdef CGAL_NO_ATOMIC static std::size_t n = 0; #else - static CGAL::cpp11::atomic n; // initialized to 0 + static std::atomic n; // initialized to 0 #endif i = n++; } diff --git a/CGAL_Core/include/CGAL/CORE/CoreDefs.h b/CGAL_Core/include/CGAL/CORE/CoreDefs.h index 22cde3a4a31..57c3da34645 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreDefs.h +++ b/CGAL_Core/include/CGAL/CORE/CoreDefs.h @@ -31,6 +31,8 @@ #include #include +#include + #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, AbortFlag, true) +CGAL_GLOBAL_STATE_VAR(std::atomic, AbortFlag, true) #endif /// Invalid Flag -- initiallly value is non-negative @@ -85,7 +87,7 @@ CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic, AbortFlag, true) #ifdef CGAL_NO_ATOMIC CGAL_GLOBAL_STATE_VAR(int, InvalidFlag, 0) #else -CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic, InvalidFlag, 0) +CGAL_GLOBAL_STATE_VAR(std::atomic, 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, EscapePrecWarning, true) +CGAL_GLOBAL_STATE_VAR(std::atomic, 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, defBigFloatOutputDigits, 10) + CGAL_GLOBAL_STATE_VAR(std::atomic, 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, defOutputDigits, 10) // == get_static_defBigFloatOutputDigits() +CGAL_GLOBAL_STATE_VAR(std::atomic, 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, defOutputDigits, 10) // == get_ #ifdef CGAL_NO_ATOMIC CGAL_GLOBAL_STATE_VAR(long, defBigFloatInputDigits, 16) #else -CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic, defBigFloatInputDigits, 16) +CGAL_GLOBAL_STATE_VAR(std::atomic, 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, fpFilterFlag, true) +CGAL_GLOBAL_STATE_VAR(std::atomic, fpFilterFlag, true) #endif @@ -176,7 +178,7 @@ CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic, fpFilterFlag, true) #ifdef CGAL_NO_ATOMIC CGAL_GLOBAL_STATE_VAR(bool, incrementalEvalFlag, true) #else -CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic, incrementalEvalFlag, true) +CGAL_GLOBAL_STATE_VAR(std::atomic, incrementalEvalFlag, true) #endif @@ -184,7 +186,7 @@ CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic, incrementalEvalFlag, true) #ifdef CGAL_NO_ATOMIC CGAL_GLOBAL_STATE_VAR(bool, progressiveEvalFlag, true) #else -CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic, progressiveEvalFlag, true) +CGAL_GLOBAL_STATE_VAR(std::atomic, progressiveEvalFlag, true) #endif @@ -192,14 +194,14 @@ CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic, progressiveEvalFlag, true) #ifdef CGAL_NO_ATOMIC CGAL_GLOBAL_STATE_VAR(bool, rationalReduceFlag, false) #else -CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic, rationalReduceFlag, false) +CGAL_GLOBAL_STATE_VAR(std::atomic, 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, defInitialProgressivePrec, 64) +CGAL_GLOBAL_STATE_VAR(std::atomic, defInitialProgressivePrec, 64) #endif ////////////////////////////////////////////////////////////// diff --git a/CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h b/CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h index b7436178b0a..d28326496f3 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h +++ b/CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h @@ -24,6 +24,8 @@ #include "CGAL/CORE/CoreDefs.h" +#include + namespace CORE { // Default Values @@ -50,7 +52,7 @@ int IOErrorFlag = 0; #ifdef CGAL_NO_ATOMIC bool AbortFlag = true; #else -CGAL::cpp11::atomic AbortFlag(true); +std::atomic AbortFlag(true); #endif /** @@ -61,7 +63,7 @@ CGAL::cpp11::atomic AbortFlag(true); #ifdef CGAL_NO_ATOMIC int InvalidFlag = 0; #else -CGAL::cpp11::atomic InvalidFlag(0); +std::atomic InvalidFlag(0); #endif /* ************************************************************ @@ -97,7 +99,7 @@ long EscapePrecFlag = 0; #ifdef CGAL_NO_ATOMIC bool EscapePrecWarning = true; #else -CGAL::cpp11::atomic EscapePrecWarning(true); +std::atomic 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 defBigFloatOutputDigits(10); +std::atomic defBigFloatOutputDigits(10); #endif /** NORMALLY, we like to make this equal to defBigFloatOutputDigits @@ -125,7 +127,7 @@ CGAL::cpp11::atomic defBigFloatOutputDigits(10); #ifdef CGAL_NO_ATOMIC long defOutputDigits = 10; #else -CGAL::cpp11::atomic defOutputDigits(10); // == defBigFloatOutputDigits; +std::atomic 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 defBigFloatInputDigits(16); +std::atomic defBigFloatInputDigits(16); #endif /* ************************************************************ @@ -154,7 +156,7 @@ CGAL::cpp11::atomic defBigFloatInputDigits(16); #ifdef CGAL_NO_ATOMIC bool fpFilterFlag = true; #else -CGAL::cpp11::atomic fpFilterFlag(true); +std::atomic fpFilterFlag(true); #endif /** IncrementaL evaluation flag @@ -163,7 +165,7 @@ CGAL::cpp11::atomic fpFilterFlag(true); #ifdef CGAL_NO_ATOMIC bool incrementalEvalFlag = true; #else -CGAL::cpp11::atomic incrementalEvalFlag(true); +std::atomic incrementalEvalFlag(true); #endif /** Progressive evaluation flag @@ -171,7 +173,7 @@ CGAL::cpp11::atomic incrementalEvalFlag(true); #ifdef CGAL_NO_ATOMIC bool progressiveEvalFlag = true; #else -CGAL::cpp11::atomic progressiveEvalFlag(true); +std::atomic progressiveEvalFlag(true); #endif /** Initial progressive evaluation precision @@ -179,7 +181,7 @@ CGAL::cpp11::atomic progressiveEvalFlag(true); #ifdef CGAL_NO_ATOMIC long defInitialProgressivePrec = 64; #else -CGAL::cpp11::atomic defInitialProgressivePrec(64); +std::atomic defInitialProgressivePrec(64); #endif /** RATIONAL REDUCTION FLAG @@ -187,7 +189,7 @@ CGAL::cpp11::atomic defInitialProgressivePrec(64); #ifdef CGAL_NO_ATOMIC bool rationalReduceFlag = false; #else -CGAL::cpp11::atomic rationalReduceFlag(false); +std::atomic rationalReduceFlag(false); #endif #endif // CGAL_HEADER_ONLY diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h index 718a730032d..1b50447e088 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h @@ -55,6 +55,7 @@ #include #include #include +#include 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* stop_ptr = 0 + , std::atomic* 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* const stop_ptr; + std::atomic* const stop_ptr; #endif #ifdef CGAL_LINKED_WITH_TBB @@ -343,7 +344,7 @@ Mesher_3::Mesher_3(C3T3& c3t3, std::size_t maximal_number_of_vertices, Mesh_error_code* error_code #ifndef CGAL_NO_ATOMIC - , CGAL::cpp11::atomic* stop_ptr + , std::atomic* stop_ptr #endif ) : Base(c3t3.bbox(), diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesher_level.h b/Mesh_3/include/CGAL/Mesh_3/Mesher_level.h index 2da097ef8a5..77b1836df6a 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesher_level.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesher_level.h @@ -36,7 +36,7 @@ # include #endif -#include +#include 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*) {} + void set_stop_pointer(std::atomic*) {} #endif protected: @@ -1148,7 +1148,7 @@ public: } #ifndef CGAL_NO_ATOMIC - void set_stop_pointer(CGAL::cpp11::atomic* stop_ptr) + void set_stop_pointer(std::atomic* 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* m_stop_ptr; + std::atomic* m_stop_ptr; #endif private: diff --git a/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h b/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h index 0a5826774bd..fb0da075047 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h +++ b/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h @@ -70,6 +70,7 @@ #include #include #include +#include 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* stop_ptr = 0 + , std::atomic* 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* const stop_ptr_; + std::atomic* 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* stop_ptr + , std::atomic* stop_ptr #endif ) : c3t3_(c3t3) diff --git a/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h b/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h index 30726de2fcc..6a234a15311 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h @@ -40,7 +40,7 @@ #include #include #include - +#include namespace CGAL { @@ -318,7 +318,7 @@ public: C3T3& c3t3, std::size_t maximal_number_of_vertices #ifndef CGAL_NO_ATOMIC - , CGAL::cpp11::atomic* stop_ptr + , std::atomic* 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* stop_ptr + , std::atomic* 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* const m_stop_ptr; + std::atomic* 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* stop_ptr + , std::atomic* stop_ptr #endif ) : Mesher_level* stop_ptr + , std::atomic* stop_ptr #endif ) : Mesher_level #include #include +#include namespace CGAL { @@ -254,7 +255,7 @@ public: const Criteria& criteria, std::size_t maximal_number_of_vertices #ifndef CGAL_NO_ATOMIC - , CGAL::cpp11::atomic* stop_ptr + , std::atomic* 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* const m_stop_ptr; + std::atomic* 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* stop_ptr + , std::atomic* 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* stop_ptr + , std::atomic* 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* stop_ptr + , std::atomic* 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* stop_ptr + , std::atomic* stop_ptr #endif ) : Rf_base(triangulation, c3t3, oracle, criteria, maximal_number_of_vertices diff --git a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_manifold_base.h b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_manifold_base.h index aa6a83b9e0e..e68892bd600 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_manifold_base.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_manifold_base.h @@ -30,6 +30,7 @@ #include #include +#include namespace CGAL { @@ -307,7 +308,7 @@ public: int mesh_topology, std::size_t maximal_number_of_vertices #ifndef CGAL_NO_ATOMIC - , CGAL::cpp11::atomic* stop_ptr + , std::atomic* stop_ptr #endif ) : Base(triangulation, diff --git a/Mesh_3/include/CGAL/make_mesh_3.h b/Mesh_3/include/CGAL/make_mesh_3.h index 6bc7be6c596..a75e120da69 100644 --- a/Mesh_3/include/CGAL/make_mesh_3.h +++ b/Mesh_3/include/CGAL/make_mesh_3.h @@ -32,6 +32,8 @@ #include #include +#include + 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* pointer_to_stop = 0 + , std::atomic* pointer_to_stop = 0 #endif ) { diff --git a/Mesh_3/include/CGAL/refine_mesh_3.h b/Mesh_3/include/CGAL/refine_mesh_3.h index 4846b12c97e..acbf847b26b 100644 --- a/Mesh_3/include/CGAL/refine_mesh_3.h +++ b/Mesh_3/include/CGAL/refine_mesh_3.h @@ -31,6 +31,8 @@ #include +#include + 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* Pointer_to_stop_atomic_boolean_t; + typedef std::atomic* Pointer_to_stop_atomic_boolean_t; #else typedef bool* Pointer_to_stop_atomic_boolean_t; #endif diff --git a/Nef_3/include/CGAL/Nef_3/SNC_indexed_items.h b/Nef_3/include/CGAL/Nef_3/SNC_indexed_items.h index 7194fbae8ca..82740860553 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_indexed_items.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_indexed_items.h @@ -23,6 +23,8 @@ #include #include +#include + #undef CGAL_NEF_DEBUG #define CGAL_NEF_DEBUG 83 #include @@ -39,7 +41,7 @@ class Index_generator { #ifdef CGAL_NO_ATOMIC static int unique; #else - static CGAL::cpp11::atomic unique; + static std::atomic unique; #endif return unique++; } diff --git a/Number_types/include/CGAL/Counted_number.h b/Number_types/include/CGAL/Counted_number.h index 02b3a1d111c..502a0e1d2a3 100644 --- a/Number_types/include/CGAL/Counted_number.h +++ b/Number_types/include/CGAL/Counted_number.h @@ -21,6 +21,7 @@ #include #include // for Root_of_selector #include +#include namespace CGAL { @@ -29,7 +30,7 @@ class Counted_number { #ifdef CGAL_NO_ATOMIC static unsigned long #else - static CGAL::cpp11::atomic + static std::atomic #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::s_mod_count = 0; #else template -CGAL::cpp11::atomic Counted_number::s_neg_count; +std::atomic Counted_number::s_neg_count; template -CGAL::cpp11::atomic Counted_number::s_add_count; +std::atomic Counted_number::s_add_count; template -CGAL::cpp11::atomic Counted_number::s_sub_count; +std::atomic Counted_number::s_sub_count; template -CGAL::cpp11::atomic Counted_number::s_mul_count; +std::atomic Counted_number::s_mul_count; template -CGAL::cpp11::atomic Counted_number::s_div_count; +std::atomic Counted_number::s_div_count; template -CGAL::cpp11::atomic Counted_number::s_eq_count; +std::atomic Counted_number::s_eq_count; template -CGAL::cpp11::atomic Counted_number::s_comp_count; +std::atomic Counted_number::s_comp_count; template< class NT > -CGAL::cpp11::atomic Counted_number::s_simplify_count; +std::atomic Counted_number::s_simplify_count; template< class NT > -CGAL::cpp11::atomic Counted_number::s_unit_part_count; +std::atomic Counted_number::s_unit_part_count; template< class NT > -CGAL::cpp11::atomic Counted_number::s_is_zero_count; +std::atomic Counted_number::s_is_zero_count; template< class NT > -CGAL::cpp11::atomic Counted_number::s_is_one_count; +std::atomic Counted_number::s_is_one_count; template< class NT > -CGAL::cpp11::atomic Counted_number::s_square_count; +std::atomic Counted_number::s_square_count; template< class NT > -CGAL::cpp11::atomic Counted_number::s_integral_division_count; +std::atomic Counted_number::s_integral_division_count; template< class NT > -CGAL::cpp11::atomic Counted_number::s_is_square_count; +std::atomic Counted_number::s_is_square_count; template< class NT > -CGAL::cpp11::atomic Counted_number::s_sqrt_count; +std::atomic Counted_number::s_sqrt_count; template< class NT > -CGAL::cpp11::atomic Counted_number::s_kth_root_count; +std::atomic Counted_number::s_kth_root_count; template< class NT > -CGAL::cpp11::atomic Counted_number::s_root_of_count; +std::atomic Counted_number::s_root_of_count; template< class NT > -CGAL::cpp11::atomic Counted_number::s_gcd_count; +std::atomic Counted_number::s_gcd_count; template< class NT > -CGAL::cpp11::atomic Counted_number::s_div_mod_count; +std::atomic Counted_number::s_div_mod_count; template< class NT > -CGAL::cpp11::atomic Counted_number::s_mod_count; +std::atomic Counted_number::s_mod_count; #endif diff --git a/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h b/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h index 932530e76ba..42345fb335a 100644 --- a/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h +++ b/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h @@ -6,6 +6,8 @@ #include "Callback_signaler.h" +#include + 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::value) { - CGAL::cpp11::thread thread (functor); + std::thread thread (functor); while (*signal_callback->latest_adv != 1. && *signal_callback->state)