[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] (no subject)
From: |
Andriy Andreykiv |
Subject: |
[Getfem-commits] (no subject) |
Date: |
Mon, 18 Feb 2019 10:16:11 -0500 (EST) |
branch: upgrading_getfem_to_cpp14
commit 169948f74c8b8f470ac75fd488d31baab729e209
Author: aa <address@hidden>
Date: Mon Feb 18 15:39:13 2019 +0100
no need for boost/atomic, as standard atomic is there
---
src/getfem/dal_static_stored_objects.h | 11 ++---------
src/getfem/getfem_context.h | 10 ++--------
2 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/src/getfem/dal_static_stored_objects.h
b/src/getfem/dal_static_stored_objects.h
index be8ca7e..16814b1 100644
--- a/src/getfem/dal_static_stored_objects.h
+++ b/src/getfem/dal_static_stored_objects.h
@@ -77,14 +77,7 @@ std::shared_ptr are used.
#include "getfem/getfem_arch_config.h"
-#ifdef GETFEM_HAS_OPENMP
- #include <boost/atomic.hpp>
- typedef boost::atomic_bool atomic_bool;
- typedef boost::atomic<int> atomic_int;
-#else
- typedef int atomic_int;
- typedef bool atomic_bool;
-#endif
+#include <atomic>
#define DAL_STORED_OBJECT_DEBUG 0
@@ -298,7 +291,7 @@ namespace dal {
/** Pointer to an object with the dependencies */
struct enr_static_stored_object {
pstatic_stored_object p;
- atomic_bool valid;
+ std::atomic_bool valid;
const permanence perm;
std::set<pstatic_stored_object> dependent_object;
std::set<pstatic_stored_object> dependencies;
diff --git a/src/getfem/getfem_context.h b/src/getfem/getfem_context.h
index e24f4e5..e82017b 100644
--- a/src/getfem/getfem_context.h
+++ b/src/getfem/getfem_context.h
@@ -41,13 +41,7 @@
#include "getfem_omp.h"
#include <list>
-#ifdef GETFEM_HAS_OPENMP
- #include <boost/atomic.hpp>
- typedef boost::atomic_bool atomic_bool;
-#else
- typedef bool atomic_bool;
-#endif
-
+#include <atomic>
namespace getfem {
/**Deal with interdependencies of objects.
@@ -89,7 +83,7 @@ namespace getfem {
protected :
enum context_state { CONTEXT_NORMAL, CONTEXT_CHANGED, CONTEXT_INVALID };
mutable context_state state;
- mutable atomic_bool touched;
+ mutable std::atomic_bool touched;
mutable std::vector<const context_dependencies *> dependencies;
mutable std::vector<const context_dependencies *> dependent;
typedef std::vector<const context_dependencies *>::iterator iterator_list;
- [Getfem-commits] [getfem-commits] branch upgrading_getfem_to_cpp14 created (now 776b81d), Andriy Andreykiv, 2019/02/18
- [Getfem-commits] (no subject), Andriy Andreykiv, 2019/02/18
- [Getfem-commits] (no subject),
Andriy Andreykiv <=
- [Getfem-commits] (no subject), Andriy Andreykiv, 2019/02/18
- [Getfem-commits] (no subject), Andriy Andreykiv, 2019/02/18
- [Getfem-commits] (no subject), Andriy Andreykiv, 2019/02/18
- [Getfem-commits] (no subject), Andriy Andreykiv, 2019/02/18
- [Getfem-commits] (no subject), Andriy Andreykiv, 2019/02/18
- [Getfem-commits] (no subject), Andriy Andreykiv, 2019/02/18
- [Getfem-commits] (no subject), Andriy Andreykiv, 2019/02/18