LCI

One of the completion mechanisms. More...

Collaboration diagram for LCI completion queue:

Functions

LCI_API LCI_error_t LCI_queue_create (LCI_device_t device, LCI_comp_t *cq)
 Create a completion queue. More...
 
LCI_API LCI_error_t LCI_queue_free (LCI_comp_t *cq)
 Free a completion queue. More...
 
LCI_API LCI_error_t LCI_queue_pop (LCI_comp_t cq, LCI_request_t *request)
 Pop one entry from the completion queue. This call is nonblocking. More...
 
LCI_API LCI_error_t LCI_queue_wait (LCI_comp_t cq, LCI_request_t *request)
 Pop one entry from the completion queue. This call will block the calling thread until there is an entry to be popped. More...
 
LCI_API LCI_error_t LCI_queue_pop_multiple (LCI_comp_t cq, size_t request_count, LCI_request_t *requests, size_t *return_count)
 Pop multiple entry from the completion queue. This call is nonblocking. More...
 
LCI_API LCI_error_t LCI_queue_wait_multiple (LCI_comp_t cq, size_t request_count, LCI_request_t *requests)
 Pop multiple entry from the completion queue.This call will block the calling thread until request_count entries has been popped. More...
 
LCI_API LCI_error_t LCI_queue_len (LCI_comp_t cq, size_t *len)
 Query the number of entries in a completion queue. More...
 

Variables

int LCI_DEFAULT_QUEUE_LENGTH
 Initial number of entries in a default completion queue. More...
 
int LCI_MAX_QUEUE_LENGTH
 Maximum number of entries in a completion queue. More...
 
LCI_comp_t LCI_UR_CQ
 Default completion queue initialized by LCI_initialize. Just for convenience. More...
 

Detailed Description

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.

Function Documentation

◆ LCI_queue_create()

LCI_API LCI_error_t LCI_queue_create ( LCI_device_t  device,
LCI_comp_t cq 
)

Create a completion queue.

Parameters
[in]deviceThe device it should be associated to.
[out]cqThe 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()

LCI_API LCI_error_t LCI_queue_free ( LCI_comp_t cq)

Free a completion queue.

Parameters
[in,out]cqThe 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()

LCI_API LCI_error_t LCI_queue_len ( LCI_comp_t  cq,
size_t *  len 
)

Query the number of entries in a completion queue.

Parameters
[in]cqThe completion queue to query.
[out]lenReturn the number of entries in the queue.
Returns
No available yet. Should always be LCI_ERR_FEATURE_NA.

◆ LCI_queue_pop()

LCI_API LCI_error_t LCI_queue_pop ( LCI_comp_t  cq,
LCI_request_t request 
)

Pop one entry from the completion queue. This call is nonblocking.

Parameters
[in]cqThe completion queue to pop.
[out]requestThe 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()

LCI_API LCI_error_t LCI_queue_pop_multiple ( LCI_comp_t  cq,
size_t  request_count,
LCI_request_t requests,
size_t *  return_count 
)

Pop multiple entry from the completion queue. This call is nonblocking.

Parameters
[in]cqThe completion queue to pop.
[in]request_countThe maximum entries to be popped.
[out]requestAn 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_countThe 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()

LCI_API LCI_error_t LCI_queue_wait ( LCI_comp_t  cq,
LCI_request_t request 
)

Pop one entry from the completion queue. This call will block the calling thread until there is an entry to be popped.

Parameters
[in]cqThe completion queue to pop.
[out]requestThe 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()

LCI_API LCI_error_t LCI_queue_wait_multiple ( LCI_comp_t  cq,
size_t  request_count,
LCI_request_t requests 
)

Pop multiple entry from the completion queue.This call will block the calling thread until request_count entries has been popped.

Parameters
[in]cqThe completion queue to pop.
[in]request_countThe number of entries to be popped.
[out]requestAn 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.

Variable Documentation

◆ 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

int 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

LCI_comp_t LCI_UR_CQ

Default completion queue initialized by LCI_initialize. Just for convenience.