Changeset View
Changeset View
Standalone View
Standalone View
test/std/algorithms/alg.modifying.operations/unique.pass.cpp
- This file was moved from test/test_unique.cpp.
// -*- C++ -*- | // -*- C++ -*- | ||||
//===-- test_unique.cpp ---------------------------------------------------===// | //===-- unique.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 | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// Test for unique | // Test for unique | ||||
#include "pstl_test_config.h" | #include "support/pstl_test_config.h" | ||||
#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 | |||||
using namespace TestUtils; | #include "support/parallel_utils.h" | ||||
using namespace Parallel_TestUtils; | |||||
struct run_unique | struct run_unique | ||||
{ | { | ||||
#if __PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN || \ | #if __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 ForwardIt, typename Generator> | template <typename ForwardIt, typename Generator> | ||||
void | void | ||||
operator()(pstl::execution::unsequenced_policy, ForwardIt first1, ForwardIt last1, ForwardIt first2, | operator()(__pstl::execution::unsequenced_policy, ForwardIt first1, ForwardIt last1, ForwardIt first2, | ||||
ForwardIt last2, Generator generator) | ForwardIt last2, Generator generator) | ||||
{ | { | ||||
} | } | ||||
template <typename ForwardIt, typename Generator> | template <typename ForwardIt, typename Generator> | ||||
void | void | ||||
operator()(pstl::execution::parallel_unsequenced_policy, ForwardIt first1, ForwardIt last1, ForwardIt first2, | operator()(__pstl::execution::parallel_unsequenced_policy, ForwardIt first1, ForwardIt last1, ForwardIt first2, | ||||
ForwardIt last2, Generator generator) | ForwardIt last2, Generator generator) | ||||
{ | { | ||||
} | } | ||||
template <typename ForwardIt, typename BinaryPred, typename Generator> | template <typename ForwardIt, typename BinaryPred, typename Generator> | ||||
void | void | ||||
operator()(pstl::execution::unsequenced_policy, ForwardIt first1, ForwardIt last1, ForwardIt first2, | operator()(__pstl::execution::unsequenced_policy, ForwardIt first1, ForwardIt last1, ForwardIt first2, | ||||
ForwardIt last2, BinaryPred pred, Generator generator) | ForwardIt last2, BinaryPred pred, Generator generator) | ||||
{ | { | ||||
} | } | ||||
template <typename ForwardIt, typename BinaryPred, typename Generator> | template <typename ForwardIt, typename BinaryPred, typename Generator> | ||||
void | void | ||||
operator()(pstl::execution::parallel_unsequenced_policy, ForwardIt first1, ForwardIt last1, ForwardIt first2, | operator()(__pstl::execution::parallel_unsequenced_policy, ForwardIt first1, ForwardIt last1, ForwardIt first2, | ||||
ForwardIt last2, BinaryPred pred, Generator generator) | ForwardIt last2, BinaryPred pred, Generator generator) | ||||
{ | { | ||||
} | } | ||||
#endif | #endif | ||||
template <typename Policy, typename ForwardIt, typename Generator> | template <typename Policy, typename ForwardIt, typename Generator> | ||||
void | void | ||||
operator()(Policy&& exec, ForwardIt first1, ForwardIt last1, ForwardIt first2, ForwardIt last2, Generator generator) | operator()(Policy&& exec, ForwardIt first1, ForwardIt last1, ForwardIt first2, ForwardIt last2, Generator generator) | ||||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |