The RDMA context works as a cache for RDMA buffers. More...
#include <irdma_context.h>
Public Member Functions | |
virtual IRDMA_buffer * | get_write_memory (Size size, Sint32 gpu_id=-1)=0 |
Allocates an RDMA buffer which can be used to write locally to and to read from on a remote host. More... | |
virtual IRDMA_buffer * | get_read_memory (Size size, Sint32 gpu_id=-1)=0 |
Allocates an RDMA buffer which can be used to read locally from a buffer that was written on a remote host. More... | |
virtual IRDMA_buffer * | wrap_user_buffer (Uint8 *data, Size size, Sint32 gpu_id=-1)=0 |
Creates an RDMA buffer that is a wrapper for a buffer provided by users. More... | |
virtual Sint32 | flush (IRDMA_buffer *buffer)=0 |
Send an RDMA buffer to the remote host associated with this RDMA context. More... | |
Public Member Functions inherited from mi::base::IInterface | |
virtual Uint32 | retain () const =0 |
Increments the reference count. More... | |
virtual Uint32 | release () const =0 |
Decrements the reference count. More... | |
virtual const IInterface * | get_interface (const Uuid &interface_id) const =0 |
Acquires a const interface from another. More... | |
template<class T> | |
const T * | get_interface () const |
Acquires a const interface from another. More... | |
virtual IInterface * | get_interface (const Uuid &interface_id)=0 |
Acquires a mutable interface from another. More... | |
template<class T> | |
T * | get_interface () |
Acquires a mutable interface from another. More... | |
virtual Uuid | get_iid () const =0 |
Returns the interface ID of the most derived interface. More... | |
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0x5f3980e9, ... > | |
typedef Interface_declare< id1, ... > | Self |
Own type. More... | |
typedef Uuid_t< id1, ... > | IID |
Declares the interface ID (IID) of this interface. More... | |
Public Types inherited from mi::base::IInterface | |
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> | IID |
Declares the interface ID (IID) of this interface. More... | |
Static Public Member Functions inherited from mi::base::Interface_declare< 0x5f3980e9, ... > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
Static Public Member Functions inherited from mi::base::IInterface | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface. More... | |
The RDMA context works as a cache for RDMA buffers.
The allocation of those buffers is relatively costly, especially for larger buffers. Therefore, it is better to not allocate them for every message.
|
pure virtual |
Send an RDMA buffer to the remote host associated with this RDMA context.
buffer | The RDMA buffer to be sent. |
NULL
).
|
pure virtual |
Allocates an RDMA buffer which can be used to read locally from a buffer that was written on a remote host.
size | The size of the RDMA buffer. |
gpu_id | -1 for main memory, or the ID of the GPU on which the RDMA buffer should be allocated. |
NULL
in case of an allocation failure.
|
pure virtual |
Allocates an RDMA buffer which can be used to write locally to and to read from on a remote host.
size | The size of the RDMA buffer. |
gpu_id | -1 for main memory, or the ID of the GPU on which the RDMA buffer should be allocated. |
NULL
in case of an allocation failure. The method also returns NULL
if called from mi::neuraylib::IFragmented_job::execute_fragment_remote_rdma() and size
exceeds the size of the RDMA buffer on the receiver side.
|
pure virtual |
Creates an RDMA buffer that is a wrapper for a buffer provided by users.
Currently, this function should only be called inside mi::neuraylib::IFragmented_job::get_rdma_result_buffer() to create an RDMA buffer for receiving results from a fragmented job.
data | The data buffer provided by the user. |
size | The buffer's size. |
gpu_id | -1 for main memory, or the ID of the GPU on which the user's buffer is allocated. |
NULL
in case of failure.