From 168d96d6e615498288e808437bfeceb4075ecb8e Mon Sep 17 00:00:00 2001 From: Dong Hun Lee Date: Tue, 30 Jul 2024 14:54:50 -0600 Subject: [PATCH 1/4] Add a note about the indices conversion checks in RangePolicy --- docs/source/API/core/policies/RangePolicy.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/source/API/core/policies/RangePolicy.rst b/docs/source/API/core/policies/RangePolicy.rst index 98405db66..4b3f5bfb1 100644 --- a/docs/source/API/core/policies/RangePolicy.rst +++ b/docs/source/API/core/policies/RangePolicy.rst @@ -106,19 +106,19 @@ Constructors Default Constructor uninitialized policy. -.. cppkokkos:function:: RangePolicy(int64_t begin, int64_t end) +.. cppkokkos:function:: RangePolicy(IndexType begin, IndexType end) Provide a start and end index. -.. cppkokkos:function:: RangePolicy(int64_t begin, int64_t end, ChunkSize chunk_size) +.. cppkokkos:function:: RangePolicy(IndexType begin, IndexType end, ChunkSize chunk_size) Provide a start 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, IndexType begin, IndexType end) Provide a start 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, IndexType begin, IndexType 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``. @@ -127,6 +127,7 @@ 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 `_). + * The conversion safety check is only performed if ``index_type`` is convertible to the start and end index types. CTAD Constructors (since 4.3): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From 8f2e1f623d8f8a86dd3d418526635a90afe24b38 Mon Sep 17 00:00:00 2001 From: Lee Date: Tue, 30 Jul 2024 16:39:56 -0600 Subject: [PATCH 2/4] Changed 'start' to 'begin' --- docs/source/API/core/policies/RangePolicy.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/source/API/core/policies/RangePolicy.rst b/docs/source/API/core/policies/RangePolicy.rst index 4b3f5bfb1..157a25879 100644 --- a/docs/source/API/core/policies/RangePolicy.rst +++ b/docs/source/API/core/policies/RangePolicy.rst @@ -108,26 +108,26 @@ Constructors .. cppkokkos:function:: RangePolicy(IndexType begin, IndexType end) - Provide a start and end index. + Provide a begin and end index. .. cppkokkos:function:: RangePolicy(IndexType begin, IndexType 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, IndexType begin, IndexType 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, IndexType begin, IndexType 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 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 (see `#6754 `_). - * The conversion safety check is only performed if ``index_type`` is convertible to the start and end index types. + * The conversion safety check is only performed if ``index_type`` is convertible to the begin and end index types. CTAD Constructors (since 4.3): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From 323155565d1f8ac1d2f28cfdb628a53260771293 Mon Sep 17 00:00:00 2001 From: Lee Date: Thu, 1 Aug 2024 18:39:38 -0600 Subject: [PATCH 3/4] Reverted IndexType to index_type --- docs/source/API/core/policies/RangePolicy.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/source/API/core/policies/RangePolicy.rst b/docs/source/API/core/policies/RangePolicy.rst index 157a25879..830e8145c 100644 --- a/docs/source/API/core/policies/RangePolicy.rst +++ b/docs/source/API/core/policies/RangePolicy.rst @@ -106,19 +106,19 @@ Constructors Default Constructor uninitialized policy. -.. cppkokkos:function:: RangePolicy(IndexType begin, IndexType end) +.. cppkokkos:function:: RangePolicy(index_type begin, index_type end) Provide a begin and end index. -.. cppkokkos:function:: RangePolicy(IndexType begin, IndexType end, ChunkSize chunk_size) +.. cppkokkos:function:: RangePolicy(index_type begin, index_type end, ChunkSize chunk_size) Provide a begin and end index as well as a ``ChunkSize``. -.. cppkokkos:function:: RangePolicy(const ExecutionSpace& space, IndexType begin, IndexType end) +.. cppkokkos:function:: RangePolicy(const ExecutionSpace& space, index_type begin, index_type end) Provide a begin and end index and an ``ExecutionSpace`` instance to use as the execution resource. -.. cppkokkos:function:: RangePolicy(const ExecutionSpace& space, IndexType begin, IndexType end, ChunkSize chunk_size) +.. cppkokkos:function:: RangePolicy(const ExecutionSpace& space, index_type begin, index_type end, ChunkSize chunk_size) Provide a begin and end index and an ``ExecutionSpace`` instance to use as the execution resource, as well as a ``ChunkSize``. @@ -127,7 +127,7 @@ Preconditions: * 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 (see `#6754 `_). - * The conversion safety check is only performed if ``index_type`` is convertible to the begin and end index types. + * The conversion safety check is performed only if ``index_type`` is convertible to the begin and end index types. CTAD Constructors (since 4.3): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From 62cbb47bb87c0eed221c486939de1ebe147a63c9 Mon Sep 17 00:00:00 2001 From: Dong Hun Lee <59181952+ldh4@users.noreply.github.com> Date: Tue, 20 Aug 2024 15:23:49 -0600 Subject: [PATCH 4/4] Update docs/source/API/core/policies/RangePolicy.rst Co-authored-by: Nevin ":-)" Liber --- docs/source/API/core/policies/RangePolicy.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/source/API/core/policies/RangePolicy.rst b/docs/source/API/core/policies/RangePolicy.rst index 830e8145c..d3feb2927 100644 --- a/docs/source/API/core/policies/RangePolicy.rst +++ b/docs/source/API/core/policies/RangePolicy.rst @@ -126,8 +126,7 @@ Preconditions: ^^^^^^^^^^^^^^ * 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 (see `#6754 `_). - * The conversion safety check is performed only if ``index_type`` is convertible to the begin and end index types. +* The actual constructors are templated so we can check that they are converted to ``index_type`` safely if possible (see `#6754 `_). CTAD Constructors (since 4.3): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^