[libclc] 46223b5 - libclc: add half version of 'sign' (#99841)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 22 03:09:00 PDT 2024
Author: Romaric Jodin
Date: 2024-07-22T11:08:56+01:00
New Revision: 46223b5eae1ae25ad0d8ca47ea210c1781cb03fc
URL: https://github.com/llvm/llvm-project/commit/46223b5eae1ae25ad0d8ca47ea210c1781cb03fc
DIFF: https://github.com/llvm/llvm-project/commit/46223b5eae1ae25ad0d8ca47ea210c1781cb03fc.diff
LOG: libclc: add half version of 'sign' (#99841)
Added:
Modified:
libclc/generic/lib/common/sign.cl
Removed:
################################################################################
diff --git a/libclc/generic/lib/common/sign.cl b/libclc/generic/lib/common/sign.cl
index 25832e0b4f8b9..7b6b793be79c1 100644
--- a/libclc/generic/lib/common/sign.cl
+++ b/libclc/generic/lib/common/sign.cl
@@ -26,3 +26,12 @@ SIGN(double, )
_CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, double, sign, double)
#endif
+
+#ifdef cl_khr_fp16
+
+#pragma OPENCL EXTENSION cl_khr_fp16 : enable
+
+SIGN(half,)
+_CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, half, sign, half)
+
+#endif
More information about the cfe-commits
mailing list