[Openmp-commits] [PATCH] D64219: [OpenMP][NFCI] Cleanup the target worksharing implementation

Alexey Bataev via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 4 15:54:40 PDT 2019


ABataev added inline comments.


================
Comment at: openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt:50
       src/libcall.cu
-      src/loop.cu
+      src/worksharing.cu
       src/omptarget-nvptx.cu
----------------
Hmm, the file has name `worksharing.cpp`, here it is named `worksharing.cu`. Did you try to compile it?


================
Comment at: openmp/libomptarget/deviceRTLs/nvptx/src/worksharing.cpp:1
+//===--- worksharing.cpp --- OpenMP worksharing constructs ------+- C++ -*-===//
+//
----------------
Better to mark it `Cuda`, since code uses cuda specific constructs


================
Comment at: openmp/libomptarget/deviceRTLs/nvptx/src/worksharing.cpp:25
+template <typename IVTy, typename SIVTy>
+INLINE static void ForStaticChunk(int &last, IVTy &LB, IVTy &UB, SIVTy &Stride,
+                                  SIVTy ChunkSize, IVTy EntityId,
----------------
Maybe, it is worth it to rename functions here ti follow LLVM coding rules?


================
Comment at: openmp/libomptarget/deviceRTLs/nvptx/src/worksharing.cpp:568
+
+DISPATCH_GEN(_4, int32_t, int32_t, int32_t)
+DISPATCH_GEN(_4u, uint32_t, int32_t, int32_t)
----------------
TidTy us always `int32_t`, you can hardcode it in the macro.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64219





More information about the Openmp-commits mailing list