Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a note about changes in RangePolicy index conversion safety check #558

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions docs/source/API/core/policies/RangePolicy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,27 +106,27 @@ Constructors

Default Constructor uninitialized policy.

.. cppkokkos:function:: RangePolicy(int64_t begin, int64_t end)
.. cppkokkos:function:: RangePolicy(index_type begin, index_type end)
nmm0 marked this conversation as resolved.
Show resolved Hide resolved

Provide a start and end index.
Provide a begin and end index.

.. cppkokkos:function:: RangePolicy(int64_t begin, int64_t end, ChunkSize chunk_size)
.. cppkokkos:function:: RangePolicy(index_type begin, index_type end, ChunkSize chunk_size)

Provide a start and end index as well as a ``ChunkSize``.
Provide a begin and end index as well as a ``ChunkSize``.

.. cppkokkos:function:: RangePolicy(const ExecutionSpace& space, int64_t begin, int64_t end)
.. cppkokkos:function:: RangePolicy(const ExecutionSpace& space, index_type begin, index_type end)

Provide a start and end index and an ``ExecutionSpace`` instance to use as the execution resource.
Provide a begin and end index and an ``ExecutionSpace`` instance to use as the execution resource.

.. cppkokkos:function:: RangePolicy(const ExecutionSpace& space, int64_t begin, int64_t end, ChunkSize chunk_size)
.. cppkokkos:function:: RangePolicy(const ExecutionSpace& space, index_type begin, index_type end, ChunkSize chunk_size)

Provide a start and end index and an ``ExecutionSpace`` instance to use as the execution resource, as well as a ``ChunkSize``.
Provide a begin and end index and an ``ExecutionSpace`` instance to use as the execution resource, as well as a ``ChunkSize``.

Preconditions:
^^^^^^^^^^^^^^

* The start index must not be greater than the end index.
* The actual constructors are templated so we can check that they are converted to ``index_type`` safely (see `#6754 <https://github.com/kokkos/kokkos/pull/6754>`_).
* The begin index must not be greater than the end index.
* The actual constructors are templated so we can check that they are converted to ``index_type`` safely if possible (see `#6754 <https://github.com/kokkos/kokkos/pull/6754>`_).

CTAD Constructors (since 4.3):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
Loading