[Openmp-commits] [PATCH] D71580: [libomptarget][nfc] Wrap cuda min() in target_impl

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Dec 16 17:31:02 PST 2019


JonChesterfield marked 2 inline comments as done.
JonChesterfield added inline comments.


================
Comment at: openmp/libomptarget/deviceRTLs/nvptx/src/reduction.cu:483
   // Check if this is the very last team.
-  unsigned NumRecs = min(NumTeams, num_of_records);
+  unsigned NumRecs = __kmpc_impl_min<uint32_t>(NumTeams, num_of_records);
   if (ChunkTeamCount == NumTeams - Bound - 1) {
----------------
jdoerfert wrote:
> JonChesterfield wrote:
> > Here, NumTeams is a uint32_t and num_of_records is an int32_t. I quite like the `<>` sigil calling attention to this, but am open to alternatives.
> This is fine, `__kmpc_impl_min(NumTeams, uint32_t(num_of_records));` would be an alternative to make clear what is casted.
I like that more, thanks


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71580





More information about the Openmp-commits mailing list