One of the completion mechanisms.
More...
One of the completion mechanisms.
In its simplest form, it is an object similar to MPI_Request. Every synchronizer can be associated with one or more asynchronous operations. The synchronizer will be triggered after all the associated operations are completed. Users can know whether the corresponding operations have been completed by querying the synchronizer.
It can also be scheduler-aware when executing in the context of a task-based runtime (This is still an ongoing work).
◆ LCI_sync_create()
Create a synchronizer.
- Parameters
-
[in] | device | The device it should be associated to. |
[in] | threshold | How many asynchronous operations it will be associated to. |
[out] | completion | The pointer to the synchronizer to create. |
- Returns
- Should always be LCI_OK. All the other errors are fatal as defined by LCI_error_t.
◆ LCI_sync_free()
Free a synchronizer.
- Parameters
-
[in,out] | completion | The pointer to the synchronizer to free. |
- Returns
- Should always be LCI_OK. All the other errors are fatal as defined by LCI_error_t.
◆ LCI_sync_signal()
Signal a synchronizer once. A synchronizer needs to be signaled threshold
time to be considered triggered.
- Parameters
-
[in] | completion | The synchronizer to be triggered. |
[in] | request | A request containing the completion information of one completed operation. |
- Returns
- Should always be LCI_OK. All the other errors are fatal as defined by LCI_error_t.
◆ LCI_sync_test()
Test whether a synchronizer has been triggered. A synchronizer will be triggered if all the associated operations are completed.
- Parameters
-
[in] | completion | The synchronizer to be tested. |
[out] | request | An array of length threshold passed to LCI_sync_create. Every entry of the array will contain the completion information of one completed operation. |
- Returns
- LCI_OK if successfully popped one. LCI_ERR_RETRY if there is no entry to be popped in the queue. All the other errors are fatal as defined by LCI_error_t.
◆ LCI_sync_wait()
Wait for a synchronizer to be triggered. A synchronizer will be triggered if all the associated operations are completed.
- Parameters
-
[in] | completion | The synchronizer to be waited. |
[out] | request | An array of length threshold passed to LCI_sync_create. Every entry of the array will contain the completion information of one completed operation. |
- Returns
- Should always be LCI_OK. All the other errors are fatal as defined by LCI_error_t.
◆ LCI_MAX_SYNC_LENGTH
Maximum number of request a synchronizer may be waiting for.
- Note
- Unlimited for now.