One of the completion mechanisms.
More...
One of the completion mechanisms.
Every completion queue can be associated with one or more asynchronous operations. When a operation is completed, the LCI runtime will push an entry into the queue, users can get completion notification by calling LCI_cq_pop.
◆ LCI_queue_create()
Create a completion queue.
- Parameters
-
[in] | device | The device it should be associated to. |
[out] | cq | The pointer to the completion queue to create. |
- Returns
- Should always be LCI_OK. All the other errors are fatal as defined by LCI_error_t.
◆ LCI_queue_free()
Free a completion queue.
- Parameters
-
[in,out] | cq | The pointer to the completion queue to free. |
- Returns
- Should always be LCI_OK. All the other errors are fatal as defined by LCI_error_t.
◆ LCI_queue_len()
Query the number of entries in a completion queue.
- Parameters
-
[in] | cq | The completion queue to query. |
[out] | len | Return the number of entries in the queue. |
- Returns
- No available yet. Should always be LCI_ERR_FEATURE_NA.
◆ LCI_queue_pop()
Pop one entry from the completion queue. This call is nonblocking.
- Parameters
-
[in] | cq | The completion queue to pop. |
[out] | request | The pointer to a request object. The completion information of the completed operation will be written into it. |
- 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_queue_pop_multiple()
Pop multiple entry from the completion queue. This call is nonblocking.
- Parameters
-
[in] | cq | The completion queue to pop. |
[in] | request_count | The maximum entries to be popped. |
[out] | request | An array of request objects of length at least request_count .Each of the fist return_count entries of the array will contain the completion information of one completed operation. |
[out] | request_count | The number of entries that has been popped. |
- Returns
- Should always be LCI_OK. All the other errors are fatal as defined by LCI_error_t.
◆ LCI_queue_wait()
Pop one entry from the completion queue. This call will block the calling thread until there is an entry to be popped.
- Parameters
-
[in] | cq | The completion queue to pop. |
[out] | request | The pointer to a request object. The completion information of the completed operation will be written into it. |
- Returns
- LCI_OK if successfully popped one. All the other errors are fatal as defined by LCI_error_t.
◆ LCI_queue_wait_multiple()
Pop multiple entry from the completion queue.This call will block the calling thread until request_count
entries has been popped.
- Parameters
-
[in] | cq | The completion queue to pop. |
[in] | request_count | The number of entries to be popped. |
[out] | request | An array of request objects of length at least request_count .Each 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_DEFAULT_QUEUE_LENGTH
int LCI_DEFAULT_QUEUE_LENGTH |
Initial number of entries in a default completion queue.
- Note
- The completion queue size is fixed in current implementation.
◆ LCI_MAX_QUEUE_LENGTH
Maximum number of entries in a completion queue.
- Note
- The completion queue size is fixed in current implementation.
◆ LCI_UR_CQ
Default completion queue initialized by LCI_initialize. Just for convenience.