mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Introduce a portable EIGEN_SLEEP macro.
This commit is contained in:
@@ -88,11 +88,7 @@ static void initializeDeviceProp() {
|
||||
#if __cplusplus >= 201103L
|
||||
std::atomic_thread_fence(std::memory_order_acquire);
|
||||
#endif
|
||||
#if EIGEN_OS_WIN || EIGEN_OS_WIN64
|
||||
Sleep(1000);
|
||||
#else
|
||||
sleep(1);
|
||||
#endif
|
||||
EIGEN_SLEEP(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,4 +51,10 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if EIGEN_OS_WIN || EIGEN_OS_WIN64
|
||||
#define EIGEN_SLEEP(n) Sleep(n)
|
||||
#else
|
||||
#define EIGEN_SLEEP(n) sleep(n*1000)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user