Fixed Visual C++ /W4 warnings

This commit is contained in:
Christophe Riccio 2017-08-18 18:41:04 +02:00
parent a2253436c7
commit d0ed6aef21

View File

@ -606,11 +606,11 @@ namespace bitfieldInterleave
{
// SIMD
std::vector<__m128i> SimdData;
SimdData.resize(x_max * y_max);
SimdData.resize(static_cast<std::size_t>(x_max * y_max));
std::vector<__m128i> SimdParam;
SimdParam.resize(x_max * y_max);
for(int i = 0; i < SimdParam.size(); ++i)
SimdParam[i] = _mm_set_epi32(i % x_max, 0, i / y_max, 0);
SimdParam.resize(static_cast<std::size_t>(x_max * y_max));
for(std::size_t i = 0; i < SimdParam.size(); ++i)
SimdParam[i] = _mm_set_epi32(static_cast<int>(i % static_cast<std::size_t>(x_max)), 0, static_cast<int>(i / static_cast<std::size_t>(y_max)), 0);
std::clock_t LastTime = std::clock();