Skip to content

Commit dd1cd02

Browse files
authored
[libc][math][c23] Add {fmaximum,fminimum}{,_mag,_mag_num,_num} C23 math functions (#94510)
#93566
1 parent 3c6d004 commit dd1cd02

40 files changed

+781
-74
lines changed

libc/config/linux/aarch64/entrypoints.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,15 @@ if(LIBC_TYPES_HAS_FLOAT16)
506506
libc.src.math.fdimf16
507507
libc.src.math.floorf16
508508
libc.src.math.fmaxf16
509+
libc.src.math.fmaximumf16
510+
libc.src.math.fmaximum_magf16
511+
libc.src.math.fmaximum_mag_numf16
512+
libc.src.math.fmaximum_numf16
509513
libc.src.math.fminf16
514+
libc.src.math.fminimumf16
515+
libc.src.math.fminimum_magf16
516+
libc.src.math.fminimum_mag_numf16
517+
libc.src.math.fminimum_numf16
510518
libc.src.math.fromfpf16
511519
libc.src.math.fromfpxf16
512520
libc.src.math.llrintf16

libc/config/linux/x86_64/entrypoints.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,15 @@ if(LIBC_TYPES_HAS_FLOAT16)
539539
libc.src.math.fdimf16
540540
libc.src.math.floorf16
541541
libc.src.math.fmaxf16
542+
libc.src.math.fmaximumf16
543+
libc.src.math.fmaximum_magf16
544+
libc.src.math.fmaximum_mag_numf16
545+
libc.src.math.fmaximum_numf16
542546
libc.src.math.fminf16
547+
libc.src.math.fminimumf16
548+
libc.src.math.fminimum_magf16
549+
libc.src.math.fminimum_mag_numf16
550+
libc.src.math.fminimum_numf16
543551
libc.src.math.fromfpf16
544552
libc.src.math.fromfpxf16
545553
libc.src.math.llrintf16

libc/docs/c23.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,14 @@ Additions:
6262
* nextup* |check|
6363
* nextdown* |check|
6464
* canonicalize* |check|
65-
* fmaximum*
66-
* fminimum*
67-
* fmaximum_mag*
68-
* fminimum_mag*
69-
* fmaximum_mag_num*
70-
* fminimum_mag_num*
65+
* fmaximum* |check|
66+
* fminimum* |check|
67+
* fmaximum_mag* |check|
68+
* fminimum_mag* |check|
69+
* fmaximum_num* |check|
70+
* fminimum_num* |check|
71+
* fmaximum_mag_num* |check|
72+
* fminimum_mag_num* |check|
7173
* fadd*
7274
* fsub*
7375
* fmul*

libc/docs/math/index.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,23 +138,23 @@ Basic Operations
138138
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
139139
| fmax | |check| | |check| | |check| | |check| | |check| | 7.12.12.2 | F.10.9.2 |
140140
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
141-
| fmaximum | |check| | |check| | |check| | | |check| | 7.12.12.4 | F.10.9.4 |
141+
| fmaximum | |check| | |check| | |check| | |check| | |check| | 7.12.12.4 | F.10.9.4 |
142142
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
143-
| fmaximum_mag | |check| | |check| | |check| | | |check| | 7.12.12.6 | F.10.9.4 |
143+
| fmaximum_mag | |check| | |check| | |check| | |check| | |check| | 7.12.12.6 | F.10.9.4 |
144144
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
145-
| fmaximum_mag_num | |check| | |check| | |check| | | |check| | 7.12.12.10 | F.10.9.5 |
145+
| fmaximum_mag_num | |check| | |check| | |check| | |check| | |check| | 7.12.12.10 | F.10.9.5 |
146146
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
147-
| fmaximum_num | |check| | |check| | |check| | | |check| | 7.12.12.8 | F.10.9.5 |
147+
| fmaximum_num | |check| | |check| | |check| | |check| | |check| | 7.12.12.8 | F.10.9.5 |
148148
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
149149
| fmin | |check| | |check| | |check| | |check| | |check| | 7.12.12.3 | F.10.9.3 |
150150
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
151-
| fminimum | |check| | |check| | |check| | | |check| | 7.12.12.5 | F.10.9.4 |
151+
| fminimum | |check| | |check| | |check| | |check| | |check| | 7.12.12.5 | F.10.9.4 |
152152
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
153-
| fminimum_mag | |check| | |check| | |check| | | |check| | 7.12.12.7 | F.10.9.4 |
153+
| fminimum_mag | |check| | |check| | |check| | |check| | |check| | 7.12.12.7 | F.10.9.4 |
154154
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
155-
| fminimum_mag_num | |check| | |check| | |check| | | |check| | 7.12.12.11 | F.10.9.5 |
155+
| fminimum_mag_num | |check| | |check| | |check| | |check| | |check| | 7.12.12.11 | F.10.9.5 |
156156
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
157-
| fminimum_num | |check| | |check| | |check| | | |check| | 7.12.12.9 | F.10.9.5 |
157+
| fminimum_num | |check| | |check| | |check| | |check| | |check| | 7.12.12.9 | F.10.9.5 |
158158
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
159159
| fmod | |check| | |check| | |check| | | |check| | 7.12.10.1 | F.10.7.1 |
160160
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+

libc/spec/stdc.td

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,41 +427,49 @@ def StdC : StandardSpec<"stdc"> {
427427
FunctionSpec<"fmaximum", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<DoubleType>]>,
428428
FunctionSpec<"fmaximumf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<FloatType>]>,
429429
FunctionSpec<"fmaximuml", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<LongDoubleType>]>,
430+
GuardedFunctionSpec<"fmaximumf16", RetValSpec<Float16Type>, [ArgSpec<Float16Type>, ArgSpec<Float16Type>], "LIBC_TYPES_HAS_FLOAT16">,
430431
GuardedFunctionSpec<"fmaximumf128", RetValSpec<Float128Type>, [ArgSpec<Float128Type>, ArgSpec<Float128Type>], "LIBC_TYPES_HAS_FLOAT128">,
431432

