From 0b4b0f11e889674effe698d792caea7d00ba067b Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Fri, 28 Oct 2016 04:01:01 +0000 Subject: [PATCH] Fixed a few more compilation warnings --- unsupported/test/cxx11_tensor_cuda.cu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unsupported/test/cxx11_tensor_cuda.cu b/unsupported/test/cxx11_tensor_cuda.cu index bf216587a..0ba9d52e9 100644 --- a/unsupported/test/cxx11_tensor_cuda.cu +++ b/unsupported/test/cxx11_tensor_cuda.cu @@ -303,8 +303,8 @@ void test_cuda_contraction() cudaMemcpy(t_result.data(), d_t_result, t_result_bytes, cudaMemcpyDeviceToHost); - for (size_t i = 0; i < t_result.dimensions().TotalSize(); i++) { - if (fabs(t_result.data()[i] - m_result.data()[i]) >= 1e-4) { + for (DenseIndex i = 0; i < t_result.size(); i++) { + if (fabs(t_result.data()[i] - m_result.data()[i]) >= 1e-4f) { std::cout << "mismatch detected at index " << i << ": " << t_result.data()[i] << " vs " << m_result.data()[i] << std::endl; assert(false); }