[Openmp-commits] [PATCH] D149010: [OpenMP] Fix GCC build issues and restore "Additional APIs used by the MSVC compiler for loop collapse (rectangular and non-rectangular loops)"

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue May 16 09:52:34 PDT 2023


tianshilei1992 added inline comments.


================
Comment at: openmp/runtime/src/kmp_collapse.cpp:132
+          static_cast<kmp_loop_nest_iv_t>(bounds->ub0 - bounds->lb0) /
+              std::abs(bounds->step) +
+          1;
----------------
I'm not sure if we can use `std::abs` here w/o pulling in `<cmath>`. However, `libomp` doesn't depend on `libm` anyway, so we might probably just want to "reinvent the wheels" for `std::abs` here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149010/new/

https://reviews.llvm.org/D149010



More information about the Openmp-commits mailing list