ONNX Runtime
Loading...
Searching...
No Matches
Ort::MemoryInfo Struct Reference

Wrapper around OrtMemoryInfo. More...

#include <onnxruntime_cxx_api.h>

Inheritance diagram for Ort::MemoryInfo:
Ort::detail::MemoryInfoImpl< OrtMemoryInfo > Ort::detail::Base< T >

Public Member Functions

 MemoryInfo (std::nullptr_t)
 No instance is created.
 
 MemoryInfo (OrtMemoryInfo *p)
 Take ownership of a pointer created by C API.
 
 MemoryInfo (const char *name, OrtAllocatorType type, int id, OrtMemType mem_type)
 
 MemoryInfo (const char *name, OrtMemoryInfoDeviceType device_type, uint32_t vendor_id, uint32_t device_id, OrtDeviceMemoryType mem_type, size_t alignment, OrtAllocatorType allocator_type)
 Wrapper around CreateMemoryInfo_V2.
 
ConstMemoryInfo GetConst () const
 
- Public Member Functions inherited from Ort::detail::MemoryInfoImpl< OrtMemoryInfo >
std::string GetAllocatorName () const
 Wrapper MemoryInfoGetName.
 
OrtAllocatorType GetAllocatorType () const
 Wrapper MemoryInfoGetType.
 
int GetDeviceId () const
 Wrapper MemoryInfoGetId.
 
OrtMemoryInfoDeviceType GetDeviceType () const
 Wrapper MemoryInfoGetDeviceType.
 
OrtMemType GetMemoryType () const
 Wrapper MemoryInfoGetMemType.
 
OrtDeviceMemoryType GetDeviceMemoryType () const
 Wrapper MemoryInfoGetDeviceMemType.
 
uint32_t GetVendorId () const
 Wrapper MemoryInfoGetVendorId.
 
bool operator== (const MemoryInfoImpl< U > &o) const
 
- Public Member Functions inherited from Ort::detail::Base< T >
constexpr Base ()=default
 
constexpr Base (contained_type *p) noexcept
 
 ~Base ()
 
 Base (const Base &)=delete
 
Baseoperator= (const Base &)=delete
 
 Base (Base &&v) noexcept
 
Baseoperator= (Base &&v) noexcept
 
constexpr operator contained_type * () const noexcept
 
constexpr contained_typeoperator* () const noexcept
 
contained_typerelease ()
 Relinquishes ownership of the contained C object pointer The underlying object is not destroyed.
 

Static Public Member Functions

static MemoryInfo CreateCpu (OrtAllocatorType type, OrtMemType mem_type1)
 

Additional Inherited Members

- Public Types inherited from Ort::detail::MemoryInfoImpl< OrtMemoryInfo >
using B = Base< OrtMemoryInfo >
 
- Public Types inherited from Ort::detail::Base< T >
using contained_type = T
 
- Protected Attributes inherited from Ort::detail::Base< T >
contained_typep_ {}
 

Detailed Description

Wrapper around OrtMemoryInfo.

Constructor & Destructor Documentation

◆ MemoryInfo() [1/4]

Ort::MemoryInfo::MemoryInfo ( std::nullptr_t  )
inlineexplicit

No instance is created.

◆ MemoryInfo() [2/4]

Ort::MemoryInfo::MemoryInfo ( OrtMemoryInfo p)
inlineexplicit

Take ownership of a pointer created by C API.

◆ MemoryInfo() [3/4]

Ort::MemoryInfo::MemoryInfo ( const char *  name,
OrtAllocatorType  type,
int  id,
OrtMemType  mem_type 
)

◆ MemoryInfo() [4/4]

Ort::MemoryInfo::MemoryInfo ( const char *  name,
OrtMemoryInfoDeviceType  device_type,
uint32_t  vendor_id,
uint32_t  device_id,
OrtDeviceMemoryType  mem_type,
size_t  alignment,
OrtAllocatorType  allocator_type 
)

Wrapper around CreateMemoryInfo_V2.

Member Function Documentation

◆ CreateCpu()

static MemoryInfo Ort::MemoryInfo::CreateCpu ( OrtAllocatorType  type,
OrtMemType  mem_type1 
)
static

◆ GetConst()

ConstMemoryInfo Ort::MemoryInfo::GetConst ( ) const
inline