replace sleep macro with an inline function (#9663)

This commit is contained in:
Erik Smistad 2017-05-05 03:39:21 +02:00 committed by Benoit Steiner
parent 243ac01320
commit d24befd445

View File

@ -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.