Skip to content

Commit 15a192c

Browse files
[libc] Enable double math functions on the GPU (#154857)
This patch adds the `acos` math function to the NVPTX build. It also adds the `sincos` math function to the `math.h` header.
1 parent 2014890 commit 15a192c

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

libc/config/gpu/nvptx/entrypoints.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ set(TARGET_LIBC_ENTRYPOINTS
280280

281281
set(TARGET_LIBM_ENTRYPOINTS
282282
# math.h entrypoints
283+
libc.src.math.acos
283284
libc.src.math.acosf
284285
libc.src.math.acoshf
285286
libc.src.math.asin

libc/include/math.yaml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2432,14 +2432,6 @@ functions:
24322432
return_type: double
24332433
arguments:
24342434
- type: double
2435-
- name: sincosf
2436-
standards:
2437-
- gnu
2438-
return_type: void
2439-
arguments:
2440-
- type: float
2441-
- type: float *
2442-
- type: float *
24432435
- name: sinf
24442436
standards:
24452437
- stdc
@@ -2453,6 +2445,22 @@ functions:
24532445
arguments:
24542446
- type: _Float16
24552447
guard: LIBC_TYPES_HAS_FLOAT16
2448+
- name: sincos
2449+
standards:
2450+
- gnu
2451+
return_type: void
2452+
arguments:
2453+
- type: double
2454+
- type: double *
2455+
- type: double *
2456+
- name: sincosf
2457+
standards:
2458+
- gnu
2459+
return_type: void
2460+
arguments:
2461+
- type: float
2462+
- type: float *
2463+
- type: float *
24562464
- name: sinhf
24572465
standards:
24582466
- stdc

0 commit comments

Comments
 (0)