When an execution policy is provided, we attempt to run std::equal in
parallel instead of always doing it serially.
Thanks to Mikhail Dvorskiy for the patch.
Differential Revision: https://reviews.llvm.org/D59813
llvm-svn: 357613
Summary:
Indenting preprocessor directives provides a significant gain in
readability. We do it for normal if statements, and it makes sense
to do it for preprocessor ifs too.
Reviewers: rodgert, MikeDvorskiy
Subscribers: jkorous, dexonsmith, jdoerfert, libcxx-commits
Differential Revision: https://reviews.llvm.org/D59767
llvm-svn: 357401
This guards against unintended ADL issues.
Thanks to Thomas Rogers for the patch.
Differential Revision: https://reviews.llvm.org/D60009
llvm-svn: 357306
Necessary when pstl is included from with <algorithm> and <numeric> to
prevent a partially declared standard library when pstl itself uses
algorithms from <algorithm> and <numeric>.
Also, this patch makes sure that configuration comes via standard headers.
Directly including pstl_config.h in implementation files is incompatible
with inclusion of pstl into a standard library implementation which
provides it's own library wide configuration and may configure the
library differently to the pstl_config.h used by the standalone
implementation.
Differential Revision: https://reviews.llvm.org/D59122
llvm-svn: 357189
__PSTL_USE_PAR_POLICIES is the wrong macro to use there, since the PSTL
could conceivably be using parallel policies but not TBB as a backend.
llvm-svn: 356935
The previous test system would only print errors to stderr, however CMake
(and lit) detect failure via the program returning a non-zero error code.
So all the tests would always pretend they passed.
llvm-svn: 356921
Since we don't have any non-trivial PSTL backend that doesn't require
TBB yet, enabling the parallel policies by default breaks people that
try to build all of LLVM without having an installation of TBB. Since
this is unacceptable, parallel policies are disabled by default.
We can re-enable it once we have a backend that does not require anything
beyond what C++ already requires. For example, we could have a simple
backend that uses std::thread by default or something along those lines,
with the understanding that vendors would use their own (more efficient)
backend.
llvm-svn: 356194
All of LLVM builds with CMake, so it doesn't make sense to maintain a
separate set of build files just for pstl.
Thanks to Thomas Rodgers for the patch.
Differential Revision: https://reviews.llvm.org/D59111
llvm-svn: 355919
Previously, we'd be performing math on `#define PSTL_VERSION NNN` instead
of just `NNN`. It seems like older CMakes didn't complain, but newer
CMakes do complain because it doesn't make sense.
llvm-svn: 355918
There were multiple warnings for lambda captures that are unused, so
I removed those captures. I also fixed a couple of -Wsign-compare
warnings. Note that some warnings still remain, this change is not
exhaustive.
llvm-svn: 354148
all missed!
Thanks to Alex Bradbury for pointing this out, and the fact that I never
added the intended `legacy` anchor to the developer policy. Add that
anchor too. With hope, this will cause the links to all resolve
successfully.
llvm-svn: 351731
to reflect the new license. These used slightly different spellings that
defeated my regular expressions.
We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.
llvm-svn: 351648
This installs the new developer policy and moves all of the license
files across all LLVM projects in the monorepo to the new license
structure. The remaining projects will be moved independently.
Note that I've left odd formatting and other idiosyncracies of the
legacy license structure text alone to make the diff easier to read.
Critically, note that we do not in any case *remove* the old license
notice or terms, as that remains necessary until we finish the
relicensing process.
I've updated a few license files that refer to the LLVM license to
instead simply refer generically to whatever license the LLVM project is
under, basically trying to minimize confusion.
This is really the culmination of so many people. Chris led the
community discussions, drafted the policy update and organized the
multi-year string of meeting between lawyers across the community to
figure out the strategy. Numerous lawyers at companies in the community
spent their time figuring out initial answers, and then the Foundation's
lawyer Heather Meeker has done *so* much to help refine and get us ready
here. I could keep going on, but I just want to make sure everyone
realizes what a huge community effort this has been from the begining.
Differential Revision: https://reviews.llvm.org/D56897
llvm-svn: 351631
Summary:
Recent Clangs give an error for this. Note that the size of this diff is
caused by running clang-format on the result of removing the captures.
I guess we'll see how well that works for us.
Reviewers: jfb, rodgert
Subscribers: jkorous, dexonsmith, libcxx-commits, mclow.lists
Differential Revision: https://reviews.llvm.org/D55945
llvm-svn: 350544
Summary:
This commit adds a check-pstl CMake target that will run the tests
we currently have for pstl. Those tests are not using LLVM lit yet,
but switching them over should be a transparent change. With this
change, we can start relying on the `check-pstl` target for workflows
and CI.
Note that this commit purposefully does not support the pre-monorepo
layout (with subprojects in projects/), since LLVM is moving towards
the monorepo layout anyway.
Reviewers: jfb
Subscribers: mgorny, jkorous, dexonsmith, libcxx-commits, mclow.lists, rodgert
Differential Revision: https://reviews.llvm.org/D55963
llvm-svn: 349919
The initial commit of the Parallel STL upstream (under LLVM umbrella) based on
Parallel STL 20181204 open source release, which is available by
https://github.com/intel/parallelstl
Author: Mikhail Dvorskiy <mikhail.dvorskiy@intel.com>
Differential Revision: https://reviews.llvm.org/D55889
llvm-svn: 349653