From b5ed6e72576124b2934e28c87414856df4ca9412 Mon Sep 17 00:00:00 2001 From: Kenneth Moreland Date: Tue, 25 Aug 2020 08:30:44 -0600 Subject: [PATCH] Fix some conversion warnings Fixes some compiler warnings that were missed on recent dashboards. --- benchmarking/BenchmarkODEIntegrators.cxx | 2 +- vtkm/cont/testing/TestingBitField.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/benchmarking/BenchmarkODEIntegrators.cxx b/benchmarking/BenchmarkODEIntegrators.cxx index a1f9ac19e..360f10549 100644 --- a/benchmarking/BenchmarkODEIntegrators.cxx +++ b/benchmarking/BenchmarkODEIntegrators.cxx @@ -59,7 +59,7 @@ void BenchParticleAdvection(::benchmark::State& state) vtkm::filter::ParticleAdvection particleAdvection; particleAdvection.SetStepSize(vtkm::FloatDefault(1) / state.range(0)); - particleAdvection.SetNumberOfSteps(state.range(0)); + particleAdvection.SetNumberOfSteps(static_cast(state.range(0))); particleAdvection.SetSeeds(seedArray); particleAdvection.SetActiveField("vector"); vtkm::cont::Timer timer{ device }; diff --git a/vtkm/cont/testing/TestingBitField.h b/vtkm/cont/testing/TestingBitField.h index 15a255ff3..26b8c2cd4 100644 --- a/vtkm/cont/testing/TestingBitField.h +++ b/vtkm/cont/testing/TestingBitField.h @@ -150,12 +150,12 @@ struct TestingBitField // NumBits should be rounded up to the nearest block of bytes, as defined in // the traits: - const vtkm::Id bytesInFieldData = field.GetBuffer().GetNumberOfBytes(); + const vtkm::BufferSizeType bytesInFieldData = field.GetBuffer().GetNumberOfBytes(); - const vtkm::Id blockSize = vtkm::cont::detail::BitFieldTraits::BlockSize; - const vtkm::Id numBytes = (NUM_BITS + CHAR_BIT - 1) / CHAR_BIT; - const vtkm::Id numBlocks = (numBytes + blockSize - 1) / blockSize; - const vtkm::Id expectedBytes = numBlocks * blockSize; + const vtkm::BufferSizeType blockSize = vtkm::cont::detail::BitFieldTraits::BlockSize; + const vtkm::BufferSizeType numBytes = (NUM_BITS + CHAR_BIT - 1) / CHAR_BIT; + const vtkm::BufferSizeType numBlocks = (numBytes + blockSize - 1) / blockSize; + const vtkm::BufferSizeType expectedBytes = numBlocks * blockSize; VTKM_TEST_ASSERT(bytesInFieldData == expectedBytes, "The BitField allocation does not round up to the nearest "