Replace tbb::atomic

This commit is contained in:
Maxime Gimeno 2021-05-07 11:16:50 +02:00
parent 33cefe1be7
commit 9872ac9cf8
2 changed files with 7 additions and 7 deletions

View File

@ -81,7 +81,7 @@ public:
} }
protected: protected:
typedef tbb::atomic<unsigned int> Erase_counter_type; typedef std::atomic<unsigned int> Erase_counter_type;
Erase_counter_type m_erase_counter; Erase_counter_type m_erase_counter;
}; };

View File

@ -92,7 +92,7 @@ struct Profile_counter
Profile_counter(const std::string & ss) Profile_counter(const std::string & ss)
: s(ss) : s(ss)
{ {
i = 0; // needed here because of tbb::atomic i = 0; // needed here because of std::atomic
} }
void operator++() { ++i; } void operator++() { ++i; }
@ -107,7 +107,7 @@ struct Profile_counter
private: private:
#ifdef CGAL_CONCURRENT_PROFILE #ifdef CGAL_CONCURRENT_PROFILE
tbb::atomic<unsigned int> i; std::atomic<unsigned int> i;
#else #else
unsigned int i; unsigned int i;
#endif #endif
@ -167,7 +167,7 @@ struct Profile_branch_counter
Profile_branch_counter(const std::string & ss) Profile_branch_counter(const std::string & ss)
: s(ss) : s(ss)
{ {
i = j = 0; // needed here because of tbb::atomic i = j = 0; // needed here because of std::atomic
} }
void operator++() { ++i; } void operator++() { ++i; }
@ -183,7 +183,7 @@ struct Profile_branch_counter
private: private:
#ifdef CGAL_CONCURRENT_PROFILE #ifdef CGAL_CONCURRENT_PROFILE
tbb::atomic<unsigned int> i, j; std::atomic<unsigned int> i, j;
#else #else
unsigned int i, j; unsigned int i, j;
#endif #endif
@ -196,7 +196,7 @@ struct Profile_branch_counter_3
Profile_branch_counter_3(const std::string & ss) Profile_branch_counter_3(const std::string & ss)
: s(ss) : s(ss)
{ {
i = j = k = 0; // needed here because of tbb::atomic i = j = k = 0; // needed here because of std::atomic
} }
void operator++() { ++i; } void operator++() { ++i; }
@ -214,7 +214,7 @@ struct Profile_branch_counter_3
private: private:
#ifdef CGAL_CONCURRENT_PROFILE #ifdef CGAL_CONCURRENT_PROFILE
tbb::atomic<unsigned int> i, j, k; std::atomic<unsigned int> i, j, k;
#else #else
unsigned int i, j, k; unsigned int i, j, k;
#endif #endif