This class is an abstraction of a Completion Queue.
More...
#include <rdmapp/cq.h>
|
| cq (std::shared_ptr< device > device, size_t num_cqe=128) |
| Construct a new cq object.
|
|
bool | poll (struct ibv_wc &wc) |
| Poll the completion queue.
|
|
size_t | poll (std::vector< struct ibv_wc > &wc_vec) |
| Poll the completion queue.
|
|
template<class It > |
size_t | poll (It wc, int count) |
|
template<int N> |
size_t | poll (std::array< struct ibv_wc, N > &wc_array) |
|
| noncopyable (noncopyable &&)=default |
|
| noncopyable (noncopyable const &)=delete |
|
noncopyable & | operator= (noncopyable const &)=delete |
|
noncopyable & | operator= (noncopyable &&)=default |
|
This class is an abstraction of a Completion Queue.
◆ cq()
rdmapp::cq::cq |
( |
std::shared_ptr< device > |
device, |
|
|
size_t |
num_cqe = 128 |
|
) |
| |
Construct a new cq object.
- Parameters
-
device | The device to use. |
num_cqe | The number of completion entries to allocate. |
◆ poll() [1/2]
size_t rdmapp::cq::poll |
( |
std::vector< struct ibv_wc > & |
wc_vec | ) |
|
Poll the completion queue.
- Parameters
-
wc_vec | If any, this will be filled with completion entries up to the size of the vector. |
- Returns
- size_t The number of completion entries. 0 means no completion entry.
- Exceptions
-
std::runtime_exception | Error occured while polling the completion queue. |
◆ poll() [2/2]
bool rdmapp::cq::poll |
( |
struct ibv_wc & |
wc | ) |
|
Poll the completion queue.
- Parameters
-
wc | If any, this will be filled with a completion entry. |
- Returns
- true If there is a completion entry.
-
false If there is no completion entry.
- Exceptions
-
std::runtime_exception | Error occured while polling the completion queue. |
The documentation for this class was generated from the following files:
- include/rdmapp/cq.h
- src/cq.cc