[libcxx-commits] [libcxx] [libc++] Overhaul the PSTL dispatching mechanism (PR #88131)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 12 13:58:35 PDT 2024


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 d022f6b8ff94bb13d12d39f23a3c3e7836e90756 7ef7d1b825f4c7bae09eafe9be3f557e728a8a8c -- libcxx/include/__algorithm/pstl.h libcxx/include/__pstl/backend_fwd.h libcxx/include/__pstl/backends/default.h libcxx/include/__pstl/backends/libdispatch.h libcxx/include/__pstl/backends/serial.h libcxx/include/__pstl/backends/std_thread.h libcxx/include/__pstl/configuration.h libcxx/include/__pstl/configuration_fwd.h libcxx/include/__pstl/cpu_algos/cpu_traits.h libcxx/include/__pstl/cpu_algos/fill.h libcxx/include/__pstl/cpu_algos/for_each.h libcxx/include/__pstl/cpu_algos/merge.h libcxx/include/__pstl/cpu_algos/stable_sort.h libcxx/include/__pstl/cpu_algos/transform.h libcxx/include/__pstl/cpu_algos/transform_reduce.h libcxx/include/__pstl/dispatch.h libcxx/include/__pstl/run_backend.h libcxx/include/algorithm libcxx/include/numeric libcxx/src/pstl/libdispatch.cpp libcxx/test/std/algorithms/numeric.ops/reduce/pstl.exception_handling.pass.cpp libcxx/test/std/algorithms/numeric.ops/transform.reduce/pstl.exception_handling.pass.cpp libcxx/test/support/test_iterators.h libcxx/include/__numeric/pstl.h libcxx/include/__pstl/cpu_algos/any_of.h libcxx/include/__pstl/cpu_algos/find_if.h
``````````

</details>

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

``````````diff
diff --git a/libcxx/include/__pstl/backends/std_thread.h b/libcxx/include/__pstl/backends/std_thread.h
index 614b823850..f5abe397b1 100644
--- a/libcxx/include/__pstl/backends/std_thread.h
+++ b/libcxx/include/__pstl/backends/std_thread.h
@@ -26,8 +26,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 namespace __pstl {
 
 //
-// This partial backend implementation is for testing purposes only and not meant for production use. This will be replaced
-// by a proper implementation once the PSTL implementation is somewhat stable.
+// This partial backend implementation is for testing purposes only and not meant for production use. This will be
+// replaced by a proper implementation once the PSTL implementation is somewhat stable.
 //
 // This is intended to be used on top of the "default backend".
 //
diff --git a/libcxx/test/support/test_iterators.h b/libcxx/test/support/test_iterators.h
index e2a3c2cdae..aa819ecd47 100644
--- a/libcxx/test/support/test_iterators.h
+++ b/libcxx/test/support/test_iterators.h
@@ -1508,9 +1508,7 @@ public:
     return iter;
   }
 
-  friend Derived operator+(difference_type i, Derived iter) {
-    return iter + i;
-  }
+  friend Derived operator+(difference_type i, Derived iter) { return iter + i; }
 
   friend bool operator==(const iterator_wrapper& lhs, const iterator_wrapper& rhs) { return lhs.iter_ == rhs.iter_; }
   friend bool operator!=(const iterator_wrapper& lhs, const iterator_wrapper& rhs) { return lhs.iter_ != rhs.iter_; }

``````````

</details>


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


More information about the libcxx-commits mailing list