RDMA++
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
rdmapp::cq Class Reference

This class is an abstraction of a Completion Queue. More...

#include <rdmapp/cq.h>

Inheritance diagram for rdmapp::cq:
Inheritance graph
[legend]
Collaboration diagram for rdmapp::cq:
Collaboration graph
[legend]

Public Member Functions

 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)
 
- Public Member Functions inherited from rdmapp::noncopyable
 noncopyable (noncopyable &&)=default
 
 noncopyable (noncopyable const &)=delete
 
noncopyableoperator= (noncopyable const &)=delete
 
noncopyableoperator= (noncopyable &&)=default
 

Friends

class qp
 

Detailed Description

This class is an abstraction of a Completion Queue.

Constructor & Destructor Documentation

◆ cq()

rdmapp::cq::cq ( std::shared_ptr< device device,
size_t  num_cqe = 128 
)

Construct a new cq object.

Parameters
deviceThe device to use.
num_cqeThe number of completion entries to allocate.

Member Function Documentation

◆ poll() [1/2]

size_t rdmapp::cq::poll ( std::vector< struct ibv_wc > &  wc_vec)

Poll the completion queue.

Parameters
wc_vecIf 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_exceptionError occured while polling the completion queue.

◆ poll() [2/2]

bool rdmapp::cq::poll ( struct ibv_wc &  wc)

Poll the completion queue.

Parameters
wcIf 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_exceptionError occured while polling the completion queue.

The documentation for this class was generated from the following files: