HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
onnxruntime::NonTensorTypeBase Class Referenceabstract

Base type for all non-tensors, maps, sequences and opaques. More...

#include <data_types.h>

+ Inheritance diagram for onnxruntime::NonTensorTypeBase:

Public Member Functions

DeleteFunc GetDeleteFunc () const override=0
 
virtual CreateFunc GetCreateFunc () const =0
 
const ONNX_NAMESPACE::TypeProto * GetTypeProto () const override
 Retrieves an instance of TypeProto for a given MLDataType. More...
 
virtual void FromDataContainer (const void *data, size_t data_size, OrtValue &output) const
 
virtual void ToDataContainer (const OrtValue &input, size_t data_size, void *data) const
 
 NonTensorTypeBase (const NonTensorTypeBase &)=delete
 
NonTensorTypeBase & operator= (const NonTensorTypeBase &)=delete
 
- Public Member Functions inherited from onnxruntime::DataTypeImpl
virtual ~DataTypeImpl ()=default
 
virtual bool IsCompatible (const ONNX_NAMESPACE::TypeProto &type_proto) const =0
 this API will be used to check type compatibility at runtime More...
 
size_t Size () const
 
bool IsTensorType () const
 
bool IsTensorSequenceType () const
 
bool IsSparseTensorType () const
 
bool IsOptionalType () const
 
bool IsNonTensorType () const
 
bool IsPrimitiveDataType () const
 
const TensorTypeBase * AsTensorType () const
 
const SequenceTensorTypeBase * AsSequenceTensorType () const
 
const SparseTensorTypeBase * AsSparseTensorType () const
 
const OptionalTypeBase * AsOptionalType () const
 
const NonTensorTypeBase * AsNonTensorType () const
 
const PrimitiveDataTypeBase * AsPrimitiveDataType () const
 

Protected Member Functions

 NonTensorTypeBase (size_t size)
 
 ~NonTensorTypeBase () override
 
ONNX_NAMESPACE::TypeProto & MutableTypeProto ()
 
bool IsMapCompatible (const ONNX_NAMESPACE::TypeProto &type_proto) const
 
bool IsSequenceCompatible (const ONNX_NAMESPACE::TypeProto &type_proto) const
 
bool IsOpaqueCompatible (const ONNX_NAMESPACE::TypeProto &type_proto) const
 
- Protected Member Functions inherited from onnxruntime::DataTypeImpl
 DataTypeImpl (GeneralType type, size_t size)
 

Additional Inherited Members

- Public Types inherited from onnxruntime::DataTypeImpl
enum  GeneralType {
  GeneralType::kInvalid = 0, GeneralType::kNonTensor = 1, GeneralType::kTensor = 2, GeneralType::kTensorSequence = 3,
  GeneralType::kSparseTensor = 4, GeneralType::kOptional = 5, GeneralType::kPrimitive = 6
}
 
- Static Public Member Functions inherited from onnxruntime::DataTypeImpl
template<typename T >
static MLDataType GetType ()
 
template<typename elemT >
static MLDataType GetTensorType ()
 
template<typename elemT >
static MLDataType GetSequenceTensorType ()
 
template<typename elemT >
static MLDataType GetSparseTensorType ()
 
template<typename T , typename elemT >
static MLDataType GetOptionalType ()
 
static MLDataType TypeFromProto (const ONNX_NAMESPACE::TypeProto &proto)
 
static const TensorTypeBase * TensorTypeFromONNXEnum (int type)
 
static const
SequenceTensorTypeBase * 
SequenceTensorTypeFromONNXEnum (int type)
 
static const SparseTensorTypeBase * SparseTensorTypeFromONNXEnum (int type)
 
static const char * ToString (MLDataType type)
 
static std::vector< std::string > ToString (const std::vector< MLDataType > &types)
 
static void RegisterDataType (MLDataType)
 
static MLDataType GetDataType (const std::string &)
 
static const std::vector
< MLDataType > & 
AllTensorTypes ()
 
static const std::vector
< MLDataType > & 
AllTensorTypesIRv4 ()
 
static const std::vector
< MLDataType > & 
AllTensorTypesIRv9 ()
 
static const std::vector
< MLDataType > & 
AllFixedSizeTensorTypes ()
 
static const std::vector
< MLDataType > & 
AllFixedSizeTensorTypesIRv4 ()
 
static const std::vector
< MLDataType > & 
AllFixedSizeTensorTypesIRv9 ()
 
static const std::vector
< MLDataType > & 
AllSequenceTensorTypes ()
 
static const std::vector
< MLDataType > & 
AllSequenceTensorTypesIRv4 ()
 
static const std::vector
< MLDataType > & 
AllSequenceTensorTypesIRv9 ()
 
