|
HDK
|
Base class for MLDataType. More...
#include <data_types.h>
Inheritance diagram for onnxruntime::DataTypeImpl:Public Types | |
| enum | GeneralType { GeneralType::kInvalid = 0, GeneralType::kNonTensor = 1, GeneralType::kTensor = 2, GeneralType::kTensorSequence = 3, GeneralType::kSparseTensor = 4, GeneralType::kOptional = 5, GeneralType::kPrimitive = 6 } |
Public Member Functions | |
| 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 |
| virtual DeleteFunc | GetDeleteFunc () const =0 |
| virtual const ONNX_NAMESPACE::TypeProto * | GetTypeProto () const =0 |
| Retrieves an instance of TypeProto for a given MLDataType. More... | |
| 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 |
Public Attributes | |
| const GeneralType | type_ |
| const size_t | size_ |
Protected Member Functions | |
| DataTypeImpl (GeneralType type, size_t size) | |
Base class for MLDataType.
Definition at line 77 of file data_types.h.
|
strong |
| Enumerator | |
|---|---|
| kInvalid | |
| kNonTensor | |
| kTensor | |
| kTensorSequence | |
| kSparseTensor | |
| kOptional | |
| kPrimitive | |
Definition at line 79 of file data_types.h.
|
inlineprotected |
Definition at line 93 of file data_types.h.
|
virtualdefault |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
inline |
Definition at line 1006 of file data_types.h.
|
inline |
Definition at line 1001 of file data_types.h.
|
inline |
Definition at line 1010 of file data_types.h.
|
inline |
Definition at line 990 of file data_types.h.
|
inline |
Definition at line 995 of file data_types.h.
|
inline |
Definition at line 986 of file data_types.h.
|
static |
|
pure virtual |
|
static |
|
static |
|
static |
|
static |
|
static |
|
pure virtual |
Retrieves an instance of TypeProto for a given MLDataType.
Implemented in onnxruntime::PrimitiveDataTypeBase, onnxruntime::SequenceTensorTypeBase, onnxruntime::NonTensorTypeBase, onnxruntime::OptionalTypeBase, onnxruntime::SparseTensorTypeBase, and onnxruntime::TensorTypeBase.
|
pure virtual |
this API will be used to check type compatibility at runtime
| type_proto | a TypeProto instance that is constructed for a specific type will be checked against a TypeProto instance contained within a corresponding MLDataType instance. |
Implemented in onnxruntime::PrimitiveDataTypeBase, onnxruntime::OpaqueType< T, D, N >, onnxruntime::SequenceTensorTypeBase, onnxruntime::SequenceType< CPPType >, onnxruntime::MapType< CPPType >, onnxruntime::OptionalTypeBase, onnxruntime::SparseTensorTypeBase, and onnxruntime::TensorTypeBase.
|
inline |
Definition at line 135 of file data_types.h.
|
inline |
Definition at line 131 of file data_types.h.
|
inline |
Definition at line 139 of file data_types.h.
|
inline |
Definition at line 127 of file data_types.h.
|
inline |
Definition at line 123 of file data_types.h.
|
inline |
Definition at line 119 of file data_types.h.
|
static |
|
static |
|
inline |
Definition at line 107 of file data_types.h.
|
static |
|
static |
|
static |
|
static |
|
static |
Convert an ONNX TypeProto to onnxruntime DataTypeImpl. However, this conversion is lossy. Don't try to use 'this->GetTypeProto()' converting it back. Even though GetTypeProto() will not have the original information, it will still have enough to correctly map to MLDataType.
| proto |
| const size_t onnxruntime::DataTypeImpl::size_ |
Definition at line 90 of file data_types.h.
| const GeneralType onnxruntime::DataTypeImpl::type_ |
Definition at line 89 of file data_types.h.