# OnnxRuntime: Ort::MemoryInfo Struct Reference

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

Wrapper around OrtMemoryInfo. More...

`#include <onnxruntime_cxx_api.h>`

Inheritance diagram for Ort::MemoryInfo:

## 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)
ConstMemoryInfo | GetConst () const
Public Member Functions inherited from Ort::detail::MemoryInfoImpl< OrtMemoryInfo >
std::string | GetAllocatorName () const
OrtAllocatorType | GetAllocatorType () const
int | GetDeviceId () const
OrtMemoryInfoDeviceType | GetDeviceType () const
OrtMemType | GetMemoryType () const
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
Base & | operator= (const Base &)=delete
| Base (Base &&v) noexcept
Base & | operator= (Base &&v) noexcept
constexpr | operator contained_type * () const noexcept
contained_type * | release ()
| 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_type * | p_ {}

## Detailed Description

Wrapper around OrtMemoryInfo.

## Constructor & Destructor Documentation

## MemoryInfo() [1/3]

Ort::MemoryInfo::MemoryInfo | ( | std::nullptr_t |  | ) |

inlineexplicit

No instance is created.

## MemoryInfo() [2/3]

Ort::MemoryInfo::MemoryInfo | ( | OrtMemoryInfo * | p | ) |

inlineexplicit

Take ownership of a pointer created by C Api.

## MemoryInfo() [3/3]

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

## Member Function Documentation

## CreateCpu()

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

static

## GetConst()

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

inline