static const std::vector
< MLDataType > & 
AllFixedSizeSequenceTensorTypes ()
 
static const std::vector
< MLDataType > & 
AllFixedSizeSequenceTensorTypesIRv4 ()
 
static const std::vector
< MLDataType > & 
AllFixedSizeSequenceTensorTypesIRv9 ()
 
static const std::vector
< MLDataType > & 
AllNumericTensorTypes ()
 
static const std::vector
< MLDataType > & 
AllNumericTensorTypesIRv4 ()
 
static const std::vector
< MLDataType > & 
AllNumericTensorTypesIRv9 ()
 
static const std::vector
< MLDataType > & 
AllIEEEFloatTensorTypes ()
 
static const std::vector
< MLDataType > & 
AllTensorAndSequenceTensorTypes ()
 
static const std::vector
< MLDataType > & 
AllTensorAndSequenceTensorTypesIRv4 ()
 
static const std::vector
< MLDataType > & 
AllTensorAndSequenceTensorTypesIRv9 ()
 
static const std::vector
< MLDataType > & 
AllOptionalAndTensorAndSequenceTensorTypes ()
 
static const std::vector
< MLDataType > & 
AllOptionalAndTensorAndSequenceTensorTypesIRv4 ()
 
static const std::vector
< MLDataType > & 
AllOptionalAndTensorAndSequenceTensorTypesIRv9 ()
 
static const std::vector
< MLDataType > & 
AllFixedSizeTensorAndSequenceTensorTypes ()
 
static const std::vector
< MLDataType > & 
AllFixedSizeTensorAndSequenceTensorTypesIRv4 ()
 
static const std::vector
< MLDataType > & 
AllFixedSizeTensorAndSequenceTensorTypesIRv9 ()
 
static const std::vector
< MLDataType > & 
AllOptionalTypes ()
 
static const std::vector
< MLDataType > & 
AllOptionalTypesIRv4 ()
 
static const std::vector
< MLDataType > & 
AllOptionalTypesIRv9 ()
 
static const std::vector
< MLDataType > & 
AllTensorAndSequenceTensorAndOptionalTypes ()
 
static const std::vector
< MLDataType > & 
AllTensorAndSequenceTensorAndOptionalTypesIRv4 ()
 
static const std::vector
< MLDataType > & 
AllTensorAndSequenceTensorAndOptionalTypesIRv9 ()
 
- Public Attributes inherited from onnxruntime::DataTypeImpl
const GeneralType type_
 
const size_t size_
 

Detailed Description

Base type for all non-tensors, maps, sequences and opaques.

Definition at line 684 of file data_types.h.

Constructor & Destructor Documentation

onnxruntime::NonTensorTypeBase::NonTensorTypeBase ( const NonTensorTypeBase &  )
delete
onnxruntime::NonTensorTypeBase::NonTensorTypeBase ( size_t  size)
protected
onnxruntime::NonTensorTypeBase::~NonTensorTypeBase ( )
overrideprotected

Member Function Documentation

virtual void onnxruntime::NonTensorTypeBase::FromDataContainer ( const void *  data,
size_t  data_size,
OrtValue &  output 
) const
virtual
virtual CreateFunc onnxruntime::NonTensorTypeBase::GetCreateFunc ( ) const
pure virtual
DeleteFunc onnxruntime::NonTensorTypeBase::GetDeleteFunc ( ) const
overridepure virtual
const ONNX_NAMESPACE::TypeProto* onnxruntime::NonTensorTypeBase::GetTypeProto ( ) const
overridevirtual

Retrieves an instance of TypeProto for a given MLDataType.

Returns
optional TypeProto. Only ONNX types has type proto, non-ONNX types will return nullptr.

Implements onnxruntime::DataTypeImpl.

bool onnxruntime::NonTensorTypeBase::IsMapCompatible ( const ONNX_NAMESPACE::TypeProto &  type_proto) const
protected
bool onnxruntime::NonTensorTypeBase::IsOpaqueCompatible ( const ONNX_NAMESPACE::TypeProto &  type_proto) const
protected
bool onnxruntime::NonTensorTypeBase::IsSequenceCompatible ( const ONNX_NAMESPACE::TypeProto &  type_proto) const
protected
ONNX_NAMESPACE::TypeProto& onnxruntime::NonTensorTypeBase::MutableTypeProto ( )
protected
NonTensorTypeBase& onnxruntime::NonTensorTypeBase::operator= ( const NonTensorTypeBase &  )
delete
virtual void onnxruntime::NonTensorTypeBase::ToDataContainer ( const OrtValue &  input,
size_t  data_size,
void *  data 
) const
virtual

The documentation for this class was generated from the following file: