mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 22:00:10 +00:00
[pstl] Remove the stdlib headers from the PSTL and move them to the tests
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
This commit is contained in:
parent
417c889409
commit
4d88b17b3f
@ -18,6 +18,10 @@ add_custom_target(check-pstl
|
||||
DEPENDS pstl-build-tests
|
||||
COMMENT "Build and run all the unit tests.")
|
||||
|
||||
add_library(test_stdlib INTERFACE)
|
||||
target_include_directories(test_stdlib INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/support/stdlib")
|
||||
target_link_libraries(test_stdlib INTERFACE pstl::ParallelSTL)
|
||||
|
||||
file(GLOB_RECURSE UNIT_TESTS "*.pass.cpp")
|
||||
foreach(_file IN LISTS UNIT_TESTS)
|
||||
file(RELATIVE_PATH _target "${CMAKE_CURRENT_SOURCE_DIR}" "${_file}")
|
||||
@ -27,8 +31,7 @@ foreach(_file IN LISTS UNIT_TESTS)
|
||||
|
||||
add_executable(${_target} EXCLUDE_FROM_ALL "${_file}")
|
||||
target_include_directories(${_target} PRIVATE "${CMAKE_CURRENT_LIST_DIR}")
|
||||
target_link_libraries(${_target} PRIVATE pstl::ParallelSTL)
|
||||
target_compile_definitions(${_target} PRIVATE -DPSTL_STANDALONE_TESTS)
|
||||
target_link_libraries(${_target} PRIVATE test_stdlib)
|
||||
set_target_properties(${_target} PROPERTIES CXX_EXTENSIONS NO
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
add_test(${_target} "${CMAKE_CURRENT_BINARY_DIR}/${_target}")
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
int32_t
|
||||
main()
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/algorithm"
|
||||
#include "pstl/execution"
|
||||
#else
|
||||
#include <algorithm>
|
||||
#include <execution>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
int32_t
|
||||
main()
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/memory"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <memory>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
int32_t
|
||||
main()
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/memory"
|
||||
#include "pstl/execution"
|
||||
#else
|
||||
#include <memory>
|
||||
#include <execution>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
int32_t
|
||||
main()
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/numeric"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <numeric>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
int32_t
|
||||
main()
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/numeric"
|
||||
#include "pstl/execution"
|
||||
#else
|
||||
#include <numeric>
|
||||
#include <execution>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
int32_t
|
||||
main()
|
||||
|
@ -9,15 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include <algorithm>
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,16 +9,9 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
#include <functional>
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -10,13 +10,8 @@
|
||||
// Tests for copy_if and remove_copy_if
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -10,19 +10,13 @@
|
||||
// Tests for stable_partition and partition
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
using namespace TestUtils;
|
||||
|
||||
template <typename T>
|
||||
|
@ -10,19 +10,13 @@
|
||||
// Tests for stable_partition and partition_copy
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <iterator>
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
using namespace TestUtils;
|
||||
|
||||
struct test_partition_copy
|
||||
|
@ -9,15 +9,9 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include <iterator>
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,15 +9,9 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include <iterator>
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -11,13 +11,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,14 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,15 +9,9 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include <atomic>
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -10,13 +10,8 @@
|
||||
// Test for remove, remove_if
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,14 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -11,13 +11,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,15 +9,9 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include <iterator>
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,15 +9,9 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include <iterator>
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,15 +9,9 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include <iterator>
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -10,13 +10,8 @@
|
||||
// Test for unique
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -10,13 +10,8 @@
|
||||
// Tests for unique_copy
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,14 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -10,13 +10,8 @@
|
||||
// Tests for count and count_if
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -10,13 +10,8 @@
|
||||
// Tests for find
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -10,13 +10,8 @@
|
||||
// Tests for find_if and find_if_not
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,17 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#include "pstl/numeric"
|
||||
#include "pstl/memory"
|
||||
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,16 +9,9 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -10,13 +10,8 @@
|
||||
// Tests for is_heap, is_heap_until
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
#include <iostream>
|
||||
|
@ -9,15 +9,9 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include <iostream>
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,21 +9,14 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
#include <set>
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
using namespace TestUtils;
|
||||
|
||||
struct check_minelement
|
||||
|
@ -9,16 +9,9 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,17 +9,10 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
|
||||
#include <cmath>
|
||||
#include <chrono>
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,14 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,16 +9,9 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,16 +9,11 @@
|
||||
|
||||
// Tests for partial_sort_copy
|
||||
|
||||
#include <cmath>
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <cmath>
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,14 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,16 +9,9 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include <iterator>
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/algorithm"
|
||||
#include "pstl/numeric"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
#include <numeric>
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/numeric"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <numeric>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/numeric"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <numeric>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,14 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/numeric"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <numeric>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/numeric"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <numeric>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -12,13 +12,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/memory"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <memory>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -11,13 +11,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
#include "pstl/execution"
|
||||
#include "pstl/memory"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <memory>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -9,15 +9,8 @@
|
||||
|
||||
#include "support/pstl_test_config.h"
|
||||
|
||||
#ifdef PSTL_STANDALONE_TESTS
|
||||
|
||||
#include "pstl/execution"
|
||||
#include "pstl/memory"
|
||||
#include "pstl/algorithm"
|
||||
#else
|
||||
#include <execution>
|
||||
#include <algorithm>
|
||||
#endif // PSTL_STANDALONE_TESTS
|
||||
#include <memory>
|
||||
|
||||
#include "support/utils.h"
|
||||
|
||||
|
@ -7,18 +7,20 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _PSTL_ALGORITHM
|
||||
#define _PSTL_ALGORITHM
|
||||
#ifndef _TEST_SUPPORT_STDLIB_ALGORITHM
|
||||
#define _TEST_SUPPORT_STDLIB_ALGORITHM
|
||||
|
||||
#include "internal/pstl_config.h"
|
||||
#include_next <algorithm>
|
||||
|
||||
#include <pstl/internal/pstl_config.h>
|
||||
|
||||
#if _PSTL_EXECUTION_POLICIES_DEFINED
|
||||
// If <execution> has already been included, pull in implementations
|
||||
# include "internal/glue_algorithm_impl.h"
|
||||
# include <pstl/internal/glue_algorithm_impl.h>
|
||||
#else
|
||||
// Otherwise just pull in forward declarations
|
||||
# include "internal/glue_algorithm_defs.h"
|
||||
# include <pstl/internal/glue_algorithm_defs.h>
|
||||
# define _PSTL_ALGORITHM_FORWARD_DECLARED 1
|
||||
#endif
|
||||
|
||||
#endif /* _PSTL_ALGORITHM */
|
||||
#endif /* _TEST_SUPPORT_STDLIB_ALGORITHM */
|
@ -7,30 +7,32 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _PSTL_EXECUTION
|
||||
#define _PSTL_EXECUTION
|
||||
#ifndef _TEST_SUPPORT_STDLIB_EXECUTION
|
||||
#define _TEST_SUPPORT_STDLIB_EXECUTION
|
||||
|
||||
#include "internal/pstl_config.h"
|
||||
#include "internal/execution_defs.h"
|
||||
// #include_next <execution> // None of the standard libraries PSTL is built on top have the <execution> header yet.
|
||||
|
||||
#include <pstl/internal/pstl_config.h>
|
||||
#include <pstl/internal/execution_defs.h>
|
||||
|
||||
#define _PSTL_EXECUTION_POLICIES_DEFINED 1
|
||||
|
||||
#if _PSTL_ALGORITHM_FORWARD_DECLARED
|
||||
# include "internal/glue_algorithm_impl.h"
|
||||
# include <pstl/internal/glue_algorithm_impl.h>
|
||||
#endif
|
||||
|
||||
#if _PSTL_MEMORY_FORWARD_DECLARED
|
||||
# include "internal/glue_memory_impl.h"
|
||||
# include <pstl/internal/glue_memory_impl.h>
|
||||
#endif
|
||||
|
||||
#if _PSTL_NUMERIC_FORWARD_DECLARED
|
||||
# include "internal/glue_numeric_impl.h"
|
||||
# include <pstl/internal/glue_numeric_impl.h>
|
||||
#endif
|
||||
|
||||
#if _PSTL_CPP17_EXECUTION_POLICIES_PRESENT
|
||||
_PSTL_PRAGMA_MESSAGE_POLICIES("The <Parallel STL> execution policies are defined in the namespace __pstl::execution")
|
||||
#else
|
||||
# include "internal/glue_execution_defs.h"
|
||||
# include <pstl/internal/glue_execution_defs.h>
|
||||
_PSTL_PRAGMA_MESSAGE_POLICIES(
|
||||
"The <Parallel STL> execution policies are injected into the standard namespace std::execution")
|
||||
#endif
|
||||
@ -45,4 +47,4 @@ using namespace __pstl::execution;
|
||||
}
|
||||
} // namespace pstl
|
||||
|
||||
#endif /* _PSTL_EXECUTION */
|
||||
#endif /* _TEST_SUPPORT_STDLIB_EXECUTION */
|
@ -7,18 +7,20 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _PSTL_MEMORY
|
||||
#define _PSTL_MEMORY
|
||||
#ifndef _TEST_SUPPORT_STDLIB_MEMORY
|
||||
#define _TEST_SUPPORT_STDLIB_MEMORY
|
||||
|
||||
#include "internal/pstl_config.h"
|
||||
#include_next <memory>
|
||||
|
||||
#include <pstl/internal/pstl_config.h>
|
||||
|
||||
#if _PSTL_EXECUTION_POLICIES_DEFINED
|
||||
// If <execution> has already been included, pull in implementations
|
||||
# include "internal/glue_memory_impl.h"
|
||||
# include <pstl/internal/glue_memory_impl.h>
|
||||
#else
|
||||
// Otherwise just pull in forward declarations
|
||||
# include "internal/glue_memory_defs.h"
|
||||
# include <pstl/internal/glue_memory_defs.h>
|
||||
# define _PSTL_MEMORY_FORWARD_DECLARED 1
|
||||
#endif
|
||||
|
||||
#endif /* _PSTL_MEMORY */
|
||||
#endif /* _TEST_SUPPORT_STDLIB_MEMORY */
|
@ -7,18 +7,20 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _PSTL_NUMERIC
|
||||
#define _PSTL_NUMERIC
|
||||
#ifndef _TEST_SUPPORT_STDLIB_NUMERIC
|
||||
#define _TEST_SUPPORT_STDLIB_NUMERIC
|
||||
|
||||
#include "internal/pstl_config.h"
|
||||
#include_next <numeric>
|
||||
|
||||
#include <pstl/internal/pstl_config.h>
|
||||
|
||||
#if _PSTL_EXECUTION_POLICIES_DEFINED
|
||||
// If <execution> has already been included, pull in implementations
|
||||
# include "internal/glue_numeric_impl.h"
|
||||
# include <pstl/internal/glue_numeric_impl.h>
|
||||
#else
|
||||
// Otherwise just pull in forward declarations
|
||||
# include "internal/glue_numeric_defs.h"
|
||||
# include <pstl/internal/glue_numeric_defs.h>
|
||||
# define _PSTL_NUMERIC_FORWARD_DECLARED 1
|
||||
#endif
|
||||
|
||||
#endif /* _PSTL_NUMERIC */
|
||||
#endif /* _TEST_SUPPORT_STDLIB_NUMERIC */
|
Loading…
Reference in New Issue
Block a user