-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert StdIsSortedUntil from md to rst: init
- Loading branch information
1 parent
aa873f7
commit c802911
Showing
2 changed files
with
119 additions
and
90 deletions.
There are no files selected for viewing
90 changes: 0 additions & 90 deletions
90
docs/source/API/algorithms/std-algorithms/all/StdIsSortedUntil.md
This file was deleted.
Oops, something went wrong.
119 changes: 119 additions & 0 deletions
119
docs/source/API/algorithms/std-algorithms/all/StdIsSortedUntil.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
``is_sorted_until`` | ||
=================== | ||
|
||
Header: ``Kokkos_StdAlgorithms.hpp`` | ||
|
||
Description | ||
----------- | ||
|
||
Finds the largest range beginning at ``first`` or at ``Kokkos::Experimental::begin(view)`` in which the elements are sorted in non-descending order. Comparison between elements is done via ``operator<`` or the binary functor ``comp``. | ||
|
||
Interface | ||
--------- | ||
|
||
.. warning:: This is currently inside the ``Kokkos::Experimental`` namespace. | ||
|
||
.. code-block:: cpp | ||
// | ||
// overload set accepting execution space | ||
// | ||
template <class ExecutionSpace, class IteratorType> | ||
IteratorType is_sorted_until(const ExecutionSpace& exespace, (1) | ||
IteratorType first, IteratorType last); | ||
template <class ExecutionSpace, class IteratorType> | ||
IteratorType is_sorted_until(const std::string& label, (2) | ||
const ExecutionSpace& exespace, | ||
IteratorType first, IteratorType last); | ||
template <class ExecutionSpace, class IteratorType, class ComparatorType> | ||
IteratorType is_sorted_until(const ExecutionSpace& exespace, (3) | ||
IteratorType first, IteratorType last, | ||
ComparatorType comp); | ||
template <class ExecutionSpace, class IteratorType, class ComparatorType> | ||
IteratorType is_sorted_until(const std::string& label, (4) | ||
const ExecutionSpace& exespace, | ||
IteratorType first, IteratorType last, | ||
ComparatorType comp); | ||
// | ||
// overload set accepting views | ||
// | ||
template <class ExecutionSpace, class DataType, class... Properties> | ||
auto is_sorted_until(const ExecutionSpace& exespace, (5) | ||
const Kokkos::View<DataType, Properties...>& view); | ||
template <class ExecutionSpace, class DataType, class... Properties> | ||
auto is_sorted_until(const std::string& label, (6) | ||
const ExecutionSpace& exespace, | ||
const Kokkos::View<DataType, Properties...>& view); | ||
template < | ||
class ExecutionSpace, | ||
class DataType, class... Properties, class ComparatorType> | ||
auto is_sorted_until(const ExecutionSpace& exespace, (7) | ||
const Kokkos::View<DataType, Properties...>& view, | ||
ComparatorType comp); | ||
template < | ||
class ExecutionSpace, | ||
class DataType, class... Properties, class ComparatorType> | ||
auto is_sorted_until(const std::string& label, const ExecutionSpace& exespace, (8) | ||
const Kokkos::View<DataType, Properties...>& view, | ||
ComparatorType comp); | ||
// | ||
// overload set accepting team handle | ||
// | ||
template <class TeamHandleType, class IteratorType> | ||
KOKKOS_FUNCTION | ||
IteratorType is_sorted_until(const TeamHandleType& teamHandle, (9) | ||
IteratorType first, IteratorType last); | ||
template <class TeamHandleType, class DataType, class... Properties> | ||
KOKKOS_FUNCTION | ||
auto is_sorted_until(const TeamHandleType& teamHandle, (10) | ||
const Kokkos::View<DataType, Properties...>& view); | ||
template <class TeamHandleType, class IteratorType, class ComparatorType> | ||
KOKKOS_FUNCTION | ||
IteratorType is_sorted_until(const TeamHandleType& teamHandle, (11) | ||
IteratorType first, IteratorType last, | ||
ComparatorType comp); | ||
template < | ||
class TeamHandleType, | ||
class DataType, class... Properties, class ComparatorType> | ||
KOKKOS_FUNCTION | ||
auto is_sorted_until(const TeamHandleType& teamHandle, (12) | ||
const Kokkos::View<DataType, Properties...>& view, | ||
ComparatorType comp); | ||
Parameters and Requirements | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. |IsSorted| replace:: ``is_sorted`` | ||
.. _IsSorted: ./StdIsSorted.html | ||
|
||
- ``exespace``, ``first``, ``last``, ``view``, ``comp``: same as in |IsSorted|_ | ||
|
||
- ``teamHandle``: team handle instance given inside a parallel region when using a TeamPolicy | ||
|
||
- ``label``: string forwarded to internal parallel kernels for debugging purposes | ||
|
||
- must be rank-1, and have ``LayoutLeft``, ``LayoutRight``, or ``LayoutStride`` | ||
|
||
- must be accessible from ``exespace`` | ||
|
||
- 1 & 3: The default string is "Kokkos::is_sorted_until_iterator_api_default" | ||
|
||
- 5 & 7: The default string is "Kokkos::is_sorted_until_view_api_default" | ||
|
||
- NOTE: overloads accepting a team handle do not use a label internally | ||
|
||
Return Value | ||
~~~~~~~~~~~~ | ||
|
||
- The last iterator ``it`` for which range ``[first, it)`` is sorted and where the following is true: ``std::is_same_v<decltype(it), IteratorType>``, or for which range ``[Kokkos::Experimental::begin(view), it)`` is sorted. For this second case, note that ``it`` is computed as: ``Kokkos::Experimental::begin(view) + increment`` where ``increment`` is found in the algoritm. |