Differential D58852 Diff 188992 test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp
Changeset View
Changeset View
Standalone View
Standalone View
test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp
- This file was moved from test/test_reverse.cpp.
// -*- C++ -*- | // -*- C++ -*- | ||||
//===-- test_reverse.cpp --------------------------------------------------===// | //===-- reverse.pass.cpp --------------------------------------------------===// | ||||
// | // | ||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||||
// See https://llvm.org/LICENSE.txt for license information. | // See https://llvm.org/LICENSE.txt for license information. | ||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
#include "pstl_test_config.h" | #include "support/pstl_test_config.h" | ||||
#include <iterator> | #include <iterator> | ||||
#ifdef PSTL_STANDALONE_TESTS | |||||
#include "pstl/execution" | #include "pstl/execution" | ||||
#include "pstl/algorithm" | #include "pstl/algorithm" | ||||
#include "utils.h" | #else | ||||
#include <execution> | |||||
#include <algorithm> | |||||
#endif // PSTL_STANDALONE_TESTS | |||||
#include "support/parallel_utils.h" | |||||
using namespace TestUtils; | using namespace Parallel_TestUtils; | ||||
struct test_one_policy | struct test_one_policy | ||||
{ | { | ||||
#if __PSTL_ICC_18_VC141_TEST_SIMD_LAMBDA_RELEASE_BROKEN || __PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN || \ | #if __PSTL_ICC_18_VC141_TEST_SIMD_LAMBDA_RELEASE_BROKEN || __PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN || \ | ||||
__PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN // dummy specialization by policy type, in case of broken configuration | __PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN // dummy specialization by policy type, in case of broken configuration | ||||
template <typename Iterator1, typename Iterator2> | template <typename Iterator1, typename Iterator2> | ||||
typename std::enable_if<is_same_iterator_category<Iterator1, std::random_access_iterator_tag>::value, void>::type | typename std::enable_if<is_same_iterator_category<Iterator1, std::random_access_iterator_tag>::value, void>::type | ||||
operator()(pstl::execution::unsequenced_policy, Iterator1 data_b, Iterator1 data_e, Iterator2 actual_b, | operator()(__pstl::execution::unsequenced_policy, Iterator1 data_b, Iterator1 data_e, Iterator2 actual_b, | ||||
Iterator2 actual_e) | Iterator2 actual_e) | ||||
{ | { | ||||
} | } | ||||
template <typename Iterator1, typename Iterator2> | template <typename Iterator1, typename Iterator2> | ||||
typename std::enable_if<is_same_iterator_category<Iterator1, std::random_access_iterator_tag>::value, void>::type | typename std::enable_if<is_same_iterator_category<Iterator1, std::random_access_iterator_tag>::value, void>::type | ||||
operator()(pstl::execution::parallel_unsequenced_policy, Iterator1 data_b, Iterator1 data_e, Iterator2 actual_b, | operator()(__pstl::execution::parallel_unsequenced_policy, Iterator1 data_b, Iterator1 data_e, Iterator2 actual_b, | ||||
Iterator2 actual_e) | Iterator2 actual_e) | ||||
{ | { | ||||
} | } | ||||
#endif | #endif | ||||
template <typename ExecutionPolicy, typename Iterator1, typename Iterator2> | template <typename ExecutionPolicy, typename Iterator1, typename Iterator2> | ||||
typename std::enable_if<!is_same_iterator_category<Iterator1, std::forward_iterator_tag>::value>::type | typename std::enable_if<!is_same_iterator_category<Iterator1, std::forward_iterator_tag>::value>::type | ||||
operator()(ExecutionPolicy&& exec, Iterator1 data_b, Iterator1 data_e, Iterator2 actual_b, Iterator2 actual_e) | operator()(ExecutionPolicy&& exec, Iterator1 data_b, Iterator1 data_e, Iterator2 actual_b, Iterator2 actual_e) | ||||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |