Style edits (#122)

[ROCm/rocshmem commit: 67bff9ca30]
This commit is contained in:
yugang-amd
2025-05-13 16:26:28 -04:00
committed by GitHub
parent 2f82ed9bf0
commit 17cde51fb7
16 changed files with 477 additions and 495 deletions
+44 -42
View File
@@ -5,7 +5,7 @@
.. _rocshmem-api-pt2pt-sync:
-----------------------------------------
Point-to-Point Synchronization Routines
Point-to-point synchronization routines
-----------------------------------------
ROCSHMEM_WAIT_UNTIL
@@ -13,95 +13,97 @@ ROCSHMEM_WAIT_UNTIL
.. cpp:function:: __device__ void rocshmem_TYPENAME_wait_until(TYPE *ivars, int cmp, TYPE val)
:param ivars: Pointer to memory on the symmetric heap to wait for
:param cmp: Operation for the comparison
:param val: Value to compare the memory at ivars to
:returns: None
:param ivars: Pointer to memory on the symmetric heap to wait for.
:param cmp: Operation for the comparison.
:param val: Value to compare the memory at ``ivars`` to.
:returns: None.
**Description:**
Block the caller until the condition ``(*ivars cmp val)`` is true.
This routine blocks the caller until the condition ``(*ivars cmp val)`` is true.
Valid ``cmp`` values can be seen at :ref:`CMP_VALUES`.
Valid ``cmp`` values are listed in :ref:`CMP_VALUES`.
Valid ``TYPENAME`` and ``TYPE`` values can be seen at :ref:`STANDARD_AMO_TYPES`.
Valid ``TYPENAME`` and ``TYPE`` values are listed in :ref:`STANDARD_AMO_TYPES`.
ROCSHMEM_WAIT_UNTIL_ALL
-----------------------
.. cpp:function:: __device__ void rocshmem_TYPENAME_wait_until_all(TYPE *ivars, size_t nelems, const int* status, int cmp, TYPE val)
:param ivars: Pointer to memory on the symmetric heap to wait for
:param nelems: Number of elements in the ivars array
:param status: Array of length nelems that is used to exclude elements from wait
:param cmp: Operation for the comparison
:param val: Value to compare
:returns: None
:param ivars: Pointer to memory on the symmetric heap to wait for.
:param nelems: Number of elements in the ``ivars`` array.
:param status: Array of length ``nelems`` to exclude elements from the wait.
:param cmp: Operation for the comparison.
:param val: Value to compare.
:returns: None.
**Description:**
Block the caller until the condition ``(ivars[i] cmp val)`` is true for all ivars
This routine blocks the caller until the condition ``(ivars[i] cmp val)`` is true for all ``ivars``.
Valid ``cmp`` values can be seen at :ref:`CMP_VALUES`.
Valid ``cmp`` values are listed in :ref:`CMP_VALUES`.
Valid ``TYPENAME`` and ``TYPE`` values can be seen at :ref:`STANDARD_AMO_TYPES`.
Valid ``TYPENAME`` and ``TYPE`` values are listed in :ref:`STANDARD_AMO_TYPES`.
ROCSHMEM_WAIT_UNTIL_ANY
-----------------------
.. cpp:function:: __device__ size_t rocshmem_TYPENAME_wait_until_any(TYPE *ivars, size_t nelems, const int* status, int cmp, TYPE val)
:param ivars: Pointer to memory on the symmetric heap to wait for
:param nelems: Number of elements in the ivars array
:param status: Array of length nelems that is used to exclude elements from wait
:param cmp: Operation for the comparison
:param val: Value to compare
:returns: The index of an element in the ivars array that satisfies the wait condition; If the wait set is empty, this routine returns SIZE_MAX
:param ivars: Pointer to memory on the symmetric heap to wait for.
:param nelems: Number of elements in the ``ivars`` array.
:param status: Array of length ``nelems`` to exclude elements from the wait.
:param cmp: Operation for the comparison.
:param val: Value to compare.
:returns: The index of an element in the ``ivars`` array that satisfies the wait condition. If the wait set is empty, this routine returns ``SIZE_MAX``.
**Description:**
Block the caller until any of the condition ``(ivars[i] cmp val)`` is true.
This routine blocks the caller until any of the condition ``(ivars[i] cmp val)`` is true.
Valid `cmp` values can be seen at :ref:`CMP_VALUES`.
Valid ``cmp`` values are listed in :ref:`CMP_VALUES`.
Valid ``TYPENAME`` and ``TYPE`` values can be seen at :ref:`STANDARD_AMO_TYPES`.
Valid ``TYPENAME`` and ``TYPE`` values are listed in :ref:`STANDARD_AMO_TYPES`.
ROCSHMEM_WAIT_UNTIL_SOME
------------------------
.. cpp:function:: __device__ size_t rocshmem_TYPENAME_wait_until_some(TYPE *ivars, size_t nelems, size_t* indices, const int* status, int cmp, TYPE val)
:param ivars: Pointer to memory on the symmetric heap to wait for
:param nelems: Number of elements in the ivars array
:param indices: List of indices that of at least of length nelems
:param status: Array of length nelems that is used to exclude elements from wait
:param cmp: Operation for the comparison
:param val: Value to compare
:returns: The number of indices returned in the indices array; If the wait set is empty, this routine returns 0
:param ivars: Pointer to memory on the symmetric heap to wait for.
:param nelems: Number of elements in the ``ivars`` array.
:param indices: List of indices with a length of at least ``nelems``.
:param status: Array of length ``nelems`` to exclude elements from the wait.
:param cmp: Operation for the comparison.
:param val: Value to compare.
:returns: The number of indices returned in the indices array. If the wait set is empty, this routine returns ``0``.
**Description:**
Block the caller until any of the conditions ``(ivars[i] cmp val)`` is true.
This routine blocks the caller until any of the conditions ``(ivars[i] cmp val)`` is true.
Valid `cmp` values can be seen at :ref:`CMP_VALUES`.
Valid ``cmp`` values are listed in :ref:`CMP_VALUES`.
Valid ``TYPENAME`` and ``TYPE`` values can be seen at :ref:`STANDARD_AMO_TYPES`.
Valid ``TYPENAME`` and ``TYPE`` values are listed in :ref:`STANDARD_AMO_TYPES`.
ROCSHMEM_TEST
-------------
.. cpp:function:: __device__ int rocshmem_TYPENAME_test(TYPE *ivars, int cmp, TYPE val)
:param ivars: Pointer to memory on the symmetric heap to wait for
:param cmp: Operation for the comparison
:param val: Value to compare the memory at ivars to
:param ivars: Pointer to memory on the symmetric heap to wait for.
:param cmp: Operation for the comparison.
:param val: Value to compare the memory at ``ivars`` to.
:returnS: 1 if the evaluation is true, 0 otherwise
:returns: ``1`` if the evaluation is true. ``0`` otherwise.
**Description:**
Test if the condition ``(*ivars cmp val)`` is true.
This routine tests if the condition ``(*ivars cmp val)`` is true.
SUPPORTED COMPARISONS
Supported comparisons
---------------------
.. _CMP_VALUES:
The following table lists the point-to-point comparison constants:
.. list-table:: Point-to-Point Comparison Constants
:widths: 20 20
:header-rows: 1