diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-04-22 16:16:15 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-04-22 16:16:15 -0700 |
commit | fd1d4bd86c43f987988f0cc6a9eec9c629cdc8a8 (patch) | |
tree | 8efe0b1978c59c1ad9f385ab367d7130fa373aab /unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h | |
parent | 91359e1d0acf74bd586900849c4ab94c117c138f (diff) |
Silenced a few compilation warnings
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h b/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h index 450b1df40..da9763a3d 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<int>(ts.tv_nsec); #endif } #endif @@ -505,14 +505,14 @@ class GaussianGenerator { const array<T, NumDims>& 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<Index, NumDims>& 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]; } |