DiCE API nvidia_logo_transpbg.gif Up
mi::neuraylib::IRDMA_context Class Referenceabstract

The RDMA context works as a cache for RDMA buffers. More...

#include <irdma_context.h>

Inheritance diagram for mi::neuraylib::IRDMA_context:

Public Member Functions

virtual IRDMA_bufferget_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_bufferget_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_bufferwrap_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 IInterfaceget_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 IInterfaceget_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...
 

Detailed Description

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.

Member Function Documentation

 flush()

virtual Sint32 mi::neuraylib::IRDMA_context::flush ( IRDMA_buffer buffer)
pure virtual

Send an RDMA buffer to the remote host associated with this RDMA context.

Parameters
bufferThe RDMA buffer to be sent.
Returns

 get_read_memory()

virtual IRDMA_buffer * mi::neuraylib::IRDMA_context::get_read_memory ( Size  size,
Sint32  gpu_id = -1 
)
pure virtual

Allocates an RDMA buffer which can be used to read locally from a buffer that was written on a remote host.

Parameters
sizeThe 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.
Returns
The RDMA buffer or NULL in case of an allocation failure.

 get_write_memory()

virtual IRDMA_buffer * mi::neuraylib::IRDMA_context::get_write_memory ( Size  size,
Sint32  gpu_id = -1 
)
pure virtual

Allocates an RDMA buffer which can be used to write locally to and to read from on a remote host.

Parameters
sizeThe 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.
Returns
The RDMA buffer or 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.

 wrap_user_buffer()

virtual IRDMA_buffer * mi::neuraylib::IRDMA_context::wrap_user_buffer ( Uint8 data,
Size  size,
Sint32  gpu_id = -1 
)
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.

Parameters
dataThe data buffer provided by the user.
sizeThe buffer's size.
gpu_id-1 for main memory, or the ID of the GPU on which the user's buffer is allocated.
Returns
The RDMA buffer or NULL in case of failure.