diff --git a/Dockerfile b/Dockerfile index 07a772f21d..a67ce38ca2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -72,11 +72,12 @@ RUN cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DENABLE_OPENMP make clean FROM ghcr.io/llnl/radiuss:clang-14-ubuntu-22.04 AS clang14_style +USER root ENV GTEST_COLOR=1 COPY . /home/raja/workspace WORKDIR /home/raja/workspace/build -RUN clang-format --version \ - cmake -DENABLE_CLANGFORMAT=ON ../ \ +RUN clang-format --version && \ + cmake -DENABLE_CLANGFORMAT=ON ../ && \ make style FROM ghcr.io/llnl/radiuss:clang-15-ubuntu-22.04 AS clang15 diff --git a/include/RAJA/internal/Iterators.hpp b/include/RAJA/internal/Iterators.hpp index fd838943c2..b100a5386a 100644 --- a/include/RAJA/internal/Iterators.hpp +++ b/include/RAJA/internal/Iterators.hpp @@ -52,10 +52,10 @@ RAJA_HOST_DEVICE bool is_addition_overflow(Type lhs, DifferenceType rhs) { if (std::is_unsigned::value) { - if ((rhs > 0) && (lhs > std::numeric_limits::max() - rhs)) - return true; - if ((rhs < 0) && (lhs < std::numeric_limits::min() - rhs)) - return true; + if ((rhs > 0) && (lhs > std::numeric_limits::max() - rhs)) + return true; + if ((rhs < 0) && (lhs < std::numeric_limits::min() - rhs)) + return true; } return false; }