NVIDIA IndeX API nvidia_logo_transpbg.gif Up
imemory_manager.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright 2023 NVIDIA Corporation. All rights reserved.
3 *****************************************************************************/
6
7#ifndef NVIDIA_INDEX_IMEMORY_MANAGER_H
8#define NVIDIA_INDEX_IMEMORY_MANAGER_H
9
10#include <mi/dice.h>
11#include <mi/base/interface_declare.h>
12
13namespace nv {
14namespace index {
15
19 public mi::base::Interface_declare<0xa1defe77,0xb3ef,0x4652,0x9c,0x49,0x97,0x5f,0xe3,0x7a,0xb3,0xe0>
20{
21public:
28 virtual char* get(mi::Size offset = 0) const = 0;
29};
30
34 public mi::base::Interface_declare<0x636c6df4,0x2aaf,0x4144,0x8f,0x92,0xb4,0x22,0x00,0xa6,0x8a,0xcd>
35{
36public:
48 mi::Size elements,
49 mi::Size type_size) const = 0;
50
59 template<typename T>
61 {
62 const mi::Size type_size = sizeof(T);
63 return request_linear_device_memory(elements, type_size);
64 }
65};
66
70 public mi::base::Interface_declare<0xe0a59103,0x275c,0x43e1,0xa5,0x6d,0xda,0xc2,0x8f,0xb4,0x42,0x55>
71{
72public:
78};
79
80} // namespace index
81} // namespace nv
82
83#endif // NVIDIA_INDEX_IMEMORY_MANAGER_H
Interface class encapsulating and exposing CUDA device memory.
Definition: imemory_manager.h:20
virtual char * get(mi::Size offset=0) const =0
Exposes the actual pointer to a internally managed CUDA device memory area.
Interface class for allocating NVIDIA IndeX library-side buffers for use also on the application-side...
Definition: imemory_manager.h:35
virtual ICuda_memory_buffer * request_linear_device_memory(mi::Size elements, mi::Size type_size) const =0
Requesting and allocating a linear memory on a CUDA device.
ICuda_memory_buffer * request_linear_device_memory(mi::Size elements) const
Convenience function for requesting and allocating a linear memory on a CUDA device.
Definition: imemory_manager.h:60
Interface class for allocating NVIDIA IndeX library-side buffers for use also on the application-side...
Definition: imemory_manager.h:71
virtual ICuda_memory_manager * get_cuda_memory_manager() const =0
Requesting a CUDA device memory manager enables allocation of NVIDIA IndeX-managed CUDA device memory...
Common namespace for all NVIDIA APIs.
Definition: iindex.h:349