Skip to content

Commit 490fc12

Browse files
[oneDPL][ranges] Add is_heap and is_heap_until (#645)
1 parent 5b650c4 commit 490fc12

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

source/elements/oneDPL/source/parallel_api/parallel_range_api.rst

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,8 @@ Sequence Search and Comparison
348348
349349
}
350350
351-
Sorting and Merge
352-
+++++++++++++++++
351+
Sorting, Merge, and Heap Operations
352+
+++++++++++++++++++++++++++++++++++
353353

354354
.. code:: cpp
355355
@@ -417,6 +417,25 @@ Sorting and Merge
417417
inplace_merge (ExecutionPolicy&& pol, R&& r, std::ranges::iterator_t<R> middle,
418418
Comp comp = {}, Proj proj = {});
419419
420+
// is_heap
421+
template <typename ExecutionPolicy, std::ranges::random_access_range R,
422+
typename Proj = std::identity,
423+
std::indirect_strict_weak_order< std::projected<std::ranges::iterator_t<R>, Proj> >
424+
Comp = std::ranges::less>
425+
requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
426+
std::ranges::sized_range<R>
427+
bool is_heap (ExecutionPolicy&& pol, R&& r, Comp comp = {}, Proj proj = {});
428+
429+
// is_heap_until
430+
template <typename ExecutionPolicy, std::ranges::random_access_range R,
431+
typename Proj = std::identity,
432+
std::indirect_strict_weak_order< std::projected<std::ranges::iterator_t<R>, Proj> >
433+
Comp = std::ranges::less>
434+
requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
435+
std::ranges::sized_range<R>
436+
std::ranges::borrowed_iterator_t<R>
437+
is_heap_until (ExecutionPolicy&& pol, R&& r, Comp comp = {}, Proj proj = {});
438+
420439
}
421440
422441
Set operations

0 commit comments

Comments
 (0)