[clang] [libc] [Clang] Add handlers for 'match_any' and 'match_all' to `gpuintrin.h` (PR #127504)

Shilei Tian via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 17 09:00:49 PST 2025


================
@@ -92,6 +92,14 @@ LIBC_INLINE uint32_t shuffle(uint64_t lane_mask, uint32_t idx, uint32_t x,
   return __gpu_shuffle_idx_u32(lane_mask, idx, x, width);
 }
 
+LIBC_INLINE uint64_t match_any(uint64_t lane_mask, uint32_t x) {
+  return __gpu_match_any_u32(lane_mask, x);
+}
+
+LIBC_INLINE uint64_t match_all(uint64_t lane_mask, uint32_t x) {
----------------
shiltian wrote:

I suppose this is a C++ interface function instead of C one?

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


More information about the cfe-commits mailing list