aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-10-05 08:51:31 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-10-05 08:51:31 -0700
commited7a220b04fb23f4618edb310c9e5d202fd13c68 (patch)
tree4a218c1857948508c2cc8ecc27570bce285d431f /unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h
parentceee1c008b6d618a48846283e1f18ba1b4cc171a (diff)
Fixed a typo that impacts windows builds
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h2
1 files changed, 1 insertions, 1 deletions
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;