[libclc] [libclc] Move ceil/fabs/floor/rint/trunc to CLC library (PR #114774)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 4 03:14:34 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff e28d7f713471cf33908a0fe5223f480dfd9b06f0 8dd4fb41f272daa48ac5d2b52a61f5bb740a3ff4 --extensions h,inc -- libclc/clc/include/clc/math/clc_ceil.h libclc/clc/include/clc/math/clc_fabs.h libclc/clc/include/clc/math/clc_floor.h libclc/clc/include/clc/math/clc_rint.h libclc/clc/include/clc/math/clc_trunc.h libclc/clc/include/clc/utils.h libclc/generic/lib/clcmacro.h libclc/generic/lib/math/native_unary_intrinsic.inc libclc/clc/include/clc/math/unary_decl.inc libclc/clc/include/clc/math/unary_intrin.inc
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libclc/clc/include/clc/math/unary_intrin.inc b/libclc/clc/include/clc/math/unary_intrin.inc
index 532bb1f9d2..c331d3ff08 100644
--- a/libclc/clc/include/clc/math/unary_intrin.inc
+++ b/libclc/clc/include/clc/math/unary_intrin.inc
@@ -3,7 +3,8 @@ _CLC_OVERLOAD float2 __CLC_FUNCTION(float2 f) __asm(__CLC_INTRINSIC ".v2f32");
_CLC_OVERLOAD float3 __CLC_FUNCTION(float3 f) __asm(__CLC_INTRINSIC ".v3f32");
_CLC_OVERLOAD float4 __CLC_FUNCTION(float4 f) __asm(__CLC_INTRINSIC ".v4f32");
_CLC_OVERLOAD float8 __CLC_FUNCTION(float8 f) __asm(__CLC_INTRINSIC ".v8f32");
-_CLC_OVERLOAD float16 __CLC_FUNCTION(float16 f) __asm(__CLC_INTRINSIC ".v16f32");
+_CLC_OVERLOAD float16 __CLC_FUNCTION(float16 f) __asm(__CLC_INTRINSIC
+ ".v16f32");
#ifdef cl_khr_fp64
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
@@ -12,11 +13,12 @@ _CLC_OVERLOAD double2 __CLC_FUNCTION(double2 d) __asm(__CLC_INTRINSIC ".v2f64");
_CLC_OVERLOAD double3 __CLC_FUNCTION(double3 d) __asm(__CLC_INTRINSIC ".v3f64");
_CLC_OVERLOAD double4 __CLC_FUNCTION(double4 d) __asm(__CLC_INTRINSIC ".v4f64");
_CLC_OVERLOAD double8 __CLC_FUNCTION(double8 d) __asm(__CLC_INTRINSIC ".v8f64");
-_CLC_OVERLOAD double16 __CLC_FUNCTION(double16 d) __asm(__CLC_INTRINSIC ".v16f64");
+_CLC_OVERLOAD double16 __CLC_FUNCTION(double16 d) __asm(__CLC_INTRINSIC
+ ".v16f64");
#endif
#ifdef cl_khr_fp16
-#pragma OPENCL EXTENSION cl_khr_fp16: enable
+#pragma OPENCL EXTENSION cl_khr_fp16 : enable
_CLC_OVERLOAD half __CLC_FUNCTION(half d) __asm(__CLC_INTRINSIC ".f16");
_CLC_OVERLOAD half2 __CLC_FUNCTION(half2 d) __asm(__CLC_INTRINSIC ".v2f16");
_CLC_OVERLOAD half3 __CLC_FUNCTION(half3 d) __asm(__CLC_INTRINSIC ".v3f16");
``````````
</details>
https://github.com/llvm/llvm-project/pull/114774
More information about the cfe-commits
mailing list