diff --git a/libc/docs/math/index.rst b/libc/docs/math/index.rst index 7f2a1b2f3e2824..b22ed5127c179e 100644 --- a/libc/docs/math/index.rst +++ b/libc/docs/math/index.rst @@ -567,13 +567,13 @@ Legends: Performance =========== -* Simple performance testings are located at: `libc/test/src/math/differential_testing `_. +* Simple performance testings are located at: `libc/test/src/math/performance_testing `_. * We also use the *perf* tool from the `CORE-MATH `_ project: `link `_. The performance results from the CORE-MATH's perf tool are reported in the table below, using the system library as reference (such as the `GNU C library `_ - on Linux). Fmod performance results obtained with "differential_testing". + on Linux). Fmod performance results obtained with "performance_testing". +--------------+-------------------------------+-------------------------------+-------------------------------------+----------------------------------------------------------------------+ | | Reciprocal throughput (clk) | Latency (clk) | Testing ranges | Testing configuration | diff --git a/libc/src/math/docs/add_math_function.md b/libc/src/math/docs/add_math_function.md index 6f08bf037c578e..f8bc8a3bdd8b1d 100644 --- a/libc/src/math/docs/add_math_function.md +++ b/libc/src/math/docs/add_math_function.md @@ -129,11 +129,11 @@ implementation (which is very often glibc). - Add a performance test to: ``` - libc/test/src/math/differential_testing/_perf.cpp + libc/test/src/math/performance_testing/_perf.cpp ``` - Add the corresponding entry point to: ``` - libc/test/src/math/differential_testing/CMakeLists.txt + libc/test/src/math/performance_testing/CMakeLists.txt ``` ## Build and Run @@ -189,8 +189,8 @@ implementation (which is very often glibc). - Build and Run performance test: ``` - $ ninja libc.test.src.math.differential_testing._perf - $ projects/libc/test/src/math/differential_testing/libc.test.src.math.differential_testing._perf + $ ninja libc.test.src.math.performance_testing._perf + $ projects/libc/test/src/math/performance_testing/libc.test.src.math.performance_testing._perf $ cat _perf.log ``` diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt index ad7dfdb3dfd9ec..b8a4aafcd97aa2 100644 --- a/libc/test/src/math/CMakeLists.txt +++ b/libc/test/src/math/CMakeLists.txt @@ -1721,5 +1721,5 @@ add_subdirectory(smoke) if(NOT LLVM_LIBC_FULL_BUILD) add_subdirectory(exhaustive) - add_subdirectory(differential_testing) + add_subdirectory(performance_testing) endif() diff --git a/libc/test/src/math/differential_testing/ceilf_diff.cpp b/libc/test/src/math/differential_testing/ceilf_diff.cpp deleted file mode 100644 index 7c0bb1e95a03fd..00000000000000 --- a/libc/test/src/math/differential_testing/ceilf_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for ceilf----------------------------------------===// -// -// 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/ceilf.h" - -#include - -SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, LIBC_NAMESPACE::ceilf, ::ceilf, - "ceilf_diff.log") diff --git a/libc/test/src/math/differential_testing/cosf_diff.cpp b/libc/test/src/math/differential_testing/cosf_diff.cpp deleted file mode 100644 index ee3102384a8e6b..00000000000000 --- a/libc/test/src/math/differential_testing/cosf_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for cosf ----------------------------------------===// -// -// 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/cosf.h" - -#include - -SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, LIBC_NAMESPACE::cosf, ::cosf, - "cosf_diff.log") diff --git a/libc/test/src/math/differential_testing/exp2f_diff.cpp b/libc/test/src/math/differential_testing/exp2f_diff.cpp deleted file mode 100644 index 545c6de320fc7c..00000000000000 --- a/libc/test/src/math/differential_testing/exp2f_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for exp2f----------------------------------------===// -// -// 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/exp2f.h" - -#include - -SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, LIBC_NAMESPACE::exp2f, ::exp2f, - "exp2f_diff.log") diff --git a/libc/test/src/math/differential_testing/expf_diff.cpp b/libc/test/src/math/differential_testing/expf_diff.cpp deleted file mode 100644 index 7c2e90744bc915..00000000000000 --- a/libc/test/src/math/differential_testing/expf_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for expf ----------------------------------------===// -// -// 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/expf.h" - -#include - -SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, LIBC_NAMESPACE::expf, ::expf, - "expf_diff.log") diff --git a/libc/test/src/math/differential_testing/expm1f_diff.cpp b/libc/test/src/math/differential_testing/expm1f_diff.cpp deleted file mode 100644 index 3cbd8a99690fb4..00000000000000 --- a/libc/test/src/math/differential_testing/expm1f_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for expm1f --------------------------------------===// -// -// 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/expm1f.h" - -#include - -SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, LIBC_NAMESPACE::expm1f, ::expm1f, - "expm1f_diff.log") diff --git a/libc/test/src/math/differential_testing/fabsf_diff.cpp b/libc/test/src/math/differential_testing/fabsf_diff.cpp deleted file mode 100644 index 9bf9eff888fb51..00000000000000 --- a/libc/test/src/math/differential_testing/fabsf_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for fabsf----------------------------------------===// -// -// 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/fabsf.h" - -#include - -SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, LIBC_NAMESPACE::fabsf, ::fabsf, - "fabsf_diff.log") diff --git a/libc/test/src/math/differential_testing/floorf_diff.cpp b/libc/test/src/math/differential_testing/floorf_diff.cpp deleted file mode 100644 index 6d72927b5010c5..00000000000000 --- a/libc/test/src/math/differential_testing/floorf_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for floorf---------------------------------------===// -// -// 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/floorf.h" - -#include - -SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, LIBC_NAMESPACE::floorf, ::floorf, - "floorf_diff.log") diff --git a/libc/test/src/math/differential_testing/fmod_diff.cpp b/libc/test/src/math/differential_testing/fmod_diff.cpp deleted file mode 100644 index 026e529c6cae2a..00000000000000 --- a/libc/test/src/math/differential_testing/fmod_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for fmod ----------------------------------------===// -// -// 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 "BinaryOpSingleOutputDiff.h" - -#include "src/math/fmod.h" - -#include - -BINARY_OP_SINGLE_OUTPUT_DIFF(double, LIBC_NAMESPACE::fmod, ::fmod, - "fmod_diff.log") diff --git a/libc/test/src/math/differential_testing/fmodf_diff.cpp b/libc/test/src/math/differential_testing/fmodf_diff.cpp deleted file mode 100644 index 7029b1ee42cd0e..00000000000000 --- a/libc/test/src/math/differential_testing/fmodf_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for fmodf ---------------------------------------===// -// -// 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 "BinaryOpSingleOutputDiff.h" - -#include "src/math/fmodf.h" - -#include - -BINARY_OP_SINGLE_OUTPUT_DIFF(float, LIBC_NAMESPACE::fmodf, ::fmodf, - "fmodf_diff.log") diff --git a/libc/test/src/math/differential_testing/hypot_diff.cpp b/libc/test/src/math/differential_testing/hypot_diff.cpp deleted file mode 100644 index c61e589bdb2dff..00000000000000 --- a/libc/test/src/math/differential_testing/hypot_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for hypot ---------------------------------------===// -// -// 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 "BinaryOpSingleOutputDiff.h" - -#include "src/math/hypot.h" - -#include - -BINARY_OP_SINGLE_OUTPUT_DIFF(double, LIBC_NAMESPACE::hypot, ::hypot, - "hypot_diff.log") diff --git a/libc/test/src/math/differential_testing/hypotf_diff.cpp b/libc/test/src/math/differential_testing/hypotf_diff.cpp deleted file mode 100644 index d1c70fc2b6edbd..00000000000000 --- a/libc/test/src/math/differential_testing/hypotf_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for hypotf --------------------------------------===// -// -// 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 "BinaryOpSingleOutputDiff.h" - -#include "src/math/hypotf.h" - -#include - -BINARY_OP_SINGLE_OUTPUT_DIFF(float, LIBC_NAMESPACE::hypotf, ::hypotf, - "hypotf_diff.log") diff --git a/libc/test/src/math/differential_testing/log2f_diff.cpp b/libc/test/src/math/differential_testing/log2f_diff.cpp deleted file mode 100644 index aef431dce48701..00000000000000 --- a/libc/test/src/math/differential_testing/log2f_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for log2f ---------------------------------------===// -// -// 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/log2f.h" - -#include - -SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, LIBC_NAMESPACE::log2f, ::log2f, - "log2f_diff.log") diff --git a/libc/test/src/math/differential_testing/logbf_diff.cpp b/libc/test/src/math/differential_testing/logbf_diff.cpp deleted file mode 100644 index 37441eb40a4dfa..00000000000000 --- a/libc/test/src/math/differential_testing/logbf_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for logbf----------------------------------------===// -// -// 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/logbf.h" - -#include - -SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, LIBC_NAMESPACE::logbf, ::logbf, - "logbf_diff.log") diff --git a/libc/test/src/math/differential_testing/logf_diff.cpp b/libc/test/src/math/differential_testing/logf_diff.cpp deleted file mode 100644 index 4ed1307f712081..00000000000000 --- a/libc/test/src/math/differential_testing/logf_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for logf ----------------------------------------===// -// -// 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/logf.h" - -#include - -SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, LIBC_NAMESPACE::logf, ::logf, - "logf_diff.log") diff --git a/libc/test/src/math/differential_testing/nearbyintf_diff.cpp b/libc/test/src/math/differential_testing/nearbyintf_diff.cpp deleted file mode 100644 index 14200116883db4..00000000000000 --- a/libc/test/src/math/differential_testing/nearbyintf_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for nearbyintf-----------------------------------===// -// -// 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/nearbyintf.h" - -#include - -SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, LIBC_NAMESPACE::nearbyintf, ::nearbyintf, - "nearbyintf_diff.log") diff --git a/libc/test/src/math/differential_testing/rintf_diff.cpp b/libc/test/src/math/differential_testing/rintf_diff.cpp deleted file mode 100644 index e60f66085e5d70..00000000000000 --- a/libc/test/src/math/differential_testing/rintf_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for rintf----------------------------------------===// -// -// 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/rintf.h" - -#include - -SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, LIBC_NAMESPACE::rintf, ::rintf, - "rintf_diff.log") diff --git a/libc/test/src/math/differential_testing/roundf_diff.cpp b/libc/test/src/math/differential_testing/roundf_diff.cpp deleted file mode 100644 index e1401a01af3574..00000000000000 --- a/libc/test/src/math/differential_testing/roundf_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for roundf---------------------------------------===// -// -// 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/roundf.h" - -#include - -SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, LIBC_NAMESPACE::roundf, ::roundf, - "roundf_diff.log") diff --git a/libc/test/src/math/differential_testing/sinf_diff.cpp b/libc/test/src/math/differential_testing/sinf_diff.cpp deleted file mode 100644 index cb4557e6796b55..00000000000000 --- a/libc/test/src/math/differential_testing/sinf_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for sinf ----------------------------------------===// -// -// 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/sinf.h" - -#include - -SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, LIBC_NAMESPACE::sinf, ::sinf, - "sinf_diff.log") diff --git a/libc/test/src/math/differential_testing/sqrtf_diff.cpp b/libc/test/src/math/differential_testing/sqrtf_diff.cpp deleted file mode 100644 index 22ddeaac9caf99..00000000000000 --- a/libc/test/src/math/differential_testing/sqrtf_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- 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 - -SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, LIBC_NAMESPACE::sqrtf, ::sqrtf, - "sqrtf_diff.log") diff --git a/libc/test/src/math/differential_testing/truncf_diff.cpp b/libc/test/src/math/differential_testing/truncf_diff.cpp deleted file mode 100644 index 7f6ac4e6a92694..00000000000000 --- a/libc/test/src/math/differential_testing/truncf_diff.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Differential test for truncf---------------------------------------===// -// -// 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/truncf.h" - -#include - -SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, LIBC_NAMESPACE::truncf, ::truncf, - "truncf_diff.log") diff --git a/libc/test/src/math/differential_testing/BinaryOpSingleOutputDiff.h b/libc/test/src/math/performance_testing/BinaryOpSingleOutputPerf.h similarity index 70% rename from libc/test/src/math/differential_testing/BinaryOpSingleOutputDiff.h rename to libc/test/src/math/performance_testing/BinaryOpSingleOutputPerf.h index 48572e78e5153e..68d37b46b77c73 100644 --- a/libc/test/src/math/differential_testing/BinaryOpSingleOutputDiff.h +++ b/libc/test/src/math/performance_testing/BinaryOpSingleOutputPerf.h @@ -7,14 +7,14 @@ //===----------------------------------------------------------------------===// #include "src/__support/FPUtil/FPBits.h" -#include "test/src/math/differential_testing/Timer.h" +#include "test/src/math/performance_testing/Timer.h" #include namespace LIBC_NAMESPACE { namespace testing { -template class BinaryOpSingleOutputDiff { +template class BinaryOpSingleOutputPerf { using FPBits = fputil::FPBits; using StorageType = typename FPBits::StorageType; static constexpr StorageType UIntMax = @@ -23,40 +23,6 @@ template class BinaryOpSingleOutputDiff { public: typedef T Func(T, T); - static uint64_t run_diff_in_range(Func myFunc, Func otherFunc, - StorageType startingBit, - StorageType endingBit, StorageType N, - std::ofstream &log) { - uint64_t result = 0; - if (endingBit < startingBit) { - return result; - } - - StorageType step = (endingBit - startingBit) / N; - for (StorageType bitsX = startingBit, bitsY = endingBit;; - bitsX += step, bitsY -= step) { - T x = T(FPBits(bitsX)); - T y = T(FPBits(bitsY)); - FPBits myBits = FPBits(myFunc(x, y)); - FPBits otherBits = FPBits(otherFunc(x, y)); - if (myBits.uintval() != otherBits.uintval()) { - result++; - log << " Input: " << bitsX << ", " << bitsY << " (" << x << ", " - << y << ")\n" - << " My result: " << myBits.uintval() << " (" << myBits.get_val() - << ")\n" - << "Other result: " << otherBits.uintval() << " (" - << otherBits.get_val() << ")\n" - << '\n'; - } - - if (endingBit - bitsX < step) { - break; - } - } - return result; - } - static void run_perf_in_range(Func myFunc, Func otherFunc, StorageType startingBit, StorageType endingBit, StorageType N, std::ofstream &log) { @@ -69,8 +35,8 @@ template class BinaryOpSingleOutputDiff { StorageType step = (endingBit - startingBit) / N; for (StorageType bitsX = startingBit, bitsY = endingBit;; bitsX += step, bitsY -= step) { - T x = T(FPBits(bitsX)); - T y = T(FPBits(bitsY)); + T x = FPBits(bitsX).get_val(); + T y = FPBits(bitsY).get_val(); result = func(x, y); if (endingBit - bitsX < step) { break; @@ -110,12 +76,12 @@ template class BinaryOpSingleOutputDiff { log << " Performance tests with inputs in denormal range:\n"; run_perf_in_range(myFunc, otherFunc, /* startingBit= */ StorageType(0), /* endingBit= */ FPBits::max_subnormal().uintval(), - 1'000'001, log); + 10'000'001, log); log << "\n Performance tests with inputs in normal range:\n"; run_perf_in_range(myFunc, otherFunc, /* startingBit= */ FPBits::min_normal().uintval(), /* endingBit= */ FPBits::max_normal().uintval(), - 100'000'001, log); + 10'000'001, log); log << "\n Performance tests with inputs in normal range with exponents " "close to each other:\n"; run_perf_in_range( @@ -148,16 +114,9 @@ template class BinaryOpSingleOutputDiff { } // namespace testing } // namespace LIBC_NAMESPACE -#define BINARY_OP_SINGLE_OUTPUT_DIFF(T, myFunc, otherFunc, filename) \ - int main() { \ - LIBC_NAMESPACE::testing::BinaryOpSingleOutputDiff::run_diff( \ - &myFunc, &otherFunc, filename); \ - return 0; \ - } - #define BINARY_OP_SINGLE_OUTPUT_PERF(T, myFunc, otherFunc, filename) \ int main() { \ - LIBC_NAMESPACE::testing::BinaryOpSingleOutputDiff::run_perf( \ + LIBC_NAMESPACE::testing::BinaryOpSingleOutputPerf::run_perf( \ &myFunc, &otherFunc, filename); \ return 0; \ } diff --git a/libc/test/src/math/differential_testing/CMakeLists.txt b/libc/test/src/math/performance_testing/CMakeLists.txt similarity index 56% rename from libc/test/src/math/differential_testing/CMakeLists.txt rename to libc/test/src/math/performance_testing/CMakeLists.txt index 878f81f1d573c8..d20c2eb303a7cc 100644 --- a/libc/test/src/math/differential_testing/CMakeLists.txt +++ b/libc/test/src/math/performance_testing/CMakeLists.txt @@ -4,28 +4,28 @@ add_library( Timer.h ) -# A convenience target to build all differential tests. -add_custom_target(libc-math-differential-tests) +# A convenience target to build all performance tests. +add_custom_target(libc-math-performance-tests) -function(add_diff_binary target_name) +function(add_perf_binary target_name) cmake_parse_arguments( - "DIFF" + "PERF" "" # No optional arguments "SUITE;CXX_STANDARD" # Single value arguments "SRCS;HDRS;DEPENDS;COMPILE_OPTIONS" # Multi-value arguments ${ARGN} ) - if(NOT DIFF_SRCS) - message(FATAL_ERROR "'add_diff_binary' target requires a SRCS list of .cpp " + if(NOT PERF_SRCS) + message(FATAL_ERROR "'add_perf_binary' target requires a SRCS list of .cpp " "files.") endif() - if(NOT DIFF_DEPENDS) - message(FATAL_ERROR "'add_diff_binary' target requires a DEPENDS list of " + if(NOT PERF_DEPENDS) + message(FATAL_ERROR "'add_perf_binary' target requires a DEPENDS list of " "'add_entrypoint_object' targets.") endif() get_fq_target_name(${target_name} fq_target_name) - get_fq_deps_list(fq_deps_list ${DIFF_DEPENDS}) + get_fq_deps_list(fq_deps_list ${PERF_DEPENDS}) get_object_files_for_test( link_object_files skipped_entrypoints_list ${fq_deps_list}) if(skipped_entrypoints_list) @@ -40,18 +40,18 @@ function(add_diff_binary target_name) add_executable( ${fq_target_name} EXCLUDE_FROM_ALL - ${DIFF_SRCS} - ${DIFF_HDRS} + ${PERF_SRCS} + ${PERF_HDRS} ) target_include_directories( ${fq_target_name} PRIVATE ${LIBC_SOURCE_DIR} ) - if(DIFF_COMPILE_OPTIONS) + if(PERF_COMPILE_OPTIONS) target_compile_options( ${fq_target_name} - PRIVATE ${DIFF_COMPILE_OPTIONS} + PRIVATE ${PERF_COMPILE_OPTIONS} ) endif() @@ -62,11 +62,11 @@ function(add_diff_binary target_name) set_target_properties(${fq_target_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - if(DIFF_CXX_STANDARD) + if(PERF_CXX_STANDARD) set_target_properties( ${fq_target_name} PROPERTIES - CXX_STANDARD ${DIFF_CXX_STANDARD} + CXX_STANDARD ${PERF_CXX_STANDARD} ) endif() @@ -75,31 +75,22 @@ function(add_diff_binary target_name) libc.src.__support.FPUtil.fp_bits ${fq_deps_list} ) - add_dependencies(libc-math-differential-tests ${fq_target_name}) + add_dependencies(libc-math-performance-tests ${fq_target_name}) endfunction() add_header_library( single_input_single_output_diff HDRS - SingleInputSingleOutputDiff.h + SingleInputSingleOutputPerf.h ) add_header_library( binary_op_single_output_diff HDRS - BinaryOpSingleOutputDiff.h + BinaryOpSingleOutputPerf.h ) -add_diff_binary( - sinf_diff - SRCS - sinf_diff.cpp - DEPENDS - .single_input_single_output_diff - libc.src.math.sinf -) - -add_diff_binary( +add_perf_binary( sinf_perf SRCS sinf_perf.cpp @@ -110,16 +101,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - cosf_diff - SRCS - cosf_diff.cpp - DEPENDS - .single_input_single_output_diff - libc.src.math.cosf -) - -add_diff_binary( +add_perf_binary( cosf_perf SRCS cosf_perf.cpp @@ -130,16 +112,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - expm1f_diff - SRCS - expm1f_diff.cpp - DEPENDS - .single_input_single_output_diff - libc.src.math.expm1f -) - -add_diff_binary( +add_perf_binary( expm1f_perf SRCS expm1f_perf.cpp @@ -150,16 +123,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - ceilf_diff - SRCS - ceilf_diff.cpp - DEPENDS - .single_input_single_output_diff - libc.src.math.ceilf -) - -add_diff_binary( +add_perf_binary( ceilf_perf SRCS ceilf_perf.cpp @@ -170,16 +134,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - exp2f_diff - SRCS - exp2f_diff.cpp - DEPENDS - .single_input_single_output_diff - libc.src.math.exp2f -) - -add_diff_binary( +add_perf_binary( exp2f_perf SRCS exp2f_perf.cpp @@ -190,16 +145,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - expf_diff - SRCS - expf_diff.cpp - DEPENDS - .single_input_single_output_diff - libc.src.math.expf -) - -add_diff_binary( +add_perf_binary( expf_perf SRCS expf_perf.cpp @@ -210,16 +156,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - fabsf_diff - SRCS - fabsf_diff.cpp - DEPENDS - .single_input_single_output_diff - libc.src.math.fabsf -) - -add_diff_binary( +add_perf_binary( fabsf_perf SRCS fabsf_perf.cpp @@ -230,16 +167,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - floorf_diff - SRCS - floorf_diff.cpp - DEPENDS - .single_input_single_output_diff - libc.src.math.floorf -) - -add_diff_binary( +add_perf_binary( floorf_perf SRCS floorf_perf.cpp @@ -250,7 +178,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( +add_perf_binary( log10f_perf SRCS log10f_perf.cpp @@ -261,7 +189,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( +add_perf_binary( log1pf_perf SRCS log1pf_perf.cpp @@ -272,18 +200,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - log2f_diff - SRCS - log2f_diff.cpp - DEPENDS - .single_input_single_output_diff - libc.src.math.log2f - COMPILE_OPTIONS - -fno-builtin -) - -add_diff_binary( +add_perf_binary( log2f_perf SRCS log2f_perf.cpp @@ -294,18 +211,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - logf_diff - SRCS - logf_diff.cpp - DEPENDS - .single_input_single_output_diff - libc.src.math.logf - COMPILE_OPTIONS - -fno-builtin -) - -add_diff_binary( +add_perf_binary( logf_perf SRCS logf_perf.cpp @@ -316,16 +222,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - logbf_diff - SRCS - logbf_diff.cpp - DEPENDS - .single_input_single_output_diff - libc.src.math.logbf -) - -add_diff_binary( +add_perf_binary( logbf_perf SRCS logbf_perf.cpp @@ -336,16 +233,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - nearbyintf_diff - SRCS - nearbyintf_diff.cpp - DEPENDS - .single_input_single_output_diff - libc.src.math.nearbyintf -) - -add_diff_binary( +add_perf_binary( nearbyintf_perf SRCS nearbyintf_perf.cpp @@ -356,16 +244,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - rintf_diff - SRCS - rintf_diff.cpp - DEPENDS - .single_input_single_output_diff - libc.src.math.rintf -) - -add_diff_binary( +add_perf_binary( rintf_perf SRCS rintf_perf.cpp @@ -376,16 +255,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - roundf_diff - SRCS - roundf_diff.cpp - DEPENDS - .single_input_single_output_diff - libc.src.math.roundf -) - -add_diff_binary( +add_perf_binary( roundf_perf SRCS roundf_perf.cpp @@ -396,16 +266,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - sqrtf_diff - SRCS - sqrtf_diff.cpp - DEPENDS - .single_input_single_output_diff - libc.src.math.sqrtf -) - -add_diff_binary( +add_perf_binary( sqrtf_perf SRCS sqrtf_perf.cpp @@ -416,16 +277,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - truncf_diff - SRCS - truncf_diff.cpp - DEPENDS - .single_input_single_output_diff - libc.src.math.truncf -) - -add_diff_binary( +add_perf_binary( truncf_perf SRCS truncf_perf.cpp @@ -436,18 +288,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - hypotf_diff - SRCS - hypotf_diff.cpp - DEPENDS - .binary_op_single_output_diff - libc.src.math.hypotf - COMPILE_OPTIONS - -fno-builtin -) - -add_diff_binary( +add_perf_binary( hypotf_perf SRCS hypotf_perf.cpp @@ -458,18 +299,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - hypot_diff - SRCS - hypot_diff.cpp - DEPENDS - .binary_op_single_output_diff - libc.src.math.hypot - COMPILE_OPTIONS - -fno-builtin -) - -add_diff_binary( +add_perf_binary( hypot_perf SRCS hypot_perf.cpp @@ -480,16 +310,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - fmodf_diff - SRCS - fmodf_diff.cpp - DEPENDS - .single_input_single_output_diff - libc.src.math.fmodf -) - -add_diff_binary( +add_perf_binary( fmodf_perf SRCS fmodf_perf.cpp @@ -500,16 +321,7 @@ add_diff_binary( -fno-builtin ) -add_diff_binary( - fmod_diff - SRCS - fmod_diff.cpp - DEPENDS - .single_input_single_output_diff - libc.src.math.fmod -) - -add_diff_binary( +add_perf_binary( fmod_perf SRCS fmod_perf.cpp diff --git a/libc/test/src/math/differential_testing/SingleInputSingleOutputDiff.h b/libc/test/src/math/performance_testing/SingleInputSingleOutputPerf.h similarity index 64% rename from libc/test/src/math/differential_testing/SingleInputSingleOutputDiff.h rename to libc/test/src/math/performance_testing/SingleInputSingleOutputPerf.h index 5e8310e889dc67..b5b38313a69ca9 100644 --- a/libc/test/src/math/differential_testing/SingleInputSingleOutputDiff.h +++ b/libc/test/src/math/performance_testing/SingleInputSingleOutputPerf.h @@ -7,14 +7,14 @@ //===----------------------------------------------------------------------===// #include "src/__support/FPUtil/FPBits.h" -#include "test/src/math/differential_testing/Timer.h" +#include "test/src/math/performance_testing/Timer.h" #include namespace LIBC_NAMESPACE { namespace testing { -template class SingleInputSingleOutputDiff { +template class SingleInputSingleOutputPerf { using FPBits = fputil::FPBits; using StorageType = typename FPBits::StorageType; static constexpr StorageType UIntMax = @@ -23,40 +23,18 @@ template class SingleInputSingleOutputDiff { public: typedef T Func(T); - static void runDiff(Func myFunc, Func otherFunc, const char *logFile) { - StorageType diffCount = 0; - std::ofstream log(logFile); - log << "Starting diff for values from 0 to " << UIntMax << '\n' - << "Only differing results will be logged.\n\n"; - for (StorageType bits = 0;; ++bits) { - T x = T(FPBits(bits)); - T myResult = myFunc(x); - T otherResult = otherFunc(x); - StorageType myBits = FPBits(myResult).uintval(); - StorageType otherBits = FPBits(otherResult).uintval(); - if (myBits != otherBits) { - ++diffCount; - log << " Input: " << bits << " (" << x << ")\n" - << " My result: " << myBits << " (" << myResult << ")\n" - << "Other result: " << otherBits << " (" << otherResult << ")\n" - << '\n'; - } - if (bits == UIntMax) - break; - } - log << "Total number of differing results: " << diffCount << '\n'; - } - static void runPerfInRange(Func myFunc, Func otherFunc, StorageType startingBit, StorageType endingBit, std::ofstream &log) { auto runner = [=](Func func) { + constexpr StorageType N = 10'010'001; + StorageType step = (endingBit - startingBit) / N; + if (step == 0) + step = 1; volatile T result; - for (StorageType bits = startingBit;; ++bits) { - T x = T(FPBits(bits)); + for (StorageType bits = startingBit; bits < endingBit; bits += step) { + T x = FPBits(bits).get_val(); result = func(x); - if (bits == endingBit) - break; } }; @@ -104,16 +82,9 @@ template class SingleInputSingleOutputDiff { } // namespace testing } // namespace LIBC_NAMESPACE -#define SINGLE_INPUT_SINGLE_OUTPUT_DIFF(T, myFunc, otherFunc, filename) \ - int main() { \ - LIBC_NAMESPACE::testing::SingleInputSingleOutputDiff::runDiff( \ - &myFunc, &otherFunc, filename); \ - return 0; \ - } - #define SINGLE_INPUT_SINGLE_OUTPUT_PERF(T, myFunc, otherFunc, filename) \ int main() { \ - LIBC_NAMESPACE::testing::SingleInputSingleOutputDiff::runPerf( \ + LIBC_NAMESPACE::testing::SingleInputSingleOutputPerf::runPerf( \ &myFunc, &otherFunc, filename); \ return 0; \ } diff --git a/libc/test/src/math/differential_testing/Timer.cpp b/libc/test/src/math/performance_testing/Timer.cpp similarity index 100% rename from libc/test/src/math/differential_testing/Timer.cpp rename to libc/test/src/math/performance_testing/Timer.cpp diff --git a/libc/test/src/math/differential_testing/Timer.h b/libc/test/src/math/performance_testing/Timer.h similarity index 77% rename from libc/test/src/math/differential_testing/Timer.h rename to libc/test/src/math/performance_testing/Timer.h index 0d9518c37d9e0f..2327ede260ab9d 100644 --- a/libc/test/src/math/differential_testing/Timer.h +++ b/libc/test/src/math/performance_testing/Timer.h @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_LIBC_TEST_SRC_MATH_DIFFERENTIAL_TESTING_TIMER_H -#define LLVM_LIBC_TEST_SRC_MATH_DIFFERENTIAL_TESTING_TIMER_H +#ifndef LLVM_LIBC_TEST_SRC_MATH_PERFORMACE_TESTING_TIMER_H +#define LLVM_LIBC_TEST_SRC_MATH_PERFORMACE_TESTING_TIMER_H #include @@ -30,4 +30,4 @@ class Timer { } // namespace testing } // namespace LIBC_NAMESPACE -#endif // LLVM_LIBC_TEST_SRC_MATH_DIFFERENTIAL_TESTING_TIMER_H +#endif // LLVM_LIBC_TEST_SRC_MATH_PERFORMANCE_TESTING_TIMER_H diff --git a/libc/test/src/math/differential_testing/ceilf_perf.cpp b/libc/test/src/math/performance_testing/ceilf_perf.cpp similarity index 92% rename from libc/test/src/math/differential_testing/ceilf_perf.cpp rename to libc/test/src/math/performance_testing/ceilf_perf.cpp index c304231e0678de..04e96f6fb2dccc 100644 --- a/libc/test/src/math/differential_testing/ceilf_perf.cpp +++ b/libc/test/src/math/performance_testing/ceilf_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SingleInputSingleOutputDiff.h" +#include "SingleInputSingleOutputPerf.h" #include "src/math/ceilf.h" diff --git a/libc/test/src/math/differential_testing/cosf_perf.cpp b/libc/test/src/math/performance_testing/cosf_perf.cpp similarity index 92% rename from libc/test/src/math/differential_testing/cosf_perf.cpp rename to libc/test/src/math/performance_testing/cosf_perf.cpp index 981a94133b8040..1501b8bf254044 100644 --- a/libc/test/src/math/differential_testing/cosf_perf.cpp +++ b/libc/test/src/math/performance_testing/cosf_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SingleInputSingleOutputDiff.h" +#include "SingleInputSingleOutputPerf.h" #include "src/math/cosf.h" diff --git a/libc/test/src/math/differential_testing/exp2f_perf.cpp b/libc/test/src/math/performance_testing/exp2f_perf.cpp similarity index 92% rename from libc/test/src/math/differential_testing/exp2f_perf.cpp rename to libc/test/src/math/performance_testing/exp2f_perf.cpp index 4aae5220e6a516..19a70ac6569aa4 100644 --- a/libc/test/src/math/differential_testing/exp2f_perf.cpp +++ b/libc/test/src/math/performance_testing/exp2f_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SingleInputSingleOutputDiff.h" +#include "SingleInputSingleOutputPerf.h" #include "src/math/exp2f.h" diff --git a/libc/test/src/math/differential_testing/expf_perf.cpp b/libc/test/src/math/performance_testing/expf_perf.cpp similarity index 92% rename from libc/test/src/math/differential_testing/expf_perf.cpp rename to libc/test/src/math/performance_testing/expf_perf.cpp index c34173b21b4f60..4b743514023d12 100644 --- a/libc/test/src/math/differential_testing/expf_perf.cpp +++ b/libc/test/src/math/performance_testing/expf_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SingleInputSingleOutputDiff.h" +#include "SingleInputSingleOutputPerf.h" #include "src/math/expf.h" diff --git a/libc/test/src/math/differential_testing/expm1f_perf.cpp b/libc/test/src/math/performance_testing/expm1f_perf.cpp similarity index 92% rename from libc/test/src/math/differential_testing/expm1f_perf.cpp rename to libc/test/src/math/performance_testing/expm1f_perf.cpp index 3c25ef81d4808c..128ab351d86db1 100644 --- a/libc/test/src/math/differential_testing/expm1f_perf.cpp +++ b/libc/test/src/math/performance_testing/expm1f_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SingleInputSingleOutputDiff.h" +#include "SingleInputSingleOutputPerf.h" #include "src/math/expm1f.h" diff --git a/libc/test/src/math/differential_testing/fabsf_perf.cpp b/libc/test/src/math/performance_testing/fabsf_perf.cpp similarity index 92% rename from libc/test/src/math/differential_testing/fabsf_perf.cpp rename to libc/test/src/math/performance_testing/fabsf_perf.cpp index f9f9cea72c6dae..b6c6add75d230c 100644 --- a/libc/test/src/math/differential_testing/fabsf_perf.cpp +++ b/libc/test/src/math/performance_testing/fabsf_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SingleInputSingleOutputDiff.h" +#include "SingleInputSingleOutputPerf.h" #include "src/math/fabsf.h" diff --git a/libc/test/src/math/differential_testing/floorf_perf.cpp b/libc/test/src/math/performance_testing/floorf_perf.cpp similarity index 92% rename from libc/test/src/math/differential_testing/floorf_perf.cpp rename to libc/test/src/math/performance_testing/floorf_perf.cpp index abd1cd7885ffd2..0f1087b3c8236b 100644 --- a/libc/test/src/math/differential_testing/floorf_perf.cpp +++ b/libc/test/src/math/performance_testing/floorf_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SingleInputSingleOutputDiff.h" +#include "SingleInputSingleOutputPerf.h" #include "src/math/floorf.h" diff --git a/libc/test/src/math/differential_testing/fmod_perf.cpp b/libc/test/src/math/performance_testing/fmod_perf.cpp similarity index 93% rename from libc/test/src/math/differential_testing/fmod_perf.cpp rename to libc/test/src/math/performance_testing/fmod_perf.cpp index 219ee7860a242b..fa9b4c6b41287b 100644 --- a/libc/test/src/math/differential_testing/fmod_perf.cpp +++ b/libc/test/src/math/performance_testing/fmod_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "BinaryOpSingleOutputDiff.h" +#include "BinaryOpSingleOutputPerf.h" #include "src/math/fmod.h" diff --git a/libc/test/src/math/differential_testing/fmodf_perf.cpp b/libc/test/src/math/performance_testing/fmodf_perf.cpp similarity index 93% rename from libc/test/src/math/differential_testing/fmodf_perf.cpp rename to libc/test/src/math/performance_testing/fmodf_perf.cpp index c2927bb1ea9d9f..f13f02e2439da3 100644 --- a/libc/test/src/math/differential_testing/fmodf_perf.cpp +++ b/libc/test/src/math/performance_testing/fmodf_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "BinaryOpSingleOutputDiff.h" +#include "BinaryOpSingleOutputPerf.h" #include "src/math/fmodf.h" diff --git a/libc/test/src/math/differential_testing/hypot_perf.cpp b/libc/test/src/math/performance_testing/hypot_perf.cpp similarity index 93% rename from libc/test/src/math/differential_testing/hypot_perf.cpp rename to libc/test/src/math/performance_testing/hypot_perf.cpp index 01a72e6fbc3d79..393697b7540330 100644 --- a/libc/test/src/math/differential_testing/hypot_perf.cpp +++ b/libc/test/src/math/performance_testing/hypot_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "BinaryOpSingleOutputDiff.h" +#include "BinaryOpSingleOutputPerf.h" #include "src/math/hypot.h" diff --git a/libc/test/src/math/differential_testing/hypotf_perf.cpp b/libc/test/src/math/performance_testing/hypotf_perf.cpp similarity index 93% rename from libc/test/src/math/differential_testing/hypotf_perf.cpp rename to libc/test/src/math/performance_testing/hypotf_perf.cpp index ed57b186f889ba..f711729377dacf 100644 --- a/libc/test/src/math/differential_testing/hypotf_perf.cpp +++ b/libc/test/src/math/performance_testing/hypotf_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "BinaryOpSingleOutputDiff.h" +#include "BinaryOpSingleOutputPerf.h" #include "src/math/hypotf.h" diff --git a/libc/test/src/math/differential_testing/log10f_perf.cpp b/libc/test/src/math/performance_testing/log10f_perf.cpp similarity index 92% rename from libc/test/src/math/differential_testing/log10f_perf.cpp rename to libc/test/src/math/performance_testing/log10f_perf.cpp index 60c1161a31cf96..32a31b93252855 100644 --- a/libc/test/src/math/differential_testing/log10f_perf.cpp +++ b/libc/test/src/math/performance_testing/log10f_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SingleInputSingleOutputDiff.h" +#include "SingleInputSingleOutputPerf.h" #include "src/math/log10f.h" diff --git a/libc/test/src/math/differential_testing/log1pf_perf.cpp b/libc/test/src/math/performance_testing/log1pf_perf.cpp similarity index 92% rename from libc/test/src/math/differential_testing/log1pf_perf.cpp rename to libc/test/src/math/performance_testing/log1pf_perf.cpp index 5cd523d82184cc..18c168423b87d1 100644 --- a/libc/test/src/math/differential_testing/log1pf_perf.cpp +++ b/libc/test/src/math/performance_testing/log1pf_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SingleInputSingleOutputDiff.h" +#include "SingleInputSingleOutputPerf.h" #include "src/math/log1pf.h" diff --git a/libc/test/src/math/differential_testing/log2f_perf.cpp b/libc/test/src/math/performance_testing/log2f_perf.cpp similarity index 92% rename from libc/test/src/math/differential_testing/log2f_perf.cpp rename to libc/test/src/math/performance_testing/log2f_perf.cpp index ee899394c421ed..c4c4dbf4d9f554 100644 --- a/libc/test/src/math/differential_testing/log2f_perf.cpp +++ b/libc/test/src/math/performance_testing/log2f_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SingleInputSingleOutputDiff.h" +#include "SingleInputSingleOutputPerf.h" #include "src/math/log2f.h" diff --git a/libc/test/src/math/differential_testing/logbf_perf.cpp b/libc/test/src/math/performance_testing/logbf_perf.cpp similarity index 92% rename from libc/test/src/math/differential_testing/logbf_perf.cpp rename to libc/test/src/math/performance_testing/logbf_perf.cpp index 89d5bd13f9316b..eefd64b8ae913f 100644 --- a/libc/test/src/math/differential_testing/logbf_perf.cpp +++ b/libc/test/src/math/performance_testing/logbf_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SingleInputSingleOutputDiff.h" +#include "SingleInputSingleOutputPerf.h" #include "src/math/logbf.h" diff --git a/libc/test/src/math/differential_testing/logf_perf.cpp b/libc/test/src/math/performance_testing/logf_perf.cpp similarity index 92% rename from libc/test/src/math/differential_testing/logf_perf.cpp rename to libc/test/src/math/performance_testing/logf_perf.cpp index f1b3f986bd40a3..53f4f50e09efe4 100644 --- a/libc/test/src/math/differential_testing/logf_perf.cpp +++ b/libc/test/src/math/performance_testing/logf_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SingleInputSingleOutputDiff.h" +#include "SingleInputSingleOutputPerf.h" #include "src/math/logf.h" diff --git a/libc/test/src/math/differential_testing/nearbyintf_perf.cpp b/libc/test/src/math/performance_testing/nearbyintf_perf.cpp similarity index 93% rename from libc/test/src/math/differential_testing/nearbyintf_perf.cpp rename to libc/test/src/math/performance_testing/nearbyintf_perf.cpp index 9c5736fb4ab048..ae708dd2132432 100644 --- a/libc/test/src/math/differential_testing/nearbyintf_perf.cpp +++ b/libc/test/src/math/performance_testing/nearbyintf_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SingleInputSingleOutputDiff.h" +#include "SingleInputSingleOutputPerf.h" #include "src/math/nearbyintf.h" diff --git a/libc/test/src/math/differential_testing/rintf_perf.cpp b/libc/test/src/math/performance_testing/rintf_perf.cpp similarity index 92% rename from libc/test/src/math/differential_testing/rintf_perf.cpp rename to libc/test/src/math/performance_testing/rintf_perf.cpp index 432e5da77f3789..6347ac9149af6e 100644 --- a/libc/test/src/math/differential_testing/rintf_perf.cpp +++ b/libc/test/src/math/performance_testing/rintf_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SingleInputSingleOutputDiff.h" +#include "SingleInputSingleOutputPerf.h" #include "src/math/rintf.h" diff --git a/libc/test/src/math/differential_testing/roundf_perf.cpp b/libc/test/src/math/performance_testing/roundf_perf.cpp similarity index 92% rename from libc/test/src/math/differential_testing/roundf_perf.cpp rename to libc/test/src/math/performance_testing/roundf_perf.cpp index 091c7b2b86800f..36becacba07cb5 100644 --- a/libc/test/src/math/differential_testing/roundf_perf.cpp +++ b/libc/test/src/math/performance_testing/roundf_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SingleInputSingleOutputDiff.h" +#include "SingleInputSingleOutputPerf.h" #include "src/math/roundf.h" diff --git a/libc/test/src/math/differential_testing/sinf_perf.cpp b/libc/test/src/math/performance_testing/sinf_perf.cpp similarity index 92% rename from libc/test/src/math/differential_testing/sinf_perf.cpp rename to libc/test/src/math/performance_testing/sinf_perf.cpp index 7247bca2853d88..43ba60e1ef76a4 100644 --- a/libc/test/src/math/differential_testing/sinf_perf.cpp +++ b/libc/test/src/math/performance_testing/sinf_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SingleInputSingleOutputDiff.h" +#include "SingleInputSingleOutputPerf.h" #include "src/math/sinf.h" diff --git a/libc/test/src/math/differential_testing/sqrtf_perf.cpp b/libc/test/src/math/performance_testing/sqrtf_perf.cpp similarity index 92% rename from libc/test/src/math/differential_testing/sqrtf_perf.cpp rename to libc/test/src/math/performance_testing/sqrtf_perf.cpp index 5ae586ba31267d..71325518533b60 100644 --- a/libc/test/src/math/differential_testing/sqrtf_perf.cpp +++ b/libc/test/src/math/performance_testing/sqrtf_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SingleInputSingleOutputDiff.h" +#include "SingleInputSingleOutputPerf.h" #include "src/math/sqrtf.h" diff --git a/libc/test/src/math/differential_testing/truncf_perf.cpp b/libc/test/src/math/performance_testing/truncf_perf.cpp similarity index 92% rename from libc/test/src/math/differential_testing/truncf_perf.cpp rename to libc/test/src/math/performance_testing/truncf_perf.cpp index e07db1320fddd7..ff74c6b4eb64df 100644 --- a/libc/test/src/math/differential_testing/truncf_perf.cpp +++ b/libc/test/src/math/performance_testing/truncf_perf.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SingleInputSingleOutputDiff.h" +#include "SingleInputSingleOutputPerf.h" #include "src/math/truncf.h"