HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OrtAllocator Struct Reference

Memory allocation interface. More...

#include <onnxruntime_c_api.h>

Public Member Functions

void *ORT_API_CALLAlloc (struct OrtAllocator *this_, size_t size)
 Returns a pointer to an allocated block of size bytes. More...
 
 void (ORT_API_CALL *Free)(struct OrtAllocator *this_
 
const struct OrtMemoryInfo
*ORT_API_CALL
Info (const struct OrtAllocator *this_)
 Return a pointer to an OrtMemoryInfo that describes this allocator. More...
 

Public Attributes

uint32_t version
 Must be initialized to ORT_API_VERSION. More...
 
voidp
 Free a block of memory previously allocated with OrtAllocator::Alloc. More...
 

Detailed Description

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.

Definition at line 286 of file onnxruntime_c_api.h.

Member Function Documentation

void* ORT_API_CALL* OrtAllocator::Alloc ( struct OrtAllocator this_,
size_t  size 
)

Returns a pointer to an allocated block of size bytes.

const struct OrtMemoryInfo* ORT_API_CALL* OrtAllocator::Info ( const struct OrtAllocator this_)

Return a pointer to an OrtMemoryInfo that describes this allocator.

OrtAllocator::void ( ORT_API_CALL Free)

Member Data Documentation

void* OrtAllocator::p

Free a block of memory previously allocated with OrtAllocator::Alloc.

Definition at line 289 of file onnxruntime_c_api.h.

uint32_t OrtAllocator::version

Must be initialized to ORT_API_VERSION.

Definition at line 287 of file onnxruntime_c_api.h.


The documentation for this struct was generated from the following file: