diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-10-05 08:55:02 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-10-05 08:55:02 -0700 |
commit | 8b69d5d730cbcff74eb682fecb3e3650e10c4fac (patch) | |
tree | 4626123faa8960ae9b5b272270bf4d15e17b9f48 /unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h | |
parent | ed7a220b04fb23f4618edb310c9e5d202fd13c68 (diff) |
::rand() returns a signed integer on win32
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h b/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h index cbe70fbdf..1655a813e 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h @@ -33,8 +33,8 @@ EIGEN_DEVICE_FUNC uint64_t get_random_seed() { // 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) - uint rnd1 = ::rand(); - uint rnd2 = ::rand(); + int rnd1 = ::rand(); + int rnd2 = ::rand(); uint64_t rnd = (rnd1 | rnd2 << 16) ^ time; return rnd; |