432433
FunctionSpec<"fmaximum_num", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<DoubleType>]>,
433434
FunctionSpec<"fmaximum_numf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<FloatType>]>,
434435
FunctionSpec<"fmaximum_numl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<LongDoubleType>]>,
436+
GuardedFunctionSpec<"fmaximum_numf16", RetValSpec<Float16Type>, [ArgSpec<Float16Type>, ArgSpec<Float16Type>], "LIBC_TYPES_HAS_FLOAT16">,
435437
GuardedFunctionSpec<"fmaximum_numf128", RetValSpec<Float128Type>, [ArgSpec<Float128Type>, ArgSpec<Float128Type>], "LIBC_TYPES_HAS_FLOAT128">,
436438

437439
FunctionSpec<"fmaximum_mag", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<DoubleType>]>,
438440
FunctionSpec<"fmaximum_magf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<FloatType>]>,
439441
FunctionSpec<"fmaximum_magl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<LongDoubleType>]>,
442+
GuardedFunctionSpec<"fmaximum_magf16", RetValSpec<Float16Type>, [ArgSpec<Float16Type>, ArgSpec<Float16Type>], "LIBC_TYPES_HAS_FLOAT16">,
440443
GuardedFunctionSpec<"fmaximum_magf128", RetValSpec<Float128Type>, [ArgSpec<Float128Type>, ArgSpec<Float128Type>], "LIBC_TYPES_HAS_FLOAT128">,
441444

442445
FunctionSpec<"fmaximum_mag_num", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<DoubleType>]>,
443446
FunctionSpec<"fmaximum_mag_numf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<FloatType>]>,
444447
FunctionSpec<"fmaximum_mag_numl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<LongDoubleType>]>,
448+
GuardedFunctionSpec<"fmaximum_mag_numf16", RetValSpec<Float16Type>, [ArgSpec<Float16Type>, ArgSpec<Float16Type>], "LIBC_TYPES_HAS_FLOAT16">,
445449
GuardedFunctionSpec<"fmaximum_mag_numf128", RetValSpec<Float128Type>, [ArgSpec<Float128Type>, ArgSpec<Float128Type>], "LIBC_TYPES_HAS_FLOAT128">,
446450

447451
FunctionSpec<"fminimum", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<DoubleType>]>,
448452
FunctionSpec<"fminimumf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<FloatType>]>,
449453
FunctionSpec<"fminimuml", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<LongDoubleType>]>,
454+
GuardedFunctionSpec<"fminimumf16", RetValSpec<Float16Type>, [ArgSpec<Float16Type>, ArgSpec<Float16Type>], "LIBC_TYPES_HAS_FLOAT16">,
450455
GuardedFunctionSpec<"fminimumf128", RetValSpec<Float128Type>, [ArgSpec<Float128Type>, ArgSpec<Float128Type>], "LIBC_TYPES_HAS_FLOAT128">,
451456

452457
FunctionSpec<"fminimum_num", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<DoubleType>]>,
453458
FunctionSpec<"fminimum_numf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<FloatType>]>,
454459
FunctionSpec<"fmaximum_numl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<LongDoubleType>]>,
460+
GuardedFunctionSpec<"fminimum_numf16", RetValSpec<Float16Type>, [ArgSpec<Float16Type>, ArgSpec<Float16Type>], "LIBC_TYPES_HAS_FLOAT16">,
455461
GuardedFunctionSpec<"fminimum_numf128", RetValSpec<Float128Type>, [ArgSpec<Float128Type>, ArgSpec<Float128Type>], "LIBC_TYPES_HAS_FLOAT128">,
456462

