[libc-commits] [libc] [libc][math] Improve performance test output (PR #134501)

via libc-commits libc-commits at lists.llvm.org
Sat Apr 5 12:15:18 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions h -- libc/test/src/math/performance_testing/BinaryOpSingleOutputPerf.h libc/test/src/math/performance_testing/SingleInputSingleOutputPerf.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/test/src/math/performance_testing/BinaryOpSingleOutputPerf.h b/libc/test/src/math/performance_testing/BinaryOpSingleOutputPerf.h
index 8001710d8..6068f1ea5 100644
--- a/libc/test/src/math/performance_testing/BinaryOpSingleOutputPerf.h
+++ b/libc/test/src/math/performance_testing/BinaryOpSingleOutputPerf.h
@@ -26,9 +26,9 @@ class BinaryOpSingleOutputPerf {
 public:
   typedef OutputType Func(InputType, InputType);
 
-  static void run_perf_in_range(Func FuncA, Func FuncB,
-                                StorageType startingBit, StorageType endingBit,
-                                size_t N, size_t rounds, std::ofstream &log) {
+  static void run_perf_in_range(Func FuncA, Func FuncB, StorageType startingBit,
+                                StorageType endingBit, size_t N, size_t rounds,
+                                std::ofstream &log) {
     if (sizeof(StorageType) <= sizeof(size_t))
       N = cpp::min(N, static_cast<size_t>(endingBit - startingBit));
 
diff --git a/libc/test/src/math/performance_testing/SingleInputSingleOutputPerf.h b/libc/test/src/math/performance_testing/SingleInputSingleOutputPerf.h
index 93c217de2..a434123a3 100644
--- a/libc/test/src/math/performance_testing/SingleInputSingleOutputPerf.h
+++ b/libc/test/src/math/performance_testing/SingleInputSingleOutputPerf.h
@@ -25,9 +25,9 @@ template <typename T> class SingleInputSingleOutputPerf {
 public:
   typedef T Func(T);
 
-  static void runPerfInRange(Func FuncA, Func FuncB,
-                             StorageType startingBit, StorageType endingBit,
-                             size_t rounds, std::ofstream &log) {
+  static void runPerfInRange(Func FuncA, Func FuncB, StorageType startingBit,
+                             StorageType endingBit, size_t rounds,
+                             std::ofstream &log) {
     size_t n = 10'010'001;
     if (sizeof(StorageType) <= sizeof(size_t))
       n = cpp::min(n, static_cast<size_t>(endingBit - startingBit));
@@ -98,8 +98,7 @@ public:
     return 0;                                                                  \
   }
 
-#define SINGLE_INPUT_SINGLE_OUTPUT_PERF_EX(T, FuncA, FuncB, rounds,            \
-                                           filename)                           \
+#define SINGLE_INPUT_SINGLE_OUTPUT_PERF_EX(T, FuncA, FuncB, rounds, filename)  \
   {                                                                            \
     LIBC_NAMESPACE::testing::SingleInputSingleOutputPerf<T>::runPerf(          \
         &FuncA, &FuncB, rounds, #FuncA, #FuncB, filename);                     \

``````````

</details>


https://github.com/llvm/llvm-project/pull/134501


More information about the libc-commits mailing list