[libc-commits] [PATCH] D107229: [libc] Add differential and performance targets for sqrtf

Hedin GarcĂ­a via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Aug 2 12:30:33 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG2ab18d57d776: [libc] Add differential and performance targets for sqrtf (authored by hedingarcia).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107229/new/

https://reviews.llvm.org/D107229

Files:
  libc/test/src/math/differential_testing/CMakeLists.txt
  libc/test/src/math/differential_testing/sqrtf_diff.cpp
  libc/test/src/math/differential_testing/sqrtf_perf.cpp


Index: libc/test/src/math/differential_testing/sqrtf_perf.cpp
===================================================================
--- /dev/null
+++ libc/test/src/math/differential_testing/sqrtf_perf.cpp
@@ -0,0 +1,17 @@
+//===-- Differential test for sqrtf
+//----------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/sqrtf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_PERF(float, __llvm_libc::sqrtf, ::sqrtf,
+                                "sqrtf_perf.log")
Index: libc/test/src/math/differential_testing/sqrtf_diff.cpp
===================================================================
--- /dev/null
+++ libc/test/src/math/differential_testing/sqrtf_diff.cpp
@@ -0,0 +1,17 @@
+//===-- Differential test for sqrtf
+//----------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/sqrtf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, __llvm_libc::sqrtf, ::sqrtf,
+                                "sqrtf_diff.log")
Index: libc/test/src/math/differential_testing/CMakeLists.txt
===================================================================
--- libc/test/src/math/differential_testing/CMakeLists.txt
+++ libc/test/src/math/differential_testing/CMakeLists.txt
@@ -126,3 +126,23 @@
   COMPILE_OPTIONS
     -fno-builtin
 )
+
+add_diff_binary(
+  sqrtf_diff
+  SRCS
+    sqrtf_diff.cpp
+  DEPENDS
+    .single_input_single_output_diff
+    libc.src.math.sqrtf
+)
+
+add_diff_binary(
+  sqrtf_perf
+  SRCS
+    sqrtf_perf.cpp
+  DEPENDS
+    .single_input_single_output_diff
+    libc.src.math.sqrtf
+  COMPILE_OPTIONS
+    -fno-builtin
+)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107229.363545.patch
Type: text/x-patch
Size: 2260 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20210802/34176254/attachment.bin>


More information about the libc-commits mailing list