Index: pstl/trunk/include/pstl/algorithm =================================================================== --- pstl/trunk/include/pstl/algorithm +++ pstl/trunk/include/pstl/algorithm @@ -1,24 +0,0 @@ -// -*- C++ -*- -//===-- algorithm ---------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _PSTL_ALGORITHM -#define _PSTL_ALGORITHM - -#include "internal/pstl_config.h" - -#if _PSTL_EXECUTION_POLICIES_DEFINED -// If has already been included, pull in implementations -# include "internal/glue_algorithm_impl.h" -#else -// Otherwise just pull in forward declarations -# include "internal/glue_algorithm_defs.h" -# define _PSTL_ALGORITHM_FORWARD_DECLARED 1 -#endif - -#endif /* _PSTL_ALGORITHM */ Index: pstl/trunk/include/pstl/execution =================================================================== --- pstl/trunk/include/pstl/execution +++ pstl/trunk/include/pstl/execution @@ -1,48 +0,0 @@ -// -*- C++ -*- -//===-- execution ---------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _PSTL_EXECUTION -#define _PSTL_EXECUTION - -#include "internal/pstl_config.h" -#include "internal/execution_defs.h" - -#define _PSTL_EXECUTION_POLICIES_DEFINED 1 - -#if _PSTL_ALGORITHM_FORWARD_DECLARED -# include "internal/glue_algorithm_impl.h" -#endif - -#if _PSTL_MEMORY_FORWARD_DECLARED -# include "internal/glue_memory_impl.h" -#endif - -#if _PSTL_NUMERIC_FORWARD_DECLARED -# include "internal/glue_numeric_impl.h" -#endif - -#if _PSTL_CPP17_EXECUTION_POLICIES_PRESENT -_PSTL_PRAGMA_MESSAGE_POLICIES("The execution policies are defined in the namespace __pstl::execution") -#else -# include "internal/glue_execution_defs.h" -_PSTL_PRAGMA_MESSAGE_POLICIES( - "The execution policies are injected into the standard namespace std::execution") -#endif - -//TODO: __pstl::execution namespace is injected into the pstl::execution namespace when the implementation is not a part of -// standard C++ library -namespace pstl -{ -namespace execution -{ -using namespace __pstl::execution; -} -} // namespace pstl - -#endif /* _PSTL_EXECUTION */ Index: pstl/trunk/include/pstl/memory =================================================================== --- pstl/trunk/include/pstl/memory +++ pstl/trunk/include/pstl/memory @@ -1,24 +0,0 @@ -// -*- C++ -*- -//===-- memory ------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _PSTL_MEMORY -#define _PSTL_MEMORY - -#include "internal/pstl_config.h" - -#if _PSTL_EXECUTION_POLICIES_DEFINED -// If has already been included, pull in implementations -# include "internal/glue_memory_impl.h" -#else -// Otherwise just pull in forward declarations -# include "internal/glue_memory_defs.h" -# define _PSTL_MEMORY_FORWARD_DECLARED 1 -#endif - -#endif /* _PSTL_MEMORY */ Index: pstl/trunk/include/pstl/numeric =================================================================== --- pstl/trunk/include/pstl/numeric +++ pstl/trunk/include/pstl/numeric @@ -1,24 +0,0 @@ -// -*- C++ -*- -//===-- numeric -----------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _PSTL_NUMERIC -#define _PSTL_NUMERIC - -#include "internal/pstl_config.h" - -#if _PSTL_EXECUTION_POLICIES_DEFINED -// If has already been included, pull in implementations -# include "internal/glue_numeric_impl.h" -#else -// Otherwise just pull in forward declarations -# include "internal/glue_numeric_defs.h" -# define _PSTL_NUMERIC_FORWARD_DECLARED 1 -#endif - -#endif /* _PSTL_NUMERIC */ Index: pstl/trunk/test/CMakeLists.txt =================================================================== --- pstl/trunk/test/CMakeLists.txt +++ pstl/trunk/test/CMakeLists.txt @@ -18,6 +18,10 @@ 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 @@ 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}") Index: pstl/trunk/test/pstl/header_inclusion_order_algorithm_0.pass.cpp =================================================================== --- pstl/trunk/test/pstl/header_inclusion_order_algorithm_0.pass.cpp +++ pstl/trunk/test/pstl/header_inclusion_order_algorithm_0.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS int32_t main() Index: pstl/trunk/test/pstl/header_inclusion_order_algorithm_1.pass.cpp =================================================================== --- pstl/trunk/test/pstl/header_inclusion_order_algorithm_1.pass.cpp +++ pstl/trunk/test/pstl/header_inclusion_order_algorithm_1.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/algorithm" -#include "pstl/execution" -#else #include #include -#endif // PSTL_STANDALONE_TESTS int32_t main() Index: pstl/trunk/test/pstl/header_inclusion_order_memory_0.pass.cpp =================================================================== --- pstl/trunk/test/pstl/header_inclusion_order_memory_0.pass.cpp +++ pstl/trunk/test/pstl/header_inclusion_order_memory_0.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/memory" -#else #include #include -#endif // PSTL_STANDALONE_TESTS int32_t main() Index: pstl/trunk/test/pstl/header_inclusion_order_memory_1.pass.cpp =================================================================== --- pstl/trunk/test/pstl/header_inclusion_order_memory_1.pass.cpp +++ pstl/trunk/test/pstl/header_inclusion_order_memory_1.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/memory" -#include "pstl/execution" -#else #include #include -#endif // PSTL_STANDALONE_TESTS int32_t main() Index: pstl/trunk/test/pstl/header_inclusion_order_numeric_0.pass.cpp =================================================================== --- pstl/trunk/test/pstl/header_inclusion_order_numeric_0.pass.cpp +++ pstl/trunk/test/pstl/header_inclusion_order_numeric_0.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/numeric" -#else #include #include -#endif // PSTL_STANDALONE_TESTS int32_t main() Index: pstl/trunk/test/pstl/header_inclusion_order_numeric_1.pass.cpp =================================================================== --- pstl/trunk/test/pstl/header_inclusion_order_numeric_1.pass.cpp +++ pstl/trunk/test/pstl/header_inclusion_order_numeric_1.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/numeric" -#include "pstl/execution" -#else #include #include -#endif // PSTL_STANDALONE_TESTS int32_t main() Index: pstl/trunk/test/std/algorithms/alg.merge/inplace_merge.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.merge/inplace_merge.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.merge/inplace_merge.pass.cpp @@ -9,15 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include -#include "pstl/execution" -#include "pstl/algorithm" - -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.merge/merge.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.merge/merge.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.merge/merge.pass.cpp @@ -9,16 +9,9 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include -#include -#include "pstl/execution" -#include "pstl/algorithm" - -#else #include #include -#endif // PSTL_STANDALONE_TESTS +#include #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp @@ -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 #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp @@ -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 #include -#endif // PSTL_STANDALONE_TESTS - -#include "support/utils.h" - #include #include +#include "support/utils.h" + using namespace TestUtils; template Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp @@ -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 #include -#endif // PSTL_STANDALONE_TESTS - -#include "support/utils.h" - #include #include +#include "support/utils.h" + using namespace TestUtils; struct test_partition_copy Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp @@ -9,15 +9,9 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS #include - -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp @@ -9,15 +9,9 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS #include - -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/copy_move.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/copy_move.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/copy_move.pass.cpp @@ -11,13 +11,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/fill.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/fill.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/fill.pass.cpp @@ -9,14 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS - -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/generate.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/generate.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/generate.pass.cpp @@ -9,15 +9,9 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS #include - -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/remove.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/remove.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/remove.pass.cpp @@ -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 #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/remove_copy.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/remove_copy.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/remove_copy.pass.cpp @@ -9,14 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS - -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/replace.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/replace.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/replace.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/replace_copy.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/replace_copy.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/replace_copy.pass.cpp @@ -11,13 +11,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/rotate.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/rotate.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/rotate.pass.cpp @@ -9,15 +9,9 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS #include - -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/rotate_copy.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/rotate_copy.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/rotate_copy.pass.cpp @@ -9,15 +9,9 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS #include - -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/swap_ranges.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/swap_ranges.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/swap_ranges.pass.cpp @@ -9,15 +9,9 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS #include - -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/transform_binary.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/transform_binary.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/transform_binary.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/transform_unary.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/transform_unary.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/transform_unary.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/unique.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/unique.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/unique.pass.cpp @@ -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 #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.modifying.operations/unique_copy_equal.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.modifying.operations/unique_copy_equal.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.modifying.operations/unique_copy_equal.pass.cpp @@ -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 #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.nonmodifying/adjacent_find.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.nonmodifying/adjacent_find.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.nonmodifying/adjacent_find.pass.cpp @@ -9,14 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS - -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.nonmodifying/all_of.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.nonmodifying/all_of.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.nonmodifying/all_of.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.nonmodifying/any_of.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.nonmodifying/any_of.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.nonmodifying/any_of.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.nonmodifying/count.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.nonmodifying/count.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.nonmodifying/count.pass.cpp @@ -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 #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.nonmodifying/equal.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.nonmodifying/equal.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.nonmodifying/equal.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.nonmodifying/find.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.nonmodifying/find.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.nonmodifying/find.pass.cpp @@ -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 #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.nonmodifying/find_first_of.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.nonmodifying/find_first_of.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.nonmodifying/find_first_of.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.nonmodifying/find_if.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.nonmodifying/find_if.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.nonmodifying/find_if.pass.cpp @@ -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 #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.nonmodifying/for_each.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.nonmodifying/for_each.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.nonmodifying/for_each.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.nonmodifying/mismatch.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.nonmodifying/mismatch.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.nonmodifying/mismatch.pass.cpp @@ -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 #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.nonmodifying/none_of.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.nonmodifying/none_of.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.nonmodifying/none_of.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.nonmodifying/nth_element.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.nonmodifying/nth_element.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.nonmodifying/nth_element.pass.cpp @@ -9,16 +9,9 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include #include -#include "pstl/execution" -#include "pstl/algorithm" - -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is_heap.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is_heap.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is_heap.pass.cpp @@ -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 #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" #include Index: pstl/trunk/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp @@ -9,15 +9,9 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS #include - -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp @@ -9,21 +9,14 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS - -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS - -#include "support/utils.h" - #include #include #include +#include "support/utils.h" + using namespace TestUtils; struct check_minelement Index: pstl/trunk/test/std/algorithms/alg.sorting/alg.set.operations/includes.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.sorting/alg.set.operations/includes.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.sorting/alg.set.operations/includes.pass.cpp @@ -9,16 +9,9 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS - #include - -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.sorting/alg.set.operations/set.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.sorting/alg.set.operations/set.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.sorting/alg.set.operations/set.pass.cpp @@ -9,17 +9,10 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS - #include #include - -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.sorting/is_sorted.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.sorting/is_sorted.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.sorting/is_sorted.pass.cpp @@ -9,14 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS - -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.sorting/partial_sort.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.sorting/partial_sort.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.sorting/partial_sort.pass.cpp @@ -9,16 +9,9 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS - #include - -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.sorting/partial_sort_copy.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.sorting/partial_sort_copy.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.sorting/partial_sort_copy.pass.cpp @@ -9,16 +9,11 @@ // Tests for partial_sort_copy -#include #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/algorithm" -#else +#include #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/algorithms/alg.sorting/sort.pass.cpp =================================================================== --- pstl/trunk/test/std/algorithms/alg.sorting/sort.pass.cpp +++ pstl/trunk/test/std/algorithms/alg.sorting/sort.pass.cpp @@ -9,14 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS - -#include "pstl/execution" -#include "pstl/algorithm" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/numerics/numeric.ops/adjacent_difference.pass.cpp =================================================================== --- pstl/trunk/test/std/numerics/numeric.ops/adjacent_difference.pass.cpp +++ pstl/trunk/test/std/numerics/numeric.ops/adjacent_difference.pass.cpp @@ -9,16 +9,9 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS #include - -#include "pstl/execution" -#include "pstl/algorithm" -#include "pstl/numeric" -#else #include -#include -#endif // PSTL_STANDALONE_TESTS +#include #include "support/utils.h" Index: pstl/trunk/test/std/numerics/numeric.ops/reduce.pass.cpp =================================================================== --- pstl/trunk/test/std/numerics/numeric.ops/reduce.pass.cpp +++ pstl/trunk/test/std/numerics/numeric.ops/reduce.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/numeric" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/numerics/numeric.ops/scan.pass.cpp =================================================================== --- pstl/trunk/test/std/numerics/numeric.ops/scan.pass.cpp +++ pstl/trunk/test/std/numerics/numeric.ops/scan.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/numeric" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/numerics/numeric.ops/transform_reduce.pass.cpp =================================================================== --- pstl/trunk/test/std/numerics/numeric.ops/transform_reduce.pass.cpp +++ pstl/trunk/test/std/numerics/numeric.ops/transform_reduce.pass.cpp @@ -9,14 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS - -#include "pstl/execution" -#include "pstl/numeric" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/numerics/numeric.ops/transform_scan.pass.cpp =================================================================== --- pstl/trunk/test/std/numerics/numeric.ops/transform_scan.pass.cpp +++ pstl/trunk/test/std/numerics/numeric.ops/transform_scan.pass.cpp @@ -9,13 +9,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/numeric" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/utilities/memory/specialized.algorithms/uninitialized_construct.pass.cpp =================================================================== --- pstl/trunk/test/std/utilities/memory/specialized.algorithms/uninitialized_construct.pass.cpp +++ pstl/trunk/test/std/utilities/memory/specialized.algorithms/uninitialized_construct.pass.cpp @@ -12,13 +12,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/memory" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/utilities/memory/specialized.algorithms/uninitialized_copy_move.pass.cpp =================================================================== --- pstl/trunk/test/std/utilities/memory/specialized.algorithms/uninitialized_copy_move.pass.cpp +++ pstl/trunk/test/std/utilities/memory/specialized.algorithms/uninitialized_copy_move.pass.cpp @@ -11,13 +11,8 @@ #include "support/pstl_test_config.h" -#ifdef PSTL_STANDALONE_TESTS -#include "pstl/execution" -#include "pstl/memory" -#else #include #include -#endif // PSTL_STANDALONE_TESTS #include "support/utils.h" Index: pstl/trunk/test/std/utilities/memory/specialized.algorithms/uninitialized_fill_destroy.pass.cpp =================================================================== --- pstl/trunk/test/std/utilities/memory/specialized.algorithms/uninitialized_fill_destroy.pass.cpp +++ pstl/trunk/test/std/utilities/memory/specialized.algorithms/uninitialized_fill_destroy.pass.cpp @@ -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 -#include -#endif // PSTL_STANDALONE_TESTS +#include #include "support/utils.h" Index: pstl/trunk/test/support/stdlib/algorithm =================================================================== --- pstl/trunk/test/support/stdlib/algorithm +++ pstl/trunk/test/support/stdlib/algorithm @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===-- algorithm ---------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _TEST_SUPPORT_STDLIB_ALGORITHM +#define _TEST_SUPPORT_STDLIB_ALGORITHM + +#include_next + +#include + +#if _PSTL_EXECUTION_POLICIES_DEFINED +// If has already been included, pull in implementations +# include +#else +// Otherwise just pull in forward declarations +# include +# define _PSTL_ALGORITHM_FORWARD_DECLARED 1 +#endif + +#endif /* _TEST_SUPPORT_STDLIB_ALGORITHM */ Index: pstl/trunk/test/support/stdlib/execution =================================================================== --- pstl/trunk/test/support/stdlib/execution +++ pstl/trunk/test/support/stdlib/execution @@ -0,0 +1,50 @@ +// -*- C++ -*- +//===-- execution ---------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _TEST_SUPPORT_STDLIB_EXECUTION +#define _TEST_SUPPORT_STDLIB_EXECUTION + +// #include_next // None of the standard libraries PSTL is built on top have the header yet. + +#include +#include + +#define _PSTL_EXECUTION_POLICIES_DEFINED 1 + +#if _PSTL_ALGORITHM_FORWARD_DECLARED +# include +#endif + +#if _PSTL_MEMORY_FORWARD_DECLARED +# include +#endif + +#if _PSTL_NUMERIC_FORWARD_DECLARED +# include +#endif + +#if _PSTL_CPP17_EXECUTION_POLICIES_PRESENT +_PSTL_PRAGMA_MESSAGE_POLICIES("The execution policies are defined in the namespace __pstl::execution") +#else +# include +_PSTL_PRAGMA_MESSAGE_POLICIES( + "The execution policies are injected into the standard namespace std::execution") +#endif + +//TODO: __pstl::execution namespace is injected into the pstl::execution namespace when the implementation is not a part of +// standard C++ library +namespace pstl +{ +namespace execution +{ +using namespace __pstl::execution; +} +} // namespace pstl + +#endif /* _TEST_SUPPORT_STDLIB_EXECUTION */ Index: pstl/trunk/test/support/stdlib/memory =================================================================== --- pstl/trunk/test/support/stdlib/memory +++ pstl/trunk/test/support/stdlib/memory @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===-- memory ------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _TEST_SUPPORT_STDLIB_MEMORY +#define _TEST_SUPPORT_STDLIB_MEMORY + +#include_next + +#include + +#if _PSTL_EXECUTION_POLICIES_DEFINED +// If has already been included, pull in implementations +# include +#else +// Otherwise just pull in forward declarations +# include +# define _PSTL_MEMORY_FORWARD_DECLARED 1 +#endif + +#endif /* _TEST_SUPPORT_STDLIB_MEMORY */ Index: pstl/trunk/test/support/stdlib/numeric =================================================================== --- pstl/trunk/test/support/stdlib/numeric +++ pstl/trunk/test/support/stdlib/numeric @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===-- numeric -----------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _TEST_SUPPORT_STDLIB_NUMERIC +#define _TEST_SUPPORT_STDLIB_NUMERIC + +#include_next + +#include + +#if _PSTL_EXECUTION_POLICIES_DEFINED +// If has already been included, pull in implementations +# include +#else +// Otherwise just pull in forward declarations +# include +# define _PSTL_NUMERIC_FORWARD_DECLARED 1 +#endif + +#endif /* _TEST_SUPPORT_STDLIB_NUMERIC */