Skip to content

Commit ad94fce

Browse files
committed
[OpenMP][NFC] Eliminate sign comparison warning via explicit casts
Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D96812
1 parent 9cd1e22 commit ad94fce

File tree

1 file changed

+2
-2
lines changed
  • openmp/libomptarget/plugins/cuda/src

1 file changed

+2
-2
lines changed

openmp/libomptarget/plugins/cuda/src/rtl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ class StreamManagerTy {
229229
const std::lock_guard<std::mutex> Lock(*StreamMtx[DeviceId]);
230230
int &Id = NextStreamId[DeviceId];
231231
// No CUstream left in the pool, we need to request from CUDA RT
232-
if (Id == StreamPool[DeviceId].size()) {
232+
if (Id == static_cast<int>(StreamPool[DeviceId].size())) {
233233
// By default we double the stream pool every time
234234
resizeStreamPool(DeviceId, Id * 2);
235235
}
@@ -263,7 +263,7 @@ class StreamManagerTy {
263263
resizeStreamPool(DeviceId, EnvNumInitialStreams);
264264

265265
// Check the size of stream pool
266-
if (StreamPool[DeviceId].size() != EnvNumInitialStreams)
266+
if (static_cast<int>(StreamPool[DeviceId].size()) != EnvNumInitialStreams)
267267
return false;
268268

269269
// Check whether each stream is valid

0 commit comments

Comments
 (0)