[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 18 07:58:54 PDT 2019


ldionne added a comment.

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

> Louis,
>
> I have an issue regarding the dummy stdlib headers.
>  Proposed location is valid only for the test. (/test/support/stdlib)
>
> The tests is not necessary part of standalone PSTL because is not a part of implementation of PSTL.
>  For example, If i have an application which use  standalone pstl include "pstl/test/support/stdlib" would look strange at least.
>
> So, I suggest moving the dummy stdlib headers into ..pstl\internal\stdlib or into ..pstl\stdlib


I believe what's wrong here is the expectation that the PSTL is something that can be shipped __as-is__ by implementations. The idea is that the PSTL provides the functionality but not necessarily the packaging for the parallel algorithms. Hence, Standard libraries have a little bit of boilerplate to include this functionality, and a "standalone" version of the PSTL should also wrap the internal headers to package the functionality however they want to.

In other words, I think the correct thing to do is for you guys to define `<algorithm>` & friends headers that `#include <pstl/internal/XXX.h>` while making sure that it works with the underlying standard library. I don't think the pstl should include headers that are useless to all but one specific shipping vehicle of the PSTL (the standalone version). That being said, if we realize that there's something useful to factor out for several shipping vehicles, of course we should do it. WDYT?


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