replace sleep macro with an inline function (#9663)
This commit is contained in:
parent
243ac01320
commit
d24befd445
@ -1,9 +1,11 @@
|
|||||||
#ifdef _WIN32
|
|
||||||
#define sleep(seconds) Sleep(1000*seconds)
|
|
||||||
#endif // _WIN32
|
|
||||||
#include "unsupported/Eigen/CXX11/Tensor"
|
#include "unsupported/Eigen/CXX11/Tensor"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#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
|
// On Windows, Eigen will include Windows.h, which defines various
|
||||||
// macros that conflict with TensorFlow symbols. Undefine them here to
|
// macros that conflict with TensorFlow symbols. Undefine them here to
|
||||||
// prevent clashes.
|
// prevent clashes.
|
||||||
|
Loading…
Reference in New Issue
Block a user