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

Type information that may contain either TensorTypeAndShapeInfo or the information about contained sequence or map depending on the ONNXType. More...

#include <onnxruntime_cxx_api.h>

Inheritance diagram for Ort::TypeInfo:
Ort::detail::TypeInfoImpl< OrtTypeInfo > Ort::detail::Base< T >

Public Types

using Base = detail::TypeInfoImpl< OrtTypeInfo >
 
- Public Types inherited from Ort::detail::TypeInfoImpl< OrtTypeInfo >
using B = Base< OrtTypeInfo >
 
- Public Types inherited from Ort::detail::Base< T >
using contained_type = T
 

Public Member Functions

 TypeInfo (std::nullptr_t)
 Create an empty TypeInfo object, must be assigned a valid one to be used.
 
 TypeInfo (OrtTypeInfo *p)
 C API Interop.
 
ConstTypeInfo GetConst () const
 
- Public Member Functions inherited from Ort::detail::TypeInfoImpl< OrtTypeInfo >
ConstTensorTypeAndShapeInfo GetTensorTypeAndShapeInfo () const
 Wraps OrtApi::CastTypeInfoToTensorInfo.
 
ConstSequenceTypeInfo GetSequenceTypeInfo () const
 Wraps OrtApi::CastTypeInfoToSequenceTypeInfo.
 
ConstMapTypeInfo GetMapTypeInfo () const
 Wraps OrtApi::CastTypeInfoToMapTypeInfo.
 
ConstOptionalTypeInfo GetOptionalTypeInfo () const
 wraps OrtApi::CastTypeInfoToOptionalTypeInfo
 
ONNXType GetONNXType () 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
 
contained_typerelease ()
 Relinquishes ownership of the contained C object pointer The underlying object is not destroyed.
 

Static Public Member Functions

static TypeInfo CreateTensorInfo (ConstTensorTypeAndShapeInfo tensor_info)
 
static TypeInfo CreateSparseTensorInfo (ConstTensorTypeAndShapeInfo sparse_tensor_info)
 
static TypeInfo CreateSequenceTypeInfo (ConstTypeInfo sequence_type)
 
static TypeInfo CreateMapTypeInfo (ONNXTensorElementDataType key_type, ConstTypeInfo value_type)
 
static TypeInfo CreateOptionalTypeInfo (ConstTypeInfo contained_type)
 

Additional Inherited Members

- Protected Attributes inherited from Ort::detail::Base< T >
contained_typep_ {}
 

Detailed Description

Type information that may contain either TensorTypeAndShapeInfo or the information about contained sequence or map depending on the ONNXType.

Member Typedef Documentation

◆ Base

Constructor & Destructor Documentation

◆ TypeInfo() [1/2]

Ort::TypeInfo::TypeInfo ( std::nullptr_t  )
inlineexplicit

Create an empty TypeInfo object, must be assigned a valid one to be used.

◆ TypeInfo() [2/2]

Ort::TypeInfo::TypeInfo ( OrtTypeInfo p)
inlineexplicit

C API Interop.

Member Function Documentation

◆ CreateMapTypeInfo()

static TypeInfo Ort::TypeInfo::CreateMapTypeInfo ( ONNXTensorElementDataType  key_type,
ConstTypeInfo  value_type 
)
static

◆ CreateOptionalTypeInfo()

static TypeInfo Ort::TypeInfo::CreateOptionalTypeInfo ( ConstTypeInfo  contained_type)
static

◆ CreateSequenceTypeInfo()

static TypeInfo Ort::TypeInfo::CreateSequenceTypeInfo ( ConstTypeInfo  sequence_type)
static

◆ CreateSparseTensorInfo()

static TypeInfo Ort::TypeInfo::CreateSparseTensorInfo ( ConstTensorTypeAndShapeInfo  sparse_tensor_info)
static

◆ CreateTensorInfo()

static TypeInfo Ort::TypeInfo::CreateTensorInfo ( ConstTensorTypeAndShapeInfo  tensor_info)
static

◆ GetConst()

ConstTypeInfo Ort::TypeInfo::GetConst ( ) const
inline