From fd1d4bd86c43f987988f0cc6a9eec9c629cdc8a8 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 22 Apr 2015 16:16:15 -0700 Subject: [PATCH] Silenced a few compilation warnings --- unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h b/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h index 450b1df40e..da9763a3da 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h @@ -200,7 +200,7 @@ int get_random_seed() { #else timespec ts; clock_gettime(CLOCK_REALTIME, &ts); - return ts.tv_nsec; + return static_cast(ts.tv_nsec); #endif } #endif @@ -505,14 +505,14 @@ class GaussianGenerator { const array& std_devs) : m_means(means) { - for (int i = 0; i < NumDims; ++i) { + for (size_t i = 0; i < NumDims; ++i) { m_two_sigmas[i] = std_devs[i] * std_devs[i] * 2; } } T operator()(const array& coordinates) const { T tmp = T(0); - for (int i = 0; i < NumDims; ++i) { + for (size_t i = 0; i < NumDims; ++i) { T offset = coordinates[i] - m_means[i]; tmp += offset * offset / m_two_sigmas[i]; }