![]() |
hpx::parallel::v1::count
// In header: <hpx/parallel/detail/count.hpp> template<typename ExPolicy, typename InIter, typename T> unspecified count(ExPolicy && policy, InIter first, InIter last, T const & value);
Returns the number of elements in the range [first, last) satisfying a specific criteria. This version counts the elements that are equal to the given value.
![]() |
Note |
---|---|
Complexity: Performs exactly last - first comparisons. |
The comparisons in the parallel count algorithm invoked with an execution policy object of type sequential_execution_policy
execute in sequential order in the calling thread.
![]() |
Note |
---|---|
The comparisons in the parallel count algorithm invoked with an execution policy object of type |
Parameters: |
|
||||||||
Template Parameters: |
|
||||||||
Returns: |
The count algorithm returns a hpx::future<difference_type> if the execution policy is of type task_execution_policy and returns difference_type otherwise (where difference_type is defined by std::iterator_traits<InIter>::difference_type. The count algorithm returns the number of elements satisfying the given criteria. |