[Openmp-commits] [PATCH] D69423: [NFC] [libomptarget] Move option.h into target_impl.h, name a magic number
    Jon Chesterfield via Phabricator via Openmp-commits 
    openmp-commits at lists.llvm.org
       
    Fri Oct 25 10:16:13 PDT 2019
    
    
  
JonChesterfield marked an inline comment as done.
JonChesterfield added inline comments.
================
Comment at: openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h:135-141
+INLINE uint32_t __kmpc_impl_get_warp_id() { return threadIdx.x / WARPSIZE; }
+
+INLINE uint32_t __kmpc_impl_get_thread_id_in_warp() {
+  int threadIdxMask = WARPSIZE - 1;
+  return threadIdx.x & threadIdxMask;
+}
+
----------------
ABataev wrote:
> Maybe, split this patch into 2 and introduce these functions and new processing of check functions in the new patch?
I'm not sure we gain much by dividing this patch. If you like I could split it into something like:
- delete macros
- move constants into target_impl
- introduce & use one function
- introduce & use the other function
I don't have time to do that just now but will be able to later
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69423/new/
https://reviews.llvm.org/D69423
    
    
More information about the Openmp-commits
mailing list