From 84bf790916a4303742ed6e6349177be6b2074b1c Mon Sep 17 00:00:00 2001 From: brian Date: Wed, 28 Sep 2022 10:57:48 +0200 Subject: [PATCH] Fix compiler warning: comparison between signed and unsigned integer expressions Signed-off-by: brian --- .../src/main/cpp/blas/helpers/ConstantTadHelper.h | 2 +- .../cavis-native-lib/src/main/cpp/blas/helpers/ShapeUtils.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cavis-native/cavis-native-lib/src/main/cpp/blas/helpers/ConstantTadHelper.h b/cavis-native/cavis-native-lib/src/main/cpp/blas/helpers/ConstantTadHelper.h index 8d60bc3cb..55e2cf480 100644 --- a/cavis-native/cavis-native-lib/src/main/cpp/blas/helpers/ConstantTadHelper.h +++ b/cavis-native/cavis-native-lib/src/main/cpp/blas/helpers/ConstantTadHelper.h @@ -65,7 +65,7 @@ namespace sd { * @return */ FORCEINLINE int cachedEntriesForDevice(int deviceId) { - if (deviceId > _cache.size()) + if ( (size_t)deviceId > _cache.size()) throw std::runtime_error("deviceId > number of actual devices"); return _cache[deviceId].size(); diff --git a/cavis-native/cavis-native-lib/src/main/cpp/blas/helpers/ShapeUtils.h b/cavis-native/cavis-native-lib/src/main/cpp/blas/helpers/ShapeUtils.h index 7cf0e1ed4..9aaf144cd 100644 --- a/cavis-native/cavis-native-lib/src/main/cpp/blas/helpers/ShapeUtils.h +++ b/cavis-native/cavis-native-lib/src/main/cpp/blas/helpers/ShapeUtils.h @@ -216,7 +216,7 @@ namespace sd { ////////////////////////////////////////////////////////////////////////// FORCEINLINE bool ShapeUtils::isPermutNecessary(const std::vector& permut) { - for(int i=0; i