[Openmp-commits] [openmp] ad94fce - [OpenMP][NFC] Eliminate sign comparison warning via explicit casts
Johannes Doerfert via Openmp-commits
openmp-commits at lists.llvm.org
Tue Feb 16 13:37:48 PST 2021
Author: Johannes Doerfert
Date: 2021-02-16T15:37:41-06:00
New Revision: ad94fce8458e6ecb990a3c6ba58f6ec92155cbe9
URL: https://github.com/llvm/llvm-project/commit/ad94fce8458e6ecb990a3c6ba58f6ec92155cbe9
DIFF: https://github.com/llvm/llvm-project/commit/ad94fce8458e6ecb990a3c6ba58f6ec92155cbe9.diff
LOG: [OpenMP][NFC] Eliminate sign comparison warning via explicit casts
Reviewed By: tianshilei1992
Differential Revision: https://reviews.llvm.org/D96812
Added:
Modified:
openmp/libomptarget/plugins/cuda/src/rtl.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/plugins/cuda/src/rtl.cpp b/openmp/libomptarget/plugins/cuda/src/rtl.cpp
index 732824a331b7..ebd42e63e59c 100644
--- a/openmp/libomptarget/plugins/cuda/src/rtl.cpp
+++ b/openmp/libomptarget/plugins/cuda/src/rtl.cpp
@@ -229,7 +229,7 @@ class StreamManagerTy {
const std::lock_guard<std::mutex> Lock(*StreamMtx[DeviceId]);
int &Id = NextStreamId[DeviceId];
// No CUstream left in the pool, we need to request from CUDA RT
- if (Id == StreamPool[DeviceId].size()) {
+ if (Id == static_cast<int>(StreamPool[DeviceId].size())) {
// By default we double the stream pool every time
resizeStreamPool(DeviceId, Id * 2);
}
@@ -263,7 +263,7 @@ class StreamManagerTy {
resizeStreamPool(DeviceId, EnvNumInitialStreams);
// Check the size of stream pool
- if (StreamPool[DeviceId].size() != EnvNumInitialStreams)
+ if (static_cast<int>(StreamPool[DeviceId].size()) != EnvNumInitialStreams)
return false;
// Check whether each stream is valid
More information about the Openmp-commits
mailing list