From ad94fce8458e6ecb990a3c6ba58f6ec92155cbe9 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Wed, 10 Feb 2021 14:14:22 -0600 Subject: [PATCH] [OpenMP][NFC] Eliminate sign comparison warning via explicit casts Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D96812 --- openmp/libomptarget/plugins/cuda/src/rtl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmp/libomptarget/plugins/cuda/src/rtl.cpp b/openmp/libomptarget/plugins/cuda/src/rtl.cpp index 732824a..ebd42e6 100644 --- a/openmp/libomptarget/plugins/cuda/src/rtl.cpp +++ b/openmp/libomptarget/plugins/cuda/src/rtl.cpp @@ -229,7 +229,7 @@ public: const std::lock_guard 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(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(StreamPool[DeviceId].size()) != EnvNumInitialStreams) return false; // Check whether each stream is valid -- 2.7.4