[OpenMP][NFC] Eliminate sign comparison warning via explicit casts

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D96812
This commit is contained in:
Johannes Doerfert 2021-02-10 14:14:22 -06:00
parent 9cd1e2228c
commit ad94fce845
1 changed files with 2 additions and 2 deletions

View File

@ -229,7 +229,7 @@ public:
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 @@ public:
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