hpx::ends_with
hpx::ends_with#
Defined in header hpx/algorithm.hpp.
See Public API for a list of names and headers that are part of the public HPX API.
-
namespace hpx
Functions
-
template<typename InIter1, typename InIter2, typename Pred>
bool ends_with(InIter1 first1, InIter1 last1, InIter2 first2, InIter2 last2, Pred &&pred)# Checks whether the second range defined by [first1, last1) matches the suffix of the first range defined by [first2, last2)
The assignments in the parallel ends_with algorithm invoked without an execution policy object execute in sequential order in the calling thread.
Note
Complexity: Linear: at most min(N1, N2) applications of the predicate and both projections.
- Template Parameters
InIter1 – The type of the begin source iterators used (deduced). This iterator type must meet the requirements of an input iterator.
InIter2 – The type of the begin destination iterators used deduced). This iterator type must meet the requirements of a input iterator.
Pred – The binary predicate that compares the projected elements.
- Parameters
first1 – Refers to the beginning of the source range.
last1 – Refers to the end of the source range.
first2 – Refers to the beginning of the destination range.
last2 – Refers to the end of the destination range.
pred – Specifies the binary predicate function (or function object) which will be invoked for comparison of the elements in the in two ranges projected by proj1 and proj2 respectively.
- Returns
The ends_with algorithm returns bool. The ends_with algorithm returns a boolean with the value true if the second range matches the suffix of the first range, false otherwise.
-
template<typename ExPolicy, typename FwdIter1, typename FwdIter2, typename Pred>
hpx::parallel::util::detail::algorithm_result<ExPolicy, bool>::type ends_with(ExPolicy &&policy, FwdIter1 first1, FwdIter1 last1, FwdIter2 first2, FwdIter2 last2, Pred &&pred)# Checks whether the second range defined by [first1, last1) matches the suffix of the first range defined by [first2, last2). Executed according to the policy.
The assignments in the parallel ends_with algorithm invoked with an execution policy object of type sequenced_policy execute in sequential order in the calling thread.
The assignments in the parallel ends_with algorithm invoked with an execution policy object of type parallel_policy or parallel_task_policy are permitted to execute in an unordered fashion in unspecified threads, and indeterminately sequenced within each thread.
Note
Complexity: Linear: at most min(N1, N2) applications of the predicate and both projections.
- Template Parameters
ExPolicy – The type of the execution policy to use (deduced). It describes the manner in which the execution of the algorithm may be parallelized and the manner in which it executes the assignments.
FwdIter1 – The type of the begin source iterators used (deduced). This iterator type must meet the requirements of an forward iterator.
FwdIter2 – The type of the begin destination iterators used deduced). This iterator type must meet the requirements of a forward iterator.
Pred – The binary predicate that compares the projected elements.
- Parameters
policy – The execution policy to use for the scheduling of the iterations.
first1 – Refers to the beginning of the source range.
last1 – Refers to the end of the source range.
first2 – Refers to the beginning of the destination range.
last2 – Refers to the end of the destination range.
pred – Specifies the binary predicate function (or function object) which will be invoked for
- Returns
The ends_with algorithm returns a hpx::future<bool> if the execution policy is of type sequenced_task_policy or parallel_task_policy and returns bool otherwise. The ends_with algorithm returns a boolean with the value true if the second range matches the suffix of the first range, false otherwise.
-
template<typename InIter1, typename InIter2, typename Pred>