aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/eigen3/unsupported/Eigen/CXX11/Tensor
diff options
context:
space:
mode:
authorGravatar Erik Smistad <ersmistad@gmail.com>2017-05-05 03:39:21 +0200
committerGravatar Benoit Steiner <benoitsteiner@users.noreply.github.com>2017-05-04 18:39:21 -0700
commitd24befd445ce74a611c95533b11ceb2a09841d47 (patch)
tree21a938721df208e73ef2b3e60d04902af2ecae1b /third_party/eigen3/unsupported/Eigen/CXX11/Tensor
parent243ac0132001a5b8fa9c1d4435842d0b588b82be (diff)
replace sleep macro with an inline function (#9663)
Diffstat (limited to 'third_party/eigen3/unsupported/Eigen/CXX11/Tensor')
-rw-r--r--third_party/eigen3/unsupported/Eigen/CXX11/Tensor8
1 files changed, 5 insertions, 3 deletions
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/Tensor b/third_party/eigen3/unsupported/Eigen/CXX11/Tensor
index 00d2e7c0c7..861a87b68b 100644
--- a/third_party/eigen3/unsupported/Eigen/CXX11/Tensor
+++ b/third_party/eigen3/unsupported/Eigen/CXX11/Tensor
@@ -1,9 +1,11 @@
-#ifdef _WIN32
-#define sleep(seconds) Sleep(1000*seconds)
-#endif // _WIN32
#include "unsupported/Eigen/CXX11/Tensor"
#ifdef _WIN32
+#ifndef SLEEP_FUNC_HEADER_GUARD
+#define SLEEP_FUNC_HEADER_GUARD
+inline void sleep(unsigned int seconds) { Sleep(1000*seconds); }
+#endif
+
// On Windows, Eigen will include Windows.h, which defines various
// macros that conflict with TensorFlow symbols. Undefine them here to
// prevent clashes.