457463
FunctionSpec<"fminimum_mag", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<DoubleType>]>,
458464
FunctionSpec<"fminimum_magf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<FloatType>]>,
459465
FunctionSpec<"fminimum_magl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<LongDoubleType>]>,
466+
GuardedFunctionSpec<"fminimum_magf16", RetValSpec<Float16Type>, [ArgSpec<Float16Type>, ArgSpec<Float16Type>], "LIBC_TYPES_HAS_FLOAT16">,
460467
GuardedFunctionSpec<"fminimum_magf128", RetValSpec<Float128Type>, [ArgSpec<Float128Type>, ArgSpec<Float128Type>], "LIBC_TYPES_HAS_FLOAT128">,
461468

462469
FunctionSpec<"fminimum_mag_num", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<DoubleType>]>,
463470
FunctionSpec<"fminimum_mag_numf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<FloatType>]>,
464471
FunctionSpec<"fminimum_mag_numl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<LongDoubleType>]>,
472+
GuardedFunctionSpec<"fminimum_mag_numf16", RetValSpec<Float16Type>, [ArgSpec<Float16Type>, ArgSpec<Float16Type>], "LIBC_TYPES_HAS_FLOAT16">,
465473
GuardedFunctionSpec<"fminimum_mag_numf128", RetValSpec<Float128Type>, [ArgSpec<Float128Type>, ArgSpec<Float128Type>], "LIBC_TYPES_HAS_FLOAT128">,
466474

467475
FunctionSpec<"fma", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<DoubleType>, ArgSpec<DoubleType>]>,

libc/src/math/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,41 +135,49 @@ add_math_entrypoint_object(fminf16)
135135
add_math_entrypoint_object(fmaximum)
136136
add_math_entrypoint_object(fmaximumf)
137137
add_math_entrypoint_object(fmaximuml)
138+
add_math_entrypoint_object(fmaximumf16)
138139
add_math_entrypoint_object(fmaximumf128)
139140

140141
add_math_entrypoint_object(fmaximum_num)
141142
add_math_entrypoint_object(fmaximum_numf)
142143
add_math_entrypoint_object(fmaximum_numl)
144+
add_math_entrypoint_object(fmaximum_numf16)
143145
add_math_entrypoint_object(fmaximum_numf128)
144146

145147
add_math_entrypoint_object(fmaximum_mag)
146148
add_math_entrypoint_object(fmaximum_magf)
147149
add_math_entrypoint_object(fmaximum_magl)
150+
add_math_entrypoint_object(fmaximum_magf16)
148151
add_math_entrypoint_object(fmaximum_magf128)
149152

150153
add_math_entrypoint_object(fmaximum_mag_num)
151154
add_math_entrypoint_object(fmaximum_mag_numf)
152155
add_math_entrypoint_object(fmaximum_mag_numl)
156+
add_math_entrypoint_object(fmaximum_mag_numf16)
153157
add_math_entrypoint_object(fmaximum_mag_numf128)
154158

155159
add_math_entrypoint_object(fminimum)
156160
add_math_entrypoint_object(fminimumf)
157161
add_math_entrypoint_object(fminimuml)
162+
add_math_entrypoint_object(fminimumf16)
158163
add_math_entrypoint_object(fminimumf128)
159164

160165
add_math_entrypoint_object(fminimum_num)
161166
add_math_entrypoint_object(fminimum_numf)
162167
add_math_entrypoint_object(fminimum_numl)
168+
add_math_entrypoint_object(fminimum_numf16)
163169
add_math_entrypoint_object(fminimum_numf128)
164170

165171
add_math_entrypoint_object(fminimum_mag)
166172
add_math_entrypoint_object(fminimum_magf)
167173
add_math_entrypoint_object(fminimum_magl)
174+
add_math_entrypoint_object(fminimum_magf16)
168175
add_math_entrypoint_object(fminimum_magf128)
169176

170177
add_math_entrypoint_object(fminimum_mag_num)
171178
add_math_entrypoint_object(fminimum_mag_numf)
172179
add_math_entrypoint_object(fminimum_mag_numl)
180+
add_math_entrypoint_object(fminimum_mag_numf16)
173181
add_math_entrypoint_object(fminimum_mag_numf128)
174182

175183
add_math_entrypoint_object(fmod)

libc/src/math/fmaximum_mag_numf16.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//===-- Implementation header for fmaximum_mag_numf16 -----------*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUM_MAG_NUMF16_H
10+
#define LLVM_LIBC_SRC_MATH_FMAXIMUM_MAG_NUMF16_H
11+
12+
#include "src/__support/macros/properties/types.h"
13+
14+
namespace LIBC_NAMESPACE {
15+
16+
float16 fmaximum_mag_numf16(float16 x, float16 y);
17+
18+
} // namespace LIBC_NAMESPACE
19+
20+
#endif // LLVM_LIBC_SRC_MATH_FMAXIMUM_MAG_NUMF16_H

libc/src/math/fmaximum_magf16.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//===-- Implementation header for fmaximum_magf16 ---------------*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUM_MAGF16_H
10+
#define LLVM_LIBC_SRC_MATH_FMAXIMUM_MAGF16_H
11+
12+
#include "src/__support/macros/properties/types.h"
13+
14+
namespace LIBC_NAMESPACE {
15+
16+
float16 fmaximum_magf16(float16 x, float16 y);
17+
18+
} // namespace LIBC_NAMESPACE
19+
20+
#endif // LLVM_LIBC_SRC_MATH_FMAXIMUM_MAGF16_H

libc/src/math/fmaximum_numf16.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//===-- Implementation header for fmaximum_numf16 ---------------*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUM_NUMF16_H
10+
#define LLVM_LIBC_SRC_MATH_FMAXIMUM_NUMF16_H
11+
12+
#include "src/__support/macros/properties/types.h"
13+
14+
namespace LIBC_NAMESPACE {
15+
16+
float16 fmaximum_numf16(float16 x, float16 y);
17+
18+
} // namespace LIBC_NAMESPACE
19+
20+
#endif // LLVM_LIBC_SRC_MATH_FMAXIMUM_NUMF16_H

libc/src/math/fmaximumf16.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//===-- Implementation header for fmaximumf16 -------------------*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUMF16_H
10+
#define LLVM_LIBC_SRC_MATH_FMAXIMUMF16_H
11+
12+
#include "src/__support/macros/properties/types.h"
13+
14+
namespace LIBC_NAMESPACE {
15+
16+
float16 fmaximumf16(float16 x, float16 y);
17+
18+
} // namespace LIBC_NAMESPACE
19+
20+
#endif // LLVM_LIBC_SRC_MATH_FMAXIMUMF16_H

libc/src/math/fminimum_mag_numf16.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//===-- Implementation header for fminimum_mag_numf16 -----------*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_NUMF16_H
10+
#define LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_NUMF16_H
11+
12+
#include "src/__support/macros/properties/types.h"
13+
14+
namespace LIBC_NAMESPACE {
15+
16+
float16 fminimum_mag_numf16(float16 x, float16 y);
17+
18+
} // namespace LIBC_NAMESPACE
19+
20+
#endif // LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_NUMF16_H

libc/src/math/fminimum_magf16.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//===-- Implementation header for fminimum_magf16 ---------------*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef LLVM_LIBC_SRC_MATH_FMINIMUM_MAGF16_H
10+
#define LLVM_LIBC_SRC_MATH_FMINIMUM_MAGF16_H
11+
12+
#include "src/__support/macros/properties/types.h"
13+
14+
namespace LIBC_NAMESPACE {
15+
16+
float16 fminimum_magf16(float16 x, float16 y);
17+
18+
} // namespace LIBC_NAMESPACE
19+
20+
#endif // LLVM_LIBC_SRC_MATH_FMINIMUM_MAGF16_H

libc/src/math/fminimum_numf16.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//===-- Implementation header for fminimum_numf16 ---------------*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef LLVM_LIBC_SRC_MATH_FMINIMUM_NUMF16_H
10+
#define LLVM_LIBC_SRC_MATH_FMINIMUM_NUMF16_H
11+
12+
#include "src/__support/macros/properties/types.h"
13+
14+
namespace LIBC_NAMESPACE {
15+
16+
float16 fminimum_numf16(float16 x, float16 y);
17+
18+
} // namespace LIBC_NAMESPACE
19+
20+
#endif // LLVM_LIBC_SRC_MATH_FMINIMUM_NUMF16_H

libc/src/math/fminimumf16.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//===-- Implementation header for fminimumf16 -------------------*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef LLVM_LIBC_SRC_MATH_FMINIMUMF16_H
10+
#define LLVM_LIBC_SRC_MATH_FMINIMUMF16_H
11+
12+
#include "src/__support/macros/properties/types.h"
13+
14+
namespace LIBC_NAMESPACE {
15+
16+
float16 fminimumf16(float16 x, float16 y);
17+
18+
} // namespace LIBC_NAMESPACE
19+
20+
#endif // LLVM_LIBC_SRC_MATH_FMINIMUMF16_H

0 commit comments

Comments
 (0)