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

This class is an abstraction of an Infiniband device. More...

#include <rdmapp/device.h>

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

Public Member Functions

 device (struct ibv_device *target, uint16_t port_num=1)
 Construct a new device object.
 
 device (std::string const &device_name, uint16_t port_num=1)
 Construct a new device object.
 
 device (uint16_t device_num=0, uint16_t port_num=1)
 Construct a new device object.
 
uint16_t port_num () const
 Get the device port number.
 
uint16_t lid () const
 Get the lid of the device.
 
union ibv_gid gid () const
 Get the gid of the device.
 
bool is_fetch_and_add_supported () const
 Checks if the device supports fetch and add.
 
bool is_compare_and_swap_supported () const
 Checks if the device supports compare and swap.
 
int gid_index () const
 
- Public Member Functions inherited from rdmapp::noncopyable
 noncopyable (noncopyable &&)=default
 
 noncopyable (noncopyable const &)=delete
 
noncopyableoperator= (noncopyable const &)=delete
 
noncopyableoperator= (noncopyable &&)=default
 

Static Public Member Functions

static std::string gid_hex_string (union ibv_gid const &gid)
 

Friends

class pd
 
class cq
 
class qp
 
class srq
 

Detailed Description

This class is an abstraction of an Infiniband device.

Constructor & Destructor Documentation

◆ device() [1/3]

rdmapp::device::device ( struct ibv_device *  target,
uint16_t  port_num = 1 
)

Construct a new device object.

Parameters
targetThe target device.
port_numThe port number of the target device.

◆ device() [2/3]

rdmapp::device::device ( std::string const &  device_name,
uint16_t  port_num = 1 
)

Construct a new device object.

Parameters
device_nameThe name of the target device.
port_numThe port number of the target device.

◆ device() [3/3]

rdmapp::device::device ( uint16_t  device_num = 0,
uint16_t  port_num = 1 
)

Construct a new device object.

Parameters
device_numThe index of the target device.
port_numThe port number of the target device.

Member Function Documentation

◆ gid()

union ibv_gid rdmapp::device::gid ( ) const

Get the gid of the device.

Returns
union ibv_gid The gid.

◆ is_compare_and_swap_supported()

bool rdmapp::device::is_compare_and_swap_supported ( ) const

Checks if the device supports compare and swap.

Returns
true Supported.
false Not supported.

◆ is_fetch_and_add_supported()

bool rdmapp::device::is_fetch_and_add_supported ( ) const

Checks if the device supports fetch and add.

Returns
true Supported.
false Not supported.

◆ lid()

uint16_t rdmapp::device::lid ( ) const

Get the lid of the device.

Returns
uint16_t The lid.

◆ port_num()

uint16_t rdmapp::device::port_num ( ) const

Get the device port number.

Returns
uint16_t The port number.

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