aboutsummaryrefslogtreecommitdiff
path: root/Eigen/src/Core/products/Parallelizer.h
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src/Core/products/Parallelizer.h')
-rw-r--r--Eigen/src/Core/products/Parallelizer.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Eigen/src/Core/products/Parallelizer.h b/Eigen/src/Core/products/Parallelizer.h
index c2f084c82..c0ddc0c06 100644
--- a/Eigen/src/Core/products/Parallelizer.h
+++ b/Eigen/src/Core/products/Parallelizer.h
@@ -10,6 +10,8 @@
#ifndef EIGEN_PARALLELIZER_H
#define EIGEN_PARALLELIZER_H
+#include <atomic>
+
namespace Eigen {
namespace internal {
@@ -75,8 +77,8 @@ template<typename Index> struct GemmParallelInfo
{
GemmParallelInfo() : sync(-1), users(0), lhs_start(0), lhs_length(0) {}
- Index volatile sync;
- int volatile users;
+ std::atomic<Index> sync;
+ std::atomic<int> users;
Index lhs_start;
Index lhs_length;