Muhammad Bassiouni
a55c4c812e
[libc][math] Refactor exp2m1f implementation to header-only in src/__support/math folder. ( #162017 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-10-17 18:27:51 +03:00
Muhammad Bassiouni
878527651a
[libc][math] Refactor exp2f16 implementation to header-only in src/__support/math folder. ( #161993 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-10-11 23:27:00 +03:00
Anton Shepelev
1244fd24d9
[libc][math][c23] Add rsqrtf() function ( #159615 )
...
Closes #159614
**Changes:**
- Initial implementation of rsqrt for single precision float
**Some small unrelated style changes to this PR (that I missed in my
rsqrtf16 PR):**
- Added extra - to the top comments to make it look nicer in
libc/shared/math/rsqrtf16.h
- Put rsqrtf16 inside of libc/src/__support/math/CMakeLists.txt in
sorted order
- Rearanged libc_math_function rsqrtf16 in Bazel to match alphabetical
order
2025-10-08 23:37:01 -04:00
Muhammad Bassiouni
596ff855d0
[libc][math] Refactor exp2f implementation to header-only in src/__support/math folder. ( #161992 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-10-06 21:23:44 +03:00
Muhammad Bassiouni
3e78c313bc
[libc][math] Refactor exp2 implementation to header-only in src/__support/math folder. ( #161297 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-10-05 06:31:39 +03:00
Muhammad Bassiouni
6c032fa600
[libc][math] Refactor exp10m1f16 implementation to header-only in src/__support/math folder. ( #161119 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-10-01 11:21:19 +03:00
Muhammad Bassiouni
23d3caf854
[libc][math] Refactor exp10m1f implementation to header-only in src/__support/math folder. ( #159897 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-09-29 07:58:03 +03:00
Joseph Huber
0b9d816b3e
[libc] Remove separate RPC test handling ( #160206 )
...
Summary:
This was originally kept separate so it didn't pollute the name space,
but now I'm thinking it's just easier to bundle it in with the default
interface. This means that we'll have a bit of extra code for people
using the server.h file to handle libc opcodes, but it's minimal (3
functions) and it simplifies this.
I'm doing this because I'm hoping to move the GPU tester binary to
liboffload which handles `libc` opcodes internally except these. This is
the easier option compared to adding a hook to register custom handlers
there.
2025-09-22 19:44:41 -05:00
Muhammad Bassiouni
2b937daa13
[libc][math] Refactor dsqrtl implementation to header-only in src/__support/math folder. ( #154868 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-09-20 07:24:21 +03:00
Anton Shepelev
80f9c72a1e
[libc][math][c23] Add rsqrtf16() function ( #137545 )
...
Addresses #132818
Part of #95250
2025-09-17 10:19:20 -04:00
Muhammad Bassiouni
4d323206ed
[libc][math] Refactor cospif16 implementation to header-only in src/__support/math folder. ( #154222 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-08-22 05:04:13 +03:00
Muhammad Bassiouni
783859b2a0
[libc][math] Refactor cospif implementation to header-only in src/__support/math folder. ( #154215 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-08-22 04:53:18 +03:00
Muhammad Bassiouni
2c79dc1082
[libc][math] Refactor coshf16 implementation to header-only in src/__support/math folder. ( #153582 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-08-19 02:08:07 +03:00
Muhammad Bassiouni
9ddc85f6d5
[libc][math] Refactor coshf implementation to header-only in src/__support/math folder. ( #153427 )
...
Part of #147386
in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-08-14 17:19:47 +03:00
Muhammad Bassiouni
0f6d3ad0fe
[libc][math] Refactor cosf16 implementation to header-only in src/__support/math folder. ( #152871 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-08-13 18:04:35 +03:00
Muhammad Bassiouni
200a99073f
[libc][math] Refactor cosf implementation to header-only in src/__support/math folder. ( #152069 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-08-11 21:08:21 +03:00
Muhammad Bassiouni
e86c9b6b1b
[libc][math] Refactor cos implementation to header-only in src/__support/math folder. ( #151883 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-08-09 18:51:54 +03:00
Joseph Huber
0c139883f4
[libc] Fix server code when GPU is acting as the server
...
Summary:
Small fix that just ignores all the extra lanes if we're running the
server from a platform that potentially has more.
2025-08-08 19:15:13 -05:00
Muhammad Bassiouni
66734f4c3c
[libc][math] Refactor cbrtf implementation to header-only in src/__support/math folder. ( #151846 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-08-08 18:28:50 +03:00
Muhammad Bassiouni
003f6ada15
[libc][math] Refactor cbrt implementation to header-only in src/__support/math folder. ( #151837 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-08-03 21:02:53 +03:00
Muhammad Bassiouni
bb3cd6221b
[libc][math] Refactor atanhf16 implementation to header-only in src/__support/math folder. ( #151779 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-08-02 23:04:02 +03:00
Muhammad Bassiouni
99cd1d8aef
[libc][math] Refactor atanhf implementation to header-only in src/__support/math folder. ( #151399 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-08-02 02:54:13 +03:00
Muhammad Bassiouni
920079b793
[libc][math] Refactor atan2f128 implementation to header-only in src/__support/math folder. ( #151012 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-08-02 00:18:57 +03:00
Muhammad Bassiouni
9af2c21be4
[libc][math] Refactor atan2f implementation to header-only in src/__support/math folder. ( #150993 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-08-01 16:06:09 +03:00
Muhammad Bassiouni
c8b6ddf3a3
[libc][math] Refactor atan2 implementation to header-only in src/__support/math folder. ( #150968 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-31 01:07:55 +03:00
Muhammad Bassiouni
729b0d1b61
[libc][math] Refactor atanf16 implementation to header-only in src/__support/math folder. ( #150868 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-30 23:31:07 +03:00
Muhammad Bassiouni
f2a476d79a
[libc][math] Refactor atanf implementation to header-only in src/__support/math folder. ( #150854 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-30 07:24:49 +03:00
Muhammad Bassiouni
551dcc3e82
[libc][math] Refactor atan implementation to header-only in src/__support/math folder. ( #150852 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-29 21:16:57 +03:00
Muhammad Bassiouni
efbbc0b319
[libc][math] Refactor asinhf16 implementation to header-only in src/__support/math folder. ( #150849 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-29 20:19:01 +03:00
Muhammad Bassiouni
5bcbcf8d53
[libc][math] Refactor asinhf implementation to header-only in src/__support/math folder. ( #150843 )
...
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-28 18:14:47 +03:00
Muhammad Bassiouni
85213f2f88
[libc][math] Refactor asinf16 implementation to header-only in src/__support/math folder. ( #150800 )
...
Part of #147386
in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-27 20:03:10 +03:00
Muhammad Bassiouni
2eb112d78d
[libc][math] Refactor asinf implementation to header-only in src/__support/math folder. ( #150697 )
...
Part of #147386
in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-26 02:05:09 +03:00
Muhammad Bassiouni
bc19aedba2
[libc][math] Refactor asin implementation to header-only in src/__support/math folder. ( #148578 )
...
Part of #147386
in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-25 22:46:43 +03:00
Muhammad Bassiouni
47e2de0d50
[libc][math] Refactor acospif16 implementation to header-only in src/__support/math folder. ( #148574 )
...
Part of #147386
in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-25 21:28:27 +03:00
lntue
a883a67916
[libc] Fix dependency list of libc.src.__support.math.exp10f16. ( #150434 )
2025-07-25 16:10:47 +00:00
Leandro Lacerda
8f410b491e
[libc] Fix incorrect macro usage in shared/sign.h ( #150140 )
...
This patch corrects the `using`-declaration in `libc/shared/sign.h`.
The previous change (#150083 ) incorrectly used the `LIBC_NAMESPACE_DECL`
macro. This is corrected to use `LIBC_NAMESPACE`.
2025-07-22 20:17:09 -05:00
Leandro Lacerda
d8e55c842b
[libc] Expose the Sign type for shared use ( #150083 )
...
This patch exposes the internal `Sign` type for shared use by other LLVM
subprojects, following the pattern established by `FPBits`.
The `FPBits` utility is exposed via `libc/shared/fp_bits.h`. However,
its public interface relies on the `Sign` type for, e.g., creating
signed infinities and returning the sign of a value. Currently, users of
the shared `FPBits` have no way to access the `Sign` type.
Following the existing pattern for sharing `libc` utilities, this patch
adds a new public header `libc/shared/sign.h`. This header simply
includes the internal `src/__support/sign.h` and brings the `Sign` type
into the `shared` namespace.
2025-07-22 15:29:01 -05:00
Muhammad Bassiouni
520398e752
[libc][math] Refactor acoshf16 implementation to header-only in src/__support/math folder. ( #148568 )
...
Part of #147386
in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-22 00:18:15 +03:00
Muhammad Bassiouni
84781c0ed3
[libc][math] Refactor acoshf implementation to header-only in src/__support/math folder. ( #148418 )
...
Part of #147386
in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-21 23:02:19 +03:00
Muhammad Bassiouni
fe267860c1
[libc][math] Refactor erff implementation to header-only in src/__support/math folder. ( #148413 )
...
Part of #147386
in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-21 22:24:24 +03:00
Muhammad Bassiouni
9ad7edef42
[libc][math] Refactor acosf16 implementation to header-only in src/__support/math folder. ( #148412 )
...
Part of #147386
in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-21 21:35:39 +03:00
Muhammad Bassiouni
2865f1ba96
[libc][math] add smoke tests to shared/math.h ( #149741 )
...
Adding smoke tests for shared math header.
part of #147386
2025-07-21 20:48:57 +03:00
Muhammad Bassiouni
ef4e4a0084
[libc][math] Refactor acosf implementation to header-only in src/__support/math folder. ( #148411 )
...
Part of #147386
in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-20 22:41:28 +03:00
Muhammad Bassiouni
cfddb401db
[libc][math] Refactor acos implementation to header-only in src/__support/math folder. ( #148409 )
...
Part of #147386
in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-19 05:21:34 +03:00
Muhammad Bassiouni
7e0ae019f8
[libc][math] Refactor exp10f16 implementation to header-only in src/__support/math folder. ( #148408 )
...
Part of #147386
in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-18 20:00:04 +03:00
Muhammad Bassiouni
b8bc3ff9be
[libc][math] Refactor exp10f implementation to header-only in src/__support/math folder. ( #148405 )
...
Part of #147386
in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-17 20:25:00 +03:00
Muhammad Bassiouni
3a6ef8b359
[libc][math] Refactor exp10 implementation to header-only in src/__support/math folder. ( #148400 )
...
Part of #147386
in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-16 22:48:29 +03:00
Muhammad Bassiouni
d969ec9422
[libc][math] Refactor exp implementation to header-only in src/__support/math folder. ( #148761 )
...
- **[libc][math] Refactor exp implementation to header-only in
src/__support/math folder.**
- **Reapply "[libc][math] Refactor exp implementation to header-only in
src/__support/math folder." (#148668 )**
2025-07-15 12:10:08 -04:00
lntue
f4630baaa2
Revert "[libc][math] Refactor exp implementation to header-only in src/__support/math folder." ( #148668 )
...
Reverts llvm/llvm-project#148091
Full build bots are failing.
2025-07-14 12:46:26 -04:00
Muhammad Bassiouni
a76dfde936
[libc][math] Refactor exp implementation to header-only in src/__support/math folder. ( #148091 )
...
Part of #147386
in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-07-14 12:21:27 -04:00