mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Clean up the Tensor header and get rid of the EIGEN_SLEEP macro.
This commit is contained in:
@@ -83,7 +83,7 @@ static void initializeDeviceProp() {
|
||||
// Wait for the other thread to inititialize the properties.
|
||||
while (!m_devicePropInitialized) {
|
||||
std::atomic_thread_fence(std::memory_order_acquire);
|
||||
EIGEN_SLEEP(1000);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,15 +43,6 @@
|
||||
#define EIGEN_SFINAE_ENABLE_IF( __condition__ ) \
|
||||
typename internal::enable_if< ( __condition__ ) , int >::type = 0
|
||||
|
||||
|
||||
#if EIGEN_OS_WIN || EIGEN_OS_WIN64
|
||||
#define EIGEN_SLEEP(n) Sleep(n)
|
||||
#elif EIGEN_OS_GNULINUX
|
||||
#define EIGEN_SLEEP(n) usleep(n * 1000);
|
||||
#else
|
||||
#define EIGEN_SLEEP(n) sleep(std::max<unsigned>(1, n/1000))
|
||||
#endif
|
||||
|
||||
// Define a macro to use a reference on the host but a value on the device
|
||||
#if defined(SYCL_DEVICE_ONLY)
|
||||
#define EIGEN_DEVICE_REF
|
||||
|
||||
Reference in New Issue
Block a user