[libc-commits] [libc] [libc] Add utility functions for warp-level scan and reduction (PR #84866)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Mon Mar 11 20:44:43 PDT 2024


================
@@ -31,6 +31,25 @@ LIBC_INLINE bool is_first_lane(uint64_t lane_mask) {
   return gpu::get_lane_id() == get_first_lane_id(lane_mask);
 }
 
+/// Gets the sum of all lanes inside the warp or wavefront.
----------------
jhuber6 wrote:

I'll need this for the NVPTX build in any case, and I think it's sufficient for now to have this in source the way I need it until someone wants to implement the suite more correctly. However I don't think it will change too much considering that this is just convergent addition.

https://github.com/llvm/llvm-project/pull/84866


More information about the libc-commits mailing list