[libcxx-commits] [PATCH] D150284: [libc++][PSTL] Add a simple std::thread backend
Eric Fiselier via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 17 09:25:08 PDT 2023
EricWF added a comment.
In D150284#4347476 <https://reviews.llvm.org/D150284#4347476>, @philnik wrote:
> In D150284#4347301 <https://reviews.llvm.org/D150284#4347301>, @EricWF wrote:
>
>> The `__threading` header, which defines a stable API that libc++ uses to implement threading primitives. This has been used by a bunch of vendors to shim in the different implementations for their platforms.
>> I believe we'll want to do the same thing here.
>>
>> Do we know what the full API will look like yet?
>
> We don't know exactly which parts we will require, but I don't think that's relevant for this patch. We only implement a single (primitive) backend here, which will most likely not exist for a long time in this form.
I'm a bit worried about shipping these patches then. I normally prefer to have a bunch more certainty when committing stuff to non-experimental bits of the library. @ldionne, you're cool with this plan?
When will we know what we need?
When will the API be stable?
Because providing an API for vendors here is going to be important.
================
Comment at: libcxx/include/__algorithm/pstl_backend.h:89
+# if defined(_LIBCPP_PSTL_CPU_BACKEND_SERIAL) || defined(_LIBCPP_PSTL_CPU_BACKEND_THREAD)
+# include <__algorithm/pstl_backends/cpu_backend.h>
template <>
----------------
Mid-header includes are really gross. Can we avoid that?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150284/new/
https://reviews.llvm.org/D150284
More information about the libcxx-commits
mailing list