diff --git a/Mesh_3/benchmark/Mesh_3/concurrency.cpp b/Mesh_3/benchmark/Mesh_3/concurrency.cpp index 4327ef35078..ea383a78832 100644 --- a/Mesh_3/benchmark/Mesh_3/concurrency.cpp +++ b/Mesh_3/benchmark/Mesh_3/concurrency.cpp @@ -105,14 +105,7 @@ const int TET_SHAPE = 3; # define CGAL_CONCURRENT_MESH_3_PROFILING //# define CGAL_DEBUG_FORCE_SEQUENTIAL_MESH_REFINEMENT - // ========================================================================== - // TBB - // ========================================================================== -# if TBB_IMPLEMENT_CPP0X -# include -# else -# include -# endif +#include // ========================================================================== // SEQUENTIAL diff --git a/STL_Extension/include/CGAL/Spatial_lock_grid_3.h b/STL_Extension/include/CGAL/Spatial_lock_grid_3.h index f5d2b6df798..b50211b0199 100644 --- a/STL_Extension/include/CGAL/Spatial_lock_grid_3.h +++ b/STL_Extension/include/CGAL/Spatial_lock_grid_3.h @@ -17,11 +17,7 @@ #include #include -#if TBB_IMPLEMENT_CPP0X -# include -#else -# include -#endif +#include #include #include diff --git a/STL_Extension/include/CGAL/thread.h b/STL_Extension/include/CGAL/thread.h index 67ecbd39a55..7ae53e976be 100644 --- a/STL_Extension/include/CGAL/thread.h +++ b/STL_Extension/include/CGAL/thread.h @@ -22,56 +22,16 @@ - CGAL::cpp11::thread - CGAL::cpp11::atomic - CGAL::cpp11::sleep_for - - It uses either TBB or STD depending on what's available: as TBB can - quite often override `std::thread`, it is possible that TBB will be - used instead of STD even if the real CXX11 `std::thread` is - available. - - As the conflicting API between TBB and STD can be quite complicated, - we offer a more generic `sleep_for()` function that takes - double-typed seconds as argument and deals with it. */ -// @lrineau shall we simply ignore TBB_IMPLEMENT_CPP0X? -#if defined(CGAL_LINKED_WITH_TBB) -# include -# if TBB_IMPLEMENT_CPP0X -# include -# include -# include -# define CGAL_USE_TBB_THREADS 1 -# else -# define CGAL_USE_TBB_THREADS 0 -# endif -#else -# define CGAL_USE_TBB_THREADS 0 -#endif - -#if !CGAL_USE_TBB_THREADS -# include -# include -#endif - +#include +#include #include // for CGAL::cpp11::atomic namespace CGAL { namespace cpp11 { -#if CGAL_USE_TBB_THREADS - - using std::thread; // std::thread is declared by TBB if TBB_IMPLEMENT_CPP0X == 1 - - inline void sleep_for (double seconds) - { - // std::this_thread::sleep_for is declared by TBB if TBB_IMPLEMENT_CPP0X == 1 - // It takes interval_t types as argument (!= from the std norm) - std::this_thread::sleep_for(tbb::tick_count::interval_t(seconds)); - } - -#else // C++11 implementation - using std::thread; inline void sleep_for (double seconds) @@ -82,20 +42,8 @@ namespace cpp11 { nanoseconds ns (nanoseconds::rep (1000000000.0 * seconds)); std::this_thread::sleep_for(ns); } - -#endif - -#if defined(CGAL_NO_ATOMIC) && defined(CGAL_LINKED_WITH_TBB) - // If did not defined CGAL::cpp11::atomic, then use - // std::atomic as a fallback. - using std::atomic; -#endif - } // cpp11 - } //namespace CGAL -#undef CGAL_USE_TBB_THREADS - #endif // CGAL_THREAD_H