7#ifndef NVIDIA_INDEX_IMEMORY_ALLOCATOR_H
8#define NVIDIA_INDEX_IMEMORY_ALLOCATOR_H
11#include <mi/base/interface_declare.h>
15struct cudaChannelFormatDesc;
21class ICuda_memory_allocator;
23class IMemory_allocator_configuration :
24 public mi::base::Interface_declare<0x35cb18dd,0x6523,0x4362,0x92,0xb2,0xda,0xc4,0xb,0x3a,0x91,0xfd>
33 virtual mi::Sint32 set_memory_allocator(
34 ICuda_memory_allocator* alloc) = 0;
40 virtual ICuda_memory_allocator* get_memory_allocator()
const = 0;
49 public mi::base::Interface_declare<0xea832c47,0x6dfa,0x41ba,0xb3,0x1c,0xa3,0xcf,0x4e,0x35,0x53,0x91>
55 const void* user_data;
66 const void* user_data;
72 virtual Buffer_data device_alloc(
74 mi::Size data_size) = 0;
75 virtual Buffer_data device_alloc_pitched(
77 mi::Uint32 size_x_in_bytes,
78 mi::Uint32 size_y) = 0;
80 virtual Array_data device_alloc_array(
82 const mi::math::Vector_struct<mi::Uint32, 3>& arr_dim,
83 const cudaChannelFormatDesc* arr_chdesc,
84 mi::Uint32 arr_flags) = 0;
86 virtual void device_free(
87 Buffer_data& buffer_data) = 0;
88 virtual void device_free(
89 Array_data& array_data) = 0;
Interface class allowing applications to implement a custom CUDA-memory allocation mechanism.
Definition: imemory_allocator.h:50
Common namespace for all NVIDIA APIs.
Definition: iindex.h:349