From 2116890ec530e2c270a9eb89f778ac93e5216db5 Mon Sep 17 00:00:00 2001 From: Ahmed Mahmoud Date: Mon, 26 Jun 2023 16:49:50 -0400 Subject: [PATCH] warnings --- .../include/Neon/domain/details/mGrid/mField_imp.h | 6 +++--- libNeonDomain/src/domain/details/mGrid/mGrid.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libNeonDomain/include/Neon/domain/details/mGrid/mField_imp.h b/libNeonDomain/include/Neon/domain/details/mGrid/mField_imp.h index 498cc00d..c2464cdc 100644 --- a/libNeonDomain/include/Neon/domain/details/mGrid/mField_imp.h +++ b/libNeonDomain/include/Neon/domain/details/mGrid/mField_imp.h @@ -150,8 +150,8 @@ auto mField::forEachActiveCell( } if (active) { - Idx idx(blockIdx, i * kUserBlockSizeX + x, j * kUserBlockSizeY + y, k * kUserBlockSizeZ + z); - for (int c = 0; c < card; ++c) { + Idx idx(blockIdx, int8_t(i * kUserBlockSizeX + x), int8_t(j * kUserBlockSizeY + y), int8_t(k * kUserBlockSizeZ + z)); + for (int c = 0; c < card; ++c) { fun(voxelGlobalID, c, (*this)(level).getPartition(Neon::Execution::host, devID, Neon::DataView::STANDARD)(idx, c)); } } @@ -446,7 +446,7 @@ auto mField::ioToVtk(std::string fileName, file << x + y * refFactor + z * refFactor * refFactor << "\n"; } else if (op == Op::OutputData) { - Idx idx(blockIdx, i * kUserBlockSizeX + x, j * kUserBlockSizeY + y, k * kUserBlockSizeZ + z); + Idx idx(blockIdx, int8_t(i * kUserBlockSizeX + x), int8_t(j * kUserBlockSizeY + y), int8_t(k * kUserBlockSizeZ + z)); for (int c = 0; c < card; ++c) { file << (*this)(l).getPartition(Neon::Execution::host, devID, Neon::DataView::STANDARD)(idx, c) << "\n"; } diff --git a/libNeonDomain/src/domain/details/mGrid/mGrid.cpp b/libNeonDomain/src/domain/details/mGrid/mGrid.cpp index 12eaf2d0..222de396 100644 --- a/libNeonDomain/src/domain/details/mGrid/mGrid.cpp +++ b/libNeonDomain/src/domain/details/mGrid/mGrid.cpp @@ -307,7 +307,7 @@ mGrid::mGrid( childAllocSize[l]); for (int32_t c = 0; c < childAllocSize[l].cardinality(); ++c) { SetIdx devID(c); - for (int64_t i = 0; i < childAllocSize[l][c]; ++i) { + for (size_t i = 0; i < childAllocSize[l][c]; ++i) { mData->mChildBlockID[l].eRef(devID, i) = std::numeric_limits::max(); } }