OnnxRuntime
|
Memory allocation interface. More...
#include <onnxruntime_c_api.h>
Public Attributes | |
uint32_t | version |
Must be initialized to ORT_API_VERSION. More... | |
void *(* | Alloc )(struct OrtAllocator *this_, size_t size) |
Returns a pointer to an allocated block of size bytes. More... | |
void(* | Free )(struct OrtAllocator *this_, void *p) |
Free a block of memory previously allocated with OrtAllocator::Alloc. More... | |
const struct OrtMemoryInfo *(* | Info )(const struct OrtAllocator *this_) |
Return a pointer to an OrtMemoryInfo that describes this allocator. More... | |
Memory allocation interface.
Structure of function pointers that defines a memory allocator. This can be created and filled in by the user for custom allocators.
When an allocator is passed to any function, be sure that the allocator object is not destroyed until the last allocated object using it is freed.
void *( * OrtAllocator::Alloc) (struct OrtAllocator *this_, size_t size) |
Returns a pointer to an allocated block of size
bytes.
void( * OrtAllocator::Free) (struct OrtAllocator *this_, void *p) |
Free a block of memory previously allocated with OrtAllocator::Alloc.
const struct OrtMemoryInfo *( * OrtAllocator::Info) (const struct OrtAllocator *this_) |
Return a pointer to an OrtMemoryInfo that describes this allocator.
uint32_t OrtAllocator::version |
Must be initialized to ORT_API_VERSION.