HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
onnxruntime::TensorType< elemT > Class Template Reference

Tensor type. This type does not have a C++ type associated with it at registration time except the element type. One of the types mentioned above at IsTensorContainedType<> list is acceptable. More...

#include <data_types.h>

+ Inheritance diagram for onnxruntime::TensorType< elemT >:

Public Member Functions

MLDataType GetElementType () const override
 
- Public Member Functions inherited from onnxruntime::TensorTypeBase
bool IsCompatible (const ONNX_NAMESPACE::TypeProto &type_proto) const override
 
DeleteFunc GetDeleteFunc () const override
 
const ONNX_NAMESPACE::TypeProto * GetTypeProto () const override
 Retrieves an instance of TypeProto for a given MLDataType. More...
 
 ORT_DISALLOW_COPY_ASSIGNMENT_AND_MOVE (TensorTypeBase)
 
- Public Member Functions inherited from onnxruntime::DataTypeImpl
virtual ~DataTypeImpl ()=default
 
size_t Size () const
 
bool IsTensorType () const
 
bool IsTensorSequenceType () const
 
bool IsSparseTensorType () const
 
bool IsOptionalType () const
 
bool IsNonTensorType () const
 
bool IsPrimitiveDataType () const
 
const TensorTypeBaseAsTensorType () const
 
const SequenceTensorTypeBaseAsSequenceTensorType () const
 
const SparseTensorTypeBaseAsSparseTensorType () const
 
const OptionalTypeBaseAsOptionalType () const
 
const NonTensorTypeBaseAsNonTensorType () const
 
const PrimitiveDataTypeBaseAsPrimitiveDataType () const
 

Static Public Member Functions

static MLDataType Type ()
 
- Static Public Member Functions inherited from onnxruntime::TensorTypeBase
static MLDataType Type ()
 
- 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 TensorTypeBaseTensorTypeFromONNXEnum (int type)
 
static const
SequenceTensorTypeBase
SequenceTensorTypeFromONNXEnum (int type)
 
static const SparseTensorTypeBaseSparseTensorTypeFromONNXEnum (int type)
 
static const char * ToString (MLDataType type)
 
static std::vector< std::stringToString (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 > & 
AllFixedSizeTensorTypes ()
 
static const std::vector
< MLDataType > & 
AllSequenceTensorTypes ()
 
static const std::vector
< MLDataType > & 
AllFixedSizeSequenceTensorTypes ()
 
static const std::vector
< MLDataType > & 
AllNumericTensorTypes ()
 
static const std::vector
< MLDataType > & 
AllIEEEFloatTensorTypes ()
 
static const std::vector
< MLDataType > & 
AllFixedSizeTensorExceptHalfTypes ()
 
static const std::vector
< MLDataType > & 
AllIEEEFloatTensorExceptHalfTypes ()
 
static const std::vector
< MLDataType > & 
AllTensorAndSequenceTensorTypes ()
 
static const std::vector
< MLDataType > & 
AllFixedSizeTensorAndSequenceTensorTypes ()
 
static const std::vector
< MLDataType > & 
AllOptionalTypes ()
 
static const std::vector
< MLDataType > & 
AllTensorAndSequenceTensorAndOptionalTypes ()
 

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
}
 
- Public Attributes inherited from onnxruntime::DataTypeImpl
const GeneralType type_
 
const size_t size_
 
- Protected Member Functions inherited from onnxruntime::TensorTypeBase
ONNX_NAMESPACE::TypeProto & MutableTypeProto ()
 
 TensorTypeBase ()
 
 ~TensorTypeBase () override
 
- Protected Member Functions inherited from onnxruntime::DataTypeImpl
 DataTypeImpl (GeneralType type, size_t size)
 

Detailed Description

template<typename elemT>
class onnxruntime::TensorType< elemT >

Tensor type. This type does not have a C++ type associated with it at registration time except the element type. One of the types mentioned above at IsTensorContainedType<> list is acceptable.

Usage: ORT_REGISTER_TENSOR(ELEMENT_TYPE) Currently all of the Tensors irrespective of the dimensions are mapped to Tensor<type> type. IsCompatible() currently ignores shape.

Definition at line 439 of file data_types.h.

Member Function Documentation

template<typename elemT >
MLDataType onnxruntime::TensorType< elemT >::GetElementType ( ) const
inlineoverridevirtual

Tensors only can contain basic data types that have been previously registered with ONNXRuntime

Reimplemented from onnxruntime::TensorTypeBase.

Definition at line 448 of file data_types.h.

template<typename elemT >
static MLDataType onnxruntime::TensorType< elemT >::Type ( )
static

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