[libcxx-commits] [PATCH] D60537: [pstl] Do not inject execution policies into namespace ::pstl in the tests

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 11 15:26:28 PDT 2019


ldionne added a comment.

In D60537#1462371 <https://reviews.llvm.org/D60537#1462371>, @MikeDvorskiy wrote:

> Guys,
>  I understand that given pstl code is becoming a part  of C++ standard library and , of course should be **std::**execution::unsequenced_policy and so on..
>
> But, there is PSTL standalone version, which works with the other  compilers and environment , MSVC for example, where there is another implementation of Parallel STL.
>  In that case we have to differ a namespace where the execution policies are defined, otherwise a user code (and the tests) will use MSVC implementation of parallel algorithms instead of our...
>
> I have two alternative ideas here:
>  [...]


Of course, we should still support the use case you have in mind. My goal is not to make the PSTL *only* useful for standard libraries -- the PSTL shouldn't inject its declarations into namespace `std`, and this was a follow-up fix I planned on making. Let me address your concern first and I think this patch will then make more sense to you.

Basically, I was thinking (like you) that we should have a way to customize the namespace in which pstl injects the algorithms. Then standard libraries can use something like `std::__1`, and you can use something like `pstl::execution` or whatever you want. I think we're in agreement here -- let me put this mechanism in place before removing this namespace injection.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60537





More information about the libcxx-commits mailing list