# OnnxRuntime: Ort Namespace Reference

Loading...
Searching...
No Matches
Ort Namespace Reference

All C++ Onnxruntime APIs are defined inside this namespace. More...

## Namespaces

namespace | detail

## Classes

struct | Allocator
| Wrapper around OrtAllocator. More...
struct | AllocatorWithDefaultOptions
| Wrapper around OrtAllocator default instance that is owned by Onnxruntime. More...
struct | ArenaCfg
| it is a structure that represents the configuration of an arena based allocator More...
struct | BFloat16_t
| bfloat16 (Brain Floating Point) data type More...
struct | CustomOpApi
| This entire structure is deprecated, but we not marking it as a whole yet since we want to preserve for the next release. More...
struct | CustomOpBase
struct | CustomOpConfigs
| Class that represents session configuration entries for one or more custom operators. More...
struct | CustomOpDomain
| Custom Op Domain. More...
struct | Env
| The Env (Environment) More...
struct | Exception
| All C++ methods that can fail will throw an exception of this type. More...
struct | Float16_t
| IEEE 754 half-precision floating point data type. More...
struct | Global
struct | IoBinding
| Wrapper around OrtIoBinding. More...
struct | KernelContext
| This class wraps a raw pointer OrtKernelContext* that is being passed to the custom kernel Compute() method. Use it to safely access context attributes, input and output parameters with exception safety guarantees. See usage example in onnxruntime/test/testdata/custom_op_library/custom_op_library.cc. More...
struct | KernelInfo
| This struct owns the OrtKernInfo* pointer when a copy is made. For convenient wrapping of OrtKernelInfo* passed to kernel constructor and query attributes, warp the pointer with Ort::Unowned<KernelInfo> instance so it does not destroy the pointer the kernel does not own. More...
struct | MapTypeInfo
| Wrapper around OrtMapTypeInfo. More...
struct | MemoryAllocation
| Represents native memory allocation coming from one of the OrtAllocators registered with OnnxRuntime. Use it to wrap an allocation made by an allocator so it can be automatically released when no longer needed. More...
struct | MemoryInfo
| Wrapper around OrtMemoryInfo. More...
struct | ModelMetadata
| Wrapper around OrtModelMetadata. More...
struct | Op
| Create and own custom defined operation. More...
struct | OpAttr
| This struct provides life time management for custom op attribute. More...
struct | RunOptions
| RunOptions. More...
struct | SequenceTypeInfo
| Wrapper around OrtSequenceTypeInfo. More...
struct | Session
| Wrapper around OrtSession. More...
struct | SessionOptions
| Wrapper around OrtSessionOptions. More...
struct | Status
| The Status that holds ownership of OrtStatus received from C API Use it to safely destroy OrtStatus* returned from the C API. Use appropriate constructors to construct an instance of a Status object from exceptions. More...
struct | TensorTypeAndShapeInfo
| Wrapper around OrtTensorTypeAndShapeInfo. More...
struct | ThreadingOptions
| The ThreadingOptions. More...
struct | TypeInfo
| Type information that may contain either TensorTypeAndShapeInfo or the information about contained sequence or map depending on the ONNXType. More...
struct | Value
| Wrapper around OrtValue. More...

## Typedefs

using | AllocatedStringPtr = std::unique_ptr< char, detail::AllocatedFree >
| unique_ptr typedef used to own strings allocated by OrtAllocators and release them at the end of the scope. The lifespan of the given allocator must eclipse the lifespan of AllocatedStringPtr instance
using | UnownedSessionOptions = detail::SessionOptionsImpl< detail::Unowned< OrtSessionOptions > >
using | ConstSessionOptions = detail::ConstSessionOptionsImpl< detail::Unowned< const OrtSessionOptions > >
using | ConstSession = detail::ConstSessionImpl< detail::Unowned< const OrtSession > >
using | UnownedSession = detail::SessionImpl< detail::Unowned< OrtSession > >
using | ConstMemoryInfo = detail::MemoryInfoImpl< detail::Unowned< const OrtMemoryInfo > >
using | ConstTensorTypeAndShapeInfo = detail::TensorTypeAndShapeInfoImpl< detail::Unowned< const OrtTensorTypeAndShapeInfo > >
using | ConstSequenceTypeInfo = detail::SequenceTypeInfoImpl< detail::Unowned< const OrtSequenceTypeInfo > >
using | ConstMapTypeInfo = detail::MapTypeInfoImpl< detail::Unowned< const OrtMapTypeInfo > >
using | ConstTypeInfo = detail::TypeInfoImpl< detail::Unowned< const OrtTypeInfo > >
| Contains a constant, unowned OrtTypeInfo that can be copied and passed around by value. Provides access to const OrtTypeInfo APIs.
using | ConstValue = detail::ConstValueImpl< detail::Unowned< const OrtValue > >
using | UnownedValue = detail::ValueImpl< detail::Unowned< OrtValue > >
using | UnownedAllocator = detail::AllocatorImpl< detail::Unowned< OrtAllocator > >
using | ConstIoBinding = detail::ConstIoBindingImpl< detail::Unowned< const OrtIoBinding > >
using | UnownedIoBinding = detail::IoBindingImpl< detail::Unowned< OrtIoBinding > >
using | ConstKernelInfo = detail::KernelInfoImpl< detail::Unowned< const OrtKernelInfo > >

