[Openmp-commits] [PATCH] D14254: [OpenMP] Initial implementation of OpenMP offloading library - libomptarget device RTLs.

Jonas Hahnfeld via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Jan 26 10:40:36 PST 2018


Hahnfeld added inline comments.


================
Comment at: libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h:72
+  // warp.
+  DS_Max_Worker_Warp_Size_Bits = 5,
+  // The slot size that should be reserved for a working warp.
----------------
grokos wrote:
> Hahnfeld wrote:
> > I think all other usages of `>> DS_Max_Worker_Warp_Size_Bits` can be replaced with `% WARPSIZE` or am I missing something in here?
> You mean `div WARPSIZE`, not `mod`... I assume you prefer the division over shifting... I'll change those instances in the new diff. `WARPSIZE` is a compile-time constant and a power of 2, so the compiler should be able optimize the division away.
Yeah, sure! To be precise, I want to avoid any mismatch between `WARPSIZE` and `2 ** DS_Max_Worker_Warp_Size_Bits`. You should now be able to delete `DS_Max_Worker_Warp_Size_Bits`, its last usages are gone ;-)


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D14254





More information about the Openmp-commits mailing list