[clang] [Headers][NFC] Deduplicate gpu_match_ between targets via inlining (PR #131141)

Jon Chesterfield via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 13 08:29:15 PDT 2025


================
@@ -32,6 +32,31 @@ _Pragma("push_macro(\"bool\")");
 #define bool _Bool
 #endif
 
+_Pragma("omp begin declare target device_type(nohost)");
+_Pragma("omp begin declare variant match(device = {kind(gpu)})");
+
+// Forward declare a few functions for the implementation header.
+
+// Returns a bitmask marking all lanes that have the same value of __x.
+_DEFAULT_FN_ATTRS static __inline__ uint64_t
+__gpu_fallback_match_any_u32(uint64_t __lane_mask, uint32_t __x);
----------------
JonChesterfield wrote:

Sure, done

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


More information about the cfe-commits mailing list