[libcxx-commits] [libcxx] [libcxx] replaces `sqrt(complex<T>)` implementation with builtin (PR #122391)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 9 15:50:18 PST 2025
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 504f6ce0c25b5cd721622cd444e9c428f400fd73 484e554e35aa0a07dc7193dda3989c27ba1eddfe --extensions -- libcxx/include/complex
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/complex b/libcxx/include/complex
index 3858a07d34..8904172882 100644
--- a/libcxx/include/complex
+++ b/libcxx/include/complex
@@ -1059,17 +1059,11 @@ inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> log10(const complex<_Tp>& __x) {
// sqrt
-_LIBCPP_HIDE_FROM_ABI inline _Complex float __csqrt(_Complex float __v) {
- return __builtin_csqrtf(__v);
-}
+_LIBCPP_HIDE_FROM_ABI inline _Complex float __csqrt(_Complex float __v) { return __builtin_csqrtf(__v); }
-_LIBCPP_HIDE_FROM_ABI inline _Complex double __csqrt(_Complex double __v) {
- return __builtin_csqrt(__v);
-}
+_LIBCPP_HIDE_FROM_ABI inline _Complex double __csqrt(_Complex double __v) { return __builtin_csqrt(__v); }
-_LIBCPP_HIDE_FROM_ABI inline _Complex long double __csqrt(_Complex long double __v) {
- return __builtin_csqrtl(__v);
-}
+_LIBCPP_HIDE_FROM_ABI inline _Complex long double __csqrt(_Complex long double __v) { return __builtin_csqrtl(__v); }
template <class _Tp>
_LIBCPP_HIDE_FROM_ABI complex<_Tp> sqrt(const complex<_Tp>& __x) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/122391
More information about the libcxx-commits
mailing list