## Functions

const OrtApi & | GetApi ()
| This returns a reference to the OrtApi interface in use.
std::vector< std::string > | GetAvailableProviders ()
| This is a C++ wrapper for OrtApi::GetAvailableProviders() and returns a vector of strings representing the available execution providers.

## Detailed Description

All C++ Onnxruntime APIs are defined inside this namespace.

## Typedef Documentation

## AllocatedStringPtr

using Ort::AllocatedStringPtr = typedef std::unique_ptr<char, detail::AllocatedFree>

unique_ptr typedef used to own strings allocated by OrtAllocators and release them at the end of the scope. The lifespan of the given allocator must eclipse the lifespan of AllocatedStringPtr instance

## ConstIoBinding

using Ort::ConstIoBinding = typedef detail::ConstIoBindingImpl<detail::Unowned<const OrtIoBinding> >

## ConstKernelInfo

using Ort::ConstKernelInfo = typedef detail::KernelInfoImpl<detail::Unowned<const OrtKernelInfo> >

## ConstMapTypeInfo

using Ort::ConstMapTypeInfo = typedef detail::MapTypeInfoImpl<detail::Unowned<const OrtMapTypeInfo> >

## ConstMemoryInfo

using Ort::ConstMemoryInfo = typedef detail::MemoryInfoImpl<detail::Unowned<const OrtMemoryInfo> >

## ConstSequenceTypeInfo

using Ort::ConstSequenceTypeInfo = typedef detail::SequenceTypeInfoImpl<detail::Unowned<const OrtSequenceTypeInfo> >

## ConstSession

using Ort::ConstSession = typedef detail::ConstSessionImpl<detail::Unowned<const OrtSession> >

## ConstSessionOptions

using Ort::ConstSessionOptions = typedef detail::ConstSessionOptionsImpl<detail::Unowned<const OrtSessionOptions> >

## ConstTensorTypeAndShapeInfo

using Ort::ConstTensorTypeAndShapeInfo = typedef detail::TensorTypeAndShapeInfoImpl<detail::Unowned<const OrtTensorTypeAndShapeInfo> >

## ConstTypeInfo

using Ort::ConstTypeInfo = typedef detail::TypeInfoImpl<detail::Unowned<const OrtTypeInfo> >

Contains a constant, unowned OrtTypeInfo that can be copied and passed around by value. Provides access to const OrtTypeInfo APIs.

## ConstValue

using Ort::ConstValue = typedef detail::ConstValueImpl<detail::Unowned<const OrtValue> >

## UnownedAllocator

using Ort::UnownedAllocator = typedef detail::AllocatorImpl<detail::Unowned<OrtAllocator> >

## UnownedIoBinding

using Ort::UnownedIoBinding = typedef detail::IoBindingImpl<detail::Unowned<OrtIoBinding> >

## UnownedSession

using Ort::UnownedSession = typedef detail::SessionImpl<detail::Unowned<OrtSession> >

## UnownedSessionOptions

using Ort::UnownedSessionOptions = typedef detail::SessionOptionsImpl<detail::Unowned<OrtSessionOptions> >

## UnownedValue

using Ort::UnownedValue = typedef detail::ValueImpl<detail::Unowned<OrtValue> >

## Function Documentation

## GetApi()

const OrtApi & Ort::GetApi | ( |  | ) |

inline

This returns a reference to the OrtApi interface in use.

## GetAvailableProviders()

std::vector< std::string > Ort::GetAvailableProviders | ( |  | ) |

This is a C++ wrapper for OrtApi::GetAvailableProviders() and returns a vector of strings representing the available execution providers.

Returns
  vector of strings