summaryrefslogtreecommitdiff
path: root/libc/src/math/generic/fdimf.cpp
diff options
context:
space:
mode:
authorSiva Chandra <sivachandra@google.com>2021-02-03 00:37:16 -0800
committerSiva Chandra <sivachandra@google.com>2021-02-03 10:46:00 -0800
commitbbb7555403855f5c2a61d62ae59f1e970ea37ec1 (patch)
treee8a7846cf7322b0c6e430255997db7456e23c8e4 /libc/src/math/generic/fdimf.cpp
parent15aa78abb6ca22294e72767d5ed2aea0b1cf23f9 (diff)
[libc][NFC] Move generic math implementations to the generic directory.
This expands the pattern suggest in https://reviews.llvm.org/D95850 to all math functions.
Diffstat (limited to 'libc/src/math/generic/fdimf.cpp')
-rw-r--r--libc/src/math/generic/fdimf.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/libc/src/math/generic/fdimf.cpp b/libc/src/math/generic/fdimf.cpp
new file mode 100644
index 000000000000..c46c95a8fdef
--- /dev/null
+++ b/libc/src/math/generic/fdimf.cpp
@@ -0,0 +1,19 @@
+//===-- Implementation of fdimf function ----------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/math/fdimf.h"
+#include "src/__support/common.h"
+#include "utils/FPUtil/BasicOperations.h"
+
+namespace __llvm_libc {
+
+LLVM_LIBC_FUNCTION(float, fdimf, (float x, float y)) {
+ return fputil::fdim(x, y);
+}
+
+} // namespace __llvm_libc