OnnxRuntime
Ort::Allocator Struct Reference

#include <onnxruntime_cxx_api.h>

Inherits Ort::Base< OrtAllocator >.

Public Member Functions

 Allocator (const Session &session, const MemoryInfo &)
 
void * Alloc (size_t size) const
 
MemoryAllocation GetAllocation (size_t size)
 
void Free (void *p) const
 
Unowned< const MemoryInfoGetInfo () const
 
- Public Member Functions inherited from Ort::Base< OrtAllocator >
 Base ()=default
 
 Base (OrtAllocator *p)
 
 ~Base ()
 
 operator OrtAllocator * ()
 
 operator const OrtAllocator * () const
 
OrtAllocatorrelease ()
 Releases ownership of the contained pointer. More...
 

Additional Inherited Members

- Public Types inherited from Ort::Base< OrtAllocator >
using contained_type = OrtAllocator
 
- Protected Member Functions inherited from Ort::Base< OrtAllocator >
 Base (const Base &)=delete
 
 Base (Base &&v) noexcept
 
Baseoperator= (const Base &)=delete
 
void operator= (Base &&v) noexcept
 
- Protected Attributes inherited from Ort::Base< OrtAllocator >
OrtAllocatorp_
 

Constructor & Destructor Documentation

◆ Allocator()

Ort::Allocator::Allocator ( const Session session,
const MemoryInfo  
)

Member Function Documentation

◆ Alloc()

void * Ort::Allocator::Alloc ( size_t  size) const

◆ Free()

void Ort::Allocator::Free ( void *  p) const

◆ GetAllocation()

MemoryAllocation Ort::Allocator::GetAllocation ( size_t  size)

◆ GetInfo()

Unowned< const MemoryInfo > Ort::Allocator::GetInfo ( ) const