From e3b7f59659689015aa254ed67c48d870831f086f Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Fri, 30 Apr 2021 08:19:48 -0700 Subject: Simplify TensorRandom and remove time-dependence. Time-dependence prevents tests from being repeatable. This has long been an issue with debugging the tensor tests. Removing this will allow future tests to be repeatable in the usual way. Also, the recently added macros in !476 are causing headaches across different platforms. For example, checking `_XOPEN_SOURCE` is leading to multiple ambiguous macro errors across Google, and `_DEFAULT_SOURCE`/`_SVID_SOURCE`/`_BSD_SOURCE` are sometimes defined with values, sometimes defined as empty, and sometimes not defined at all when they probably should be. This is leading to multiple build breakages. The simplest approach is to generate a seed via `Eigen::internal::random()` if on CPU. For GPU, we use a hash based on the current thread ID (since `rand()` isn't supported on GPU). Fixes #1602. --- unsupported/Eigen/CXX11/Tensor | 8 -------- 1 file changed, 8 deletions(-) (limited to 'unsupported/Eigen/CXX11/Tensor') diff --git a/unsupported/Eigen/CXX11/Tensor b/unsupported/Eigen/CXX11/Tensor index d73c6008d..0938bb554 100644 --- a/unsupported/Eigen/CXX11/Tensor +++ b/unsupported/Eigen/CXX11/Tensor @@ -41,14 +41,6 @@ #include #include -#ifdef _WIN32 -#include -#elif defined(__APPLE__) -#include -#else -#include -#endif - #if defined(EIGEN_USE_THREADS) || defined(EIGEN_USE_SYCL) #include "ThreadPool" #endif -- cgit v1.2.3