Skip to content

Commit eac19d4

Browse files
[libc][math][c++23] Add next{after,down,toward,up}bf16 math functions (#153993)
This PR adds the following basic math functions for BFloat16 type along with the tests: - nextafterbf16 - nextdownbf16 - nexttowardbf16 - nextupbf16 --------- Signed-off-by: Krishna Pandey <[email protected]> Co-authored-by: OverMighty <[email protected]>
1 parent ecd8754 commit eac19d4

30 files changed

+421
-26
lines changed

libc/config/baremetal/aarch64/entrypoints.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,10 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
787787
libc.src.math.fminimum_numbf16
788788
libc.src.math.fromfpbf16
789789
libc.src.math.fromfpxbf16
790+
libc.src.math.nextafterbf16
791+
libc.src.math.nextdownbf16
792+
libc.src.math.nexttowardbf16
793+
libc.src.math.nextupbf16
790794
libc.src.math.roundbf16
791795
libc.src.math.roundevenbf16
792796
libc.src.math.truncbf16

libc/config/baremetal/arm/entrypoints.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,10 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
790790
libc.src.math.fminimum_numbf16
791791
libc.src.math.fromfpbf16
792792
libc.src.math.fromfpxbf16
793+
libc.src.math.nextafterbf16
794+
libc.src.math.nextdownbf16
795+
libc.src.math.nexttowardbf16
796+
libc.src.math.nextupbf16
793797
libc.src.math.roundbf16
794798
libc.src.math.roundevenbf16
795799
libc.src.math.truncbf16

libc/config/baremetal/riscv/entrypoints.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,10 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
790790
libc.src.math.fminimum_numbf16
791791
libc.src.math.fromfpbf16
792792
libc.src.math.fromfpxbf16
793+
libc.src.math.nextafterbf16
794+
libc.src.math.nextdownbf16
795+
libc.src.math.nexttowardbf16
796+
libc.src.math.nextupbf16
793797
libc.src.math.roundbf16
794798
libc.src.math.roundevenbf16
795799
libc.src.math.truncbf16

libc/config/darwin/aarch64/entrypoints.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,10 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
620620
libc.src.math.fminimum_numbf16
621621
libc.src.math.fromfpbf16
622622
libc.src.math.fromfpxbf16
623+
libc.src.math.nextafterbf16
624+
libc.src.math.nextdownbf16
625+
libc.src.math.nexttowardbf16
626+
libc.src.math.nextupbf16
623627
libc.src.math.roundbf16
624628
libc.src.math.roundevenbf16
625629
libc.src.math.truncbf16

libc/config/darwin/x86_64/entrypoints.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,10 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
263263
libc.src.math.fminimum_numbf16
264264
libc.src.math.fromfpbf16
265265
libc.src.math.fromfpxbf16
266+
libc.src.math.nextafterbf16
267+
libc.src.math.nextdownbf16
268+
libc.src.math.nexttowardbf16
269+
libc.src.math.nextupbf16
266270
libc.src.math.roundbf16
267271
libc.src.math.roundevenbf16
268272
libc.src.math.truncbf16

libc/config/gpu/amdgpu/entrypoints.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,10 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
646646
libc.src.math.fminimum_numbf16
647647
libc.src.math.fromfpbf16
648648
libc.src.math.fromfpxbf16
649+
libc.src.math.nextafterbf16
650+
libc.src.math.nextdownbf16
651+
libc.src.math.nexttowardbf16
652+
libc.src.math.nextupbf16
649653
libc.src.math.roundbf16
650654
libc.src.math.roundevenbf16
651655
libc.src.math.truncbf16

libc/config/gpu/nvptx/entrypoints.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,10 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
648648
libc.src.math.fminimum_numbf16
649649
libc.src.math.fromfpbf16
650650
libc.src.math.fromfpxbf16
651+
libc.src.math.nextafterbf16
652+
libc.src.math.nextdownbf16
653+
libc.src.math.nexttowardbf16
654+
libc.src.math.nextupbf16
651655
libc.src.math.roundbf16
652656
libc.src.math.roundevenbf16
653657
libc.src.math.truncbf16

libc/config/linux/aarch64/entrypoints.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,10 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
875875
libc.src.math.fminimum_numbf16
876876
libc.src.math.fromfpbf16
877877
libc.src.math.fromfpxbf16
878+
libc.src.math.nextafterbf16
879+
libc.src.math.nextdownbf16
880+
libc.src.math.nexttowardbf16
881+
libc.src.math.nextupbf16
878882
libc.src.math.roundbf16
879883
libc.src.math.roundevenbf16
880884
libc.src.math.truncbf16

libc/config/linux/arm/entrypoints.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,10 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
490490
libc.src.math.fminimum_numbf16
491491
libc.src.math.fromfpbf16
492492
libc.src.math.fromfpxbf16
493+
libc.src.math.nextafterbf16
494+
libc.src.math.nextdownbf16
495+
libc.src.math.nexttowardbf16
496+
libc.src.math.nextupbf16
493497
libc.src.math.roundbf16
494498
libc.src.math.roundevenbf16
495499
libc.src.math.truncbf16

libc/config/linux/riscv/entrypoints.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,9 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
893893
libc.src.math.fminimum_numbf16
894894
libc.src.math.fromfpbf16
895895
libc.src.math.fromfpxbf16
896+
libc.src.math.nextafterbf16
897+
libc.src.math.nextdownbf16
898+
libc.src.math.nexttowardbf16
896899
libc.src.math.roundbf16
897900
libc.src.math.roundevenbf16
898901
libc.src.math.truncbf16

0 commit comments

Comments
 (0)