From ed7a220b04fb23f4618edb310c9e5d202fd13c68 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 5 Oct 2016 08:51:31 -0700 Subject: Fixed a typo that impacts windows builds --- unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h b/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h index dd369fb35..cbe70fbdf 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h @@ -26,13 +26,13 @@ EIGEN_DEVICE_FUNC uint64_t get_random_seed() { #elif defined _WIN32 // Use the current time as a baseline. + SYSTEMTIME st; GetSystemTime(&st); int time = st.wSecond + 1000 * st.wMilliseconds; // Mix in a random number to make sure that we get different seeds if // we try to generate seeds faster than the clock resolution. // We need 2 random values since the generator only generate 16 bits at // a time (https://msdn.microsoft.com/en-us/library/398ax69y.aspx) - SYSTEMTIME st; uint rnd1 = ::rand(); uint rnd2 = ::rand(); uint64_t rnd = (rnd1 | rnd2 << 16) ^ time; -- cgit v1.2.3