Fix compiler warning: comparison between signed and unsigned integer expressions

Signed-off-by: brian <brian@brutex.de>
master
Brian Rosenberger 2022-09-28 10:57:48 +02:00
parent 1ce4a0ba70
commit 84bf790916
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ namespace sd {
* @return * @return
*/ */
FORCEINLINE int cachedEntriesForDevice(int deviceId) { FORCEINLINE int cachedEntriesForDevice(int deviceId) {
if (deviceId > _cache.size()) if ( (size_t)deviceId > _cache.size())
throw std::runtime_error("deviceId > number of actual devices"); throw std::runtime_error("deviceId > number of actual devices");
return _cache[deviceId].size(); return _cache[deviceId].size();

View File

@ -216,7 +216,7 @@ namespace sd {
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
FORCEINLINE bool ShapeUtils::isPermutNecessary(const std::vector<int>& permut) { FORCEINLINE bool ShapeUtils::isPermutNecessary(const std::vector<int>& permut) {
for(int i=0; i<permut.size(); ++i) for(size_t i=0; i<permut.size(); ++i)
if(permut[i] != i) if(permut[i] != i)
return true; return true;