Skip to content

Commit 19afb7b

Browse files
committed
fixup! [libc][math][c23] Add f16divf C23 math function
Add LIBC_INLINE to fputil::generic::div.
1 parent 612a87f commit 19afb7b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

libc/src/__support/FPUtil/generic/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,5 @@ add_header_library(
5858
libc.src.__support.FPUtil.fp_bits
5959
libc.src.__support.FPUtil.dyadic_float
6060
libc.src.__support.FPUtil.rounding_mode
61+
libc.src.__support.macros.attributes
6162
)

libc/src/__support/FPUtil/generic/div.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@
1616
#include "src/__support/FPUtil/FPBits.h"
1717
#include "src/__support/FPUtil/dyadic_float.h"
1818
#include "src/__support/FPUtil/rounding_mode.h"
19+
#include "src/__support/macros/attributes.h"
1920

2021
namespace LIBC_NAMESPACE::fputil::generic {
2122

2223
template <typename OutType, typename InType>
23-
cpp::enable_if_t<cpp::is_floating_point_v<OutType> &&
24-
cpp::is_floating_point_v<InType> &&
25-
sizeof(OutType) <= sizeof(InType),
26-
OutType>
24+
LIBC_INLINE cpp::enable_if_t<cpp::is_floating_point_v<OutType> &&
25+
cpp::is_floating_point_v<InType> &&
26+
sizeof(OutType) <= sizeof(InType),
27+
OutType>
2728
div(InType x, InType y) {
2829
using OutFPBits = FPBits<OutType>;
2930
using OutStorageType = typename OutFPBits::StorageType;

0 commit comments

Comments
 (0)