aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/cxx11_tensor_notification.cpp
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-03-24 18:54:31 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-03-24 18:54:31 -0700
commita86c9f037b24312863ad2a74a583369581c6e21a (patch)
tree1378da02a3e4d7a7b63b0e155e41b2a7ac9ffda3 /unsupported/test/cxx11_tensor_notification.cpp
parent0968e925a040d4988f02e8476b5cea8518e5f966 (diff)
Fixed compilation error on windows
Diffstat (limited to 'unsupported/test/cxx11_tensor_notification.cpp')
-rw-r--r--unsupported/test/cxx11_tensor_notification.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/unsupported/test/cxx11_tensor_notification.cpp b/unsupported/test/cxx11_tensor_notification.cpp
index 813bc4413..c946007b8 100644
--- a/unsupported/test/cxx11_tensor_notification.cpp
+++ b/unsupported/test/cxx11_tensor_notification.cpp
@@ -9,11 +9,20 @@
#define EIGEN_USE_THREADS
-#include <unistd.h>
#include <stdlib.h>
#include "main.h"
#include <Eigen/CXX11/Tensor>
+#if EIGEN_OS_WIN || EIGEN_OS_WIN64
+#include <windows.h>
+void sleep(int seconds) {
+ Sleep(seconds*1000);
+}
+#else
+#include <unistd.h>
+#endif
+
+
namespace {
void WaitAndAdd(Eigen::Notification* n, int* counter) {