[Openmp-commits] [PATCH] D95752: [OpenMP][DeviceRTL] Extract shuffle idiom and port it to declare variant
Johannes Doerfert via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Sat Jan 30 19:21:06 PST 2021
jdoerfert added inline comments.
================
Comment at: openmp/libomptarget/deviceRTLs/common/include/shuffle.h:27
+///{
+unsigned GetLaneId();
+unsigned GetWarpSize();
----------------
JonChesterfield wrote:
> Extern C? Also, why forward declare instead of include header?
because our headers are a mess. These are C++ functions, the interface is a mess too
================
Comment at: openmp/libomptarget/deviceRTLs/common/include/shuffle.h:117
+inline int32_t __kmpc_shuffle_int32(int32_t val, int16_t delta, int16_t size) {
+ return __kmpc_impl_shfl_down_sync(-1, val, delta, size);
+}
----------------
JonChesterfield wrote:
> Not sure about int constants near places where the 32/64 bit distinction is important
That's why it's int64_t above, -1 sign extended stays -1.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95752/new/
https://reviews.llvm.org/D95752
More information about the Openmp-commits
mailing list