DiCE API nvidia_logo_transpbg.gif Up
irdma_context.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2023 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IRDMA_CONTEXT_H
8#define MI_NEURAYLIB_IRDMA_CONTEXT_H
9
11
12namespace mi {
13
14namespace neuraylib {
15
50class IRDMA_buffer : public
51 mi::base::Interface_declare<0x9b7b00e6,0x9539,0x4a07,0x88,0x1a,0x9d,0xdd,0x91,0x5c,0x6d,0xfe>
52{
53public:
57 virtual Uint64 get_id() const = 0;
58
62 virtual Sint32 get_gpu_id() const = 0;
63
65 virtual const Uint8* get_data() const = 0;
66
68 virtual Uint8* get_data() = 0;
69
71 virtual Size get_size() const = 0;
72
90 virtual const IRDMA_buffer* duplicate( Size offset, Size size) const = 0;
91
109 virtual IRDMA_buffer* duplicate( Size offset, Size size) = 0;
110
112 virtual bool is_gpudirect() = 0;
113};
114
119class IRDMA_context : public
120 mi::base::Interface_declare<0x5f3980e9,0xfadc,0x478d,0xbb,0x18,0x44,0x10,0xa4,0x6f,0xf7,0xb5>
121{
122public:
134 virtual IRDMA_buffer* get_write_memory( Size size, Sint32 gpu_id = -1) = 0;
135
143 virtual IRDMA_buffer* get_read_memory( Size size, Sint32 gpu_id = -1) = 0;
144
157 Uint8* data, Size size, Sint32 gpu_id = -1) = 0;
158
167 virtual Sint32 flush( IRDMA_buffer* buffer) = 0;
168};
169 // end group mi_neuray_dice
171
172} // namespace neuraylib
173
174} // namespace mi
175
176#endif // MI_NEURAYLIB_IRDMA_CONTEXT_H
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
An RDMA buffer represents a piece of pinned memory which can be used to transfer data over RDMA.
Definition: irdma_context.h:52
virtual const Uint8 * get_data() const =0
Returns a const pointer to the data in this buffer.
virtual Uint8 * get_data()=0
Returns a mutable pointer to the data in this buffer.
virtual Uint64 get_id() const =0
Returns the ID of this buffer.
virtual Sint32 get_gpu_id() const =0
Indicates whether the RDMA buffer is in main memory or on a GPU.
virtual bool is_gpudirect()=0
Returns true if this is a GPU puffer and GPUDirect registration was successful.
virtual const IRDMA_buffer * duplicate(Size offset, Size size) const =0
Duplicates an RDMA buffer (const).
virtual Size get_size() const =0
Returns the size of the data in this buffer buffer.
virtual IRDMA_buffer * duplicate(Size offset, Size size)=0
Duplicates an RDMA buffer (mutable).
The RDMA context works as a cache for RDMA buffers.
Definition: irdma_context.h:121
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.
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...
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.
virtual Sint32 flush(IRDMA_buffer *buffer)=0
Send an RDMA buffer to the remote host associated with this RDMA context.
unsigned long long Uint64
64-bit unsigned integer.
Definition: types.h:62
unsigned char Uint8
8-bit unsigned integer.
Definition: types.h:47
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: dice.h:89