summaryrefslogtreecommitdiffstats
path: root/pstl
Commit message (Collapse)AuthorAgeFilesLines
* [pstl] Allow customizing whether per-TU insulation is providedLouis Dionne2019-08-1322-0/+94
| | | | | | | | | | | | | | Like we do in libc++, PSTL needs the ability to constrain ABI-unstable symbols to each translation unit. This is OFF by default (like for libc++), because most people don't care about this and there is a cost associated to enabling the option (code bloat because templates are not deduped across TUs). I'm using '#pragma clang attribute push' to avoid marking each declaration with an attribute, which quickly becomes difficult to maintain. llvm-svn: 368684
* [pstl] Rename PARALLELSTL_BACKEND to PSTL_PARALLEL_BACKENDLouis Dionne2019-08-132-6/+6
| | | | | | | | | It makes more sense to name configuration options as PSTL_XXX. Also, I'm naming it PSTL_PARALLEL_BACKEND because we might introduce the ability to customize the vectorization backend, in which case PSTL_BACKEND would become ambiguous. llvm-svn: 368672
* [NFC][pstl] Run clang-formatLouis Dionne2019-08-081-39/+38
| | | | | | We really need to do that consistently when applying patches. llvm-svn: 368312
* [pstl] Remove stray semicolonLouis Dionne2019-08-081-1/+1
| | | | llvm-svn: 368302
* [pstl] Error out when the backend is left unspecifiedLouis Dionne2019-08-081-3/+1
| | | | | | | | Instead of silently falling back to the serial backend, it's better if we fail loudly when the parallel backend is left unspecified. Since we have a __pstl_config_site header, a backend should always be specified. llvm-svn: 368285
* [pstl] Add a __pstl_config_site header to record the CMake configurationLouis Dionne2019-08-083-2/+28
| | | | | | | | | | | | | This commit adds a __pstl_config_site header that contains the value of macros specified at CMake configuration time. It works similarly to libc++'s __config_site header, except we always include it as a separate file instead of concatenating it to the main configuration header. It is necessary to thread the includes for that header into libc++'s lit configuration, otherwise we'd be requiring an installation step prior to running the test suite. llvm-svn: 368284
* [pstl] Make sure we install all of PSTL's include/ directoryLouis Dionne2019-08-071-1/+1
| | | | | | We want to install files directly in include/, not only in include/pstl. llvm-svn: 368203
* [pstl][libc++] Provide uglified header names for interface headersLouis Dionne2019-08-064-0/+60
| | | | | | | | | | | For the few (currently four) headers that make up the PSTL's interface to other Standard Libraries, provide a stable uglified header file that can be included by those Standard Libraries. We can then more easily change the internal organization of the PSTL without having to change the integration with Standard Libraries. llvm-svn: 368088
* [NFC][pstl] Remove stray semi-colonLouis Dionne2019-08-051-1/+1
| | | | llvm-svn: 367928
* [libc++] Take 2: Integrate the PSTL into libc++Louis Dionne2019-08-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit allows specifying LIBCXX_ENABLE_PARALLEL_ALGORITHMS when configuring libc++ in CMake. When that option is enabled, libc++ will assume that the PSTL can be found somewhere on the CMake module path, and it will provide the C++17 parallel algorithms based on the PSTL (that is assumed to be available). The commit also adds support for running the PSTL tests as part of the libc++ test suite. The first attempt to commit this failed because it exposed a bug in the tests for modules. Now that this has been fixed, it should be safe to commit this. Reviewers: EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits, mclow.lists, EricWF Tags: #libc Differential Revision: https://reviews.llvm.org/D60480 llvm-svn: 367903
* [pstl] Fully qualify pstl names.Eric Fiselier2019-07-313-404/+401
| | | | | | | | | Previously the code used "using namespace __pstl;" at block scope to introduce these names. This could cause conflicts with names defined by the standard library. So we should fully qualify them instead. llvm-svn: 367468
* Revert "[libc++] Integrate the PSTL into libc++"Louis Dionne2019-07-191-2/+0
| | | | | | | This reverts r366593, which caused unforeseen breakage on the build bots. I'm reverting until the problems have been figured out and fixed. llvm-svn: 366603
* [libc++] Integrate the PSTL into libc++Louis Dionne2019-07-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: This commit allows specifying LIBCXX_ENABLE_PARALLEL_ALGORITHMS when configuring libc++ in CMake. When that option is enabled, libc++ will assume that the PSTL can be found somewhere on the CMake module path, and it will provide the C++17 parallel algorithms based on the PSTL (that is assumed to be available). The commit also adds support for running the PSTL tests as part of the libc++ test suite. Reviewers: rodgert, EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits, mclow.lists, EricWF Tags: #libc Differential Revision: https://reviews.llvm.org/D60480 llvm-svn: 366593
* [NFC][pstl] Run clang-format on the sources, including the testsLouis Dionne2019-07-1836-118/+108
| | | | llvm-svn: 366492
* [pstl] Fix test that checked the version number after version bumpLouis Dionne2019-07-181-2/+2
| | | | llvm-svn: 366491
* [pstl] Declare main() as returning int, not int32_tLouis Dionne2019-07-1859-59/+59
| | | | llvm-svn: 366490
* Bump the trunk version to 10.0.0svnHans Wennborg2019-07-182-8/+8
| | | | | | and clear the release notes. llvm-svn: 366427
* [pstl] Use std::transform_reduce instead of hand-rolled implementationLouis Dionne2019-07-161-5/+1
| | | | llvm-svn: 366233
* [NFC] Fix -Wreorder warning in TBB backendLouis Dionne2019-07-161-2/+2
| | | | llvm-svn: 366232
* [pstl] Fix compilation with TBB backendLouis Dionne2019-07-161-8/+8
| | | | | | Some types were not using the right namespace qualification. llvm-svn: 366208
* [NFC][pstl] Remove unused utility codeLouis Dionne2019-07-081-84/+0
| | | | llvm-svn: 365346
* [pstl] Use a different namespace for each backendLouis Dionne2019-07-085-21/+22
| | | | | | | Also, use a single point of customization to set what namespace __par_backend "points to", which provides a better separation of concerns. llvm-svn: 365337
* [pstl] Add missing includesLouis Dionne2019-07-0515-1/+24
| | | | llvm-svn: 365218
* [pstl] Use utilities from <functional> instead of reinventing the wheelLouis Dionne2019-07-046-100/+42
| | | | llvm-svn: 365158
* [NFC][pstl] Do not name each header file in the leading commentLouis Dionne2019-07-0422-22/+22
| | | | | | | With the renaming that will happen, it's just a pain to maintain the right names. llvm-svn: 365156
* [NFC][pstl] Run clang-formatLouis Dionne2019-07-043-30/+30
| | | | llvm-svn: 365152
* [pstl] Make sure we include the pstl_config header in the glue headersLouis Dionne2019-07-044-0/+7
| | | | llvm-svn: 365150
* [pstl] Default to the serial backend when unspecifiedLouis Dionne2019-06-201-1/+3
| | | | | | | | | This is a stopgap measure to make it easier to integrate the PSTL into libc++. In the future, we should have a system similar to what libc++ does, where we specify settings at configuration time and generate a __config_site header that is part of the PSTL. llvm-svn: 363958
* [pstl] Mark pstl tests as unsupported before C++17Louis Dionne2019-06-2059-2/+118
| | | | | | This is required to run the tests in lit with libc++'s tests. llvm-svn: 363942
* [pstl] Remove warnings in tests and headersLouis Dionne2019-06-1941-118/+117
| | | | | | | | Mostly unused parameter, unused local typedefs and shadowed declarations. This massaging it necessary if we want to be able to run the tests under the libc++ lit configuration. llvm-svn: 363872
* [pstl] Disable workarounds for broken ICC versions when using ClangLouis Dionne2019-06-181-0/+2
| | | | llvm-svn: 363726
* [pstl] Remove stray usage of pstl::execution instead of std::executionLouis Dionne2019-06-184-7/+7
| | | | llvm-svn: 363723
* [pstl] The optimized parallel versions of sort, stable_sort algorithms, TBB ↵Mikhail Dvorskiy2019-06-063-156/+573
| | | | | | | | | | | | | | parallel backend. Summary: A modification of the parallel sorting algorithm, additionally optimized for a partially sorted array. Reviewers: rodgert ldionne Differential Revision: https://reviews.llvm.org/D59925 llvm-svn: 362678
* A test commit from Mikhail Dvorskiy (blank line, to pstl/trunk) according ↵Mikhail Dvorskiy2019-06-031-0/+1
| | | | | | 'Obtaining Commit Access' rules (https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access) llvm-svn: 362362
* [pstl] Use OpenMP pragmas with Clang, which supports themLouis Dionne2019-05-301-1/+1
| | | | | | | Most importantly, Clang doesn't seem to support the non-OpenMP pragmas that were being used previously. llvm-svn: 362155
* [pstl] Remove various warnings in the pstl headers and testsLouis Dionne2019-05-3014-53/+57
| | | | | | | | | | | | | | | | | - unused parameter warnings - don't use single-letter template parameter names, like we do in libc++ - sign-comparison warnings - unused variables in the tests - unused local typedefs in the tests - the use of #include_next - field reordering in the tests - unused lambda captures Note that the rationale for why the static_casts to unsigned are OK is that last - first must always be non-negative, since [first, last) is a valid range. llvm-svn: 362148
* [pstl] Make the default backend be the serial backend and always provide ↵Louis Dionne2019-04-2411-287/+20
| | | | | | | | | | | | | | | | | | parallel policies Summary: Before this change, the default backend was TBB but one could disable anything related to TBB by removing the parallel policies. This change uses the serial backend by default and removes the ability to disable parallel policies, which is not useful anymore. Reviewers: rodgert, MikeDvorskiy Subscribers: mgorny, jkorous, dexonsmith, jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D59792 llvm-svn: 359134
* [pstl] Add a serial backend for the PSTLLouis Dionne2019-04-184-17/+150
| | | | | | | | | | | | | | | Summary: The serial backend performs all tasks serially and does not require threads. It does not have any dependencies beyond normal C++, but it is not very efficient either. Reviewers: rodgert, MikeDvorskiy Subscribers: mgorny, jkorous, dexonsmith, jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D59791 llvm-svn: 358700
* [pstl] Remove the stdlib headers from the PSTL and move them to the testsLouis Dionne2019-04-1664-371/+50
| | | | | | | | | | | | | | | | | Summary: PSTL should not provide those headers since they belong to the standard library. Instead, we define a dummy standard library in the tests that provides those headers. Reviewers: rodgert, MikeDvorskiy Subscribers: mgorny, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60535 llvm-svn: 358497
* [NFC] Add explicit return from main() in testsLouis Dionne2019-04-121-1/+3
| | | | llvm-svn: 358302
* [pstl] Remove our custom FindTBB CMake fileLouis Dionne2019-04-112-67/+0
| | | | | | | | | | | | | | | | Summary: The TBBConfig file installed by TBB 2019 Update 5 works properly, so we don't need this workaround anymore. Reviewers: rodgert, MikeDvorskiy Subscribers: mgorny, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60467 llvm-svn: 358196
* [pstl] Setup the _PSTL_VERSION macro like _LIBCPP_VERSION, and add release notesLouis Dionne2019-04-114-8/+68
| | | | | | | | | | | | Reviewers: rodgert, MikeDvorskiy Subscribers: mgorny, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60464 llvm-svn: 358193
* [pstl] Move to single underscore-capital for macros and include guardsLouis Dionne2019-04-1063-495/+495
| | | | | | | | | | | | | | Summary: Per the LLVM convention. Reviewers: rodgert Subscribers: jkorous, dexonsmith, jdoerfert, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60521 llvm-svn: 358131
* [pstl] Fix incorrect forward declaration of __pattern_unique_copyLouis Dionne2019-04-101-3/+5
| | | | | | | The forward declaration didn't take an execution policy, but the definition does. llvm-svn: 358130
* [pstl] Add missing forward declarations for equalLouis Dionne2019-04-101-5/+25
| | | | | | | We added the 4-iterator variants of std::equal in r357613, but we forgot to add the corresponding forward declarations. llvm-svn: 358129
* Fix header inclusion order failuresLouis Dionne2019-04-1011-0/+153
| | | | | | | | | | | | Summary: See https://bugs.llvm.org/show_bug.cgi?id=41432 Subscribers: libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60525 llvm-svn: 358121
* [pstl][CMake] Install CMake export filesLouis Dionne2019-04-092-15/+35
| | | | | | | This allows other projects to depend on PSTL using the classic CMake find_package protocol. llvm-svn: 358028
* [pstl][NFC] Move the ParallelSTLConfig template to the cmake/ subdirectoryLouis Dionne2019-04-092-1/+1
| | | | llvm-svn: 358018
* [pstl] Improve the parallel version of std::equalLouis Dionne2019-04-032-4/+62
| | | | | | | | | | | 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
* [pstl] Require C++17 when linking against pstlLouis Dionne2019-04-031-0/+1
| | | | llvm-svn: 357609
OpenPOWER on IntegriCloud