[libclc] [libclc] Re-use shuffle_decl.inc in OpenCL shuffle2 declaration (PR #140679)
Wenju He via cfe-commits
cfe-commits at lists.llvm.org
Tue May 20 23:29:20 PDT 2025
================
@@ -6,41 +6,14 @@
//
//===----------------------------------------------------------------------===//
-#define _CLC_SHUFFLE2_DECL(TYPE, MASKTYPE, RETTYPE) \
- _CLC_OVERLOAD _CLC_DECL RETTYPE shuffle2(TYPE x, TYPE y, MASKTYPE mask);
+#define __CLC_FUNCTION shuffle2
-// Return type is same base type as the input type, with the same vector size as
-// the mask. Elements in the mask must be the same size (number of bits) as the
-// input value. E.g. char8 ret = shuffle2(char2 x, char2 y, uchar8 mask);
+// Integer-type decls
+#define __CLC_BODY <clc/misc/shuffle_decl.inc>
----------------
wenju-he wrote:
done, thanks, I didn't check it carefully.
https://github.com/llvm/llvm-project/pull/140679
More information about the cfe-commits
mailing list