HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ort::Custom::TensorBase Class Referenceabstract

#include <onnxruntime_lite_custom_op.h>

+ Inheritance diagram for Ort::Custom::TensorBase:

Public Member Functions

 TensorBase (OrtKernelContext *ctx, size_t indice, bool is_input)
 
 operator bool () const
 
const std::vector< int64_t > & Shape () const
 
ONNXTensorElementDataType Type () const
 
int64_t NumberOfElement () const
 
std::string Shape2Str () const
 
bool IsCpuTensor () const
 
virtual const voidDataRaw () const =0
 
virtual size_t SizeInBytes () const =0
 
- Public Member Functions inherited from Ort::Custom::ArgBase
 ArgBase (OrtKernelContext *ctx, size_t indice, bool is_input)
 
virtual ~ArgBase ()
 

Protected Attributes

std::optional< std::vector
< int64_t > > 
shape_
 
ONNXTensorElementDataType type_ = ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED
 
const char * mem_type_ = "Cpu"
 
- Protected Attributes inherited from Ort::Custom::ArgBase
struct KernelContext ctx_
 
size_t indice_
 
bool is_input_
 

Detailed Description

Definition at line 43 of file onnxruntime_lite_custom_op.h.

Constructor & Destructor Documentation

Ort::Custom::TensorBase::TensorBase ( OrtKernelContext *  ctx,
size_t  indice,
bool  is_input 
)
inline

Definition at line 45 of file onnxruntime_lite_custom_op.h.

Member Function Documentation

virtual const void* Ort::Custom::TensorBase::DataRaw ( ) const
pure virtual
bool Ort::Custom::TensorBase::IsCpuTensor ( ) const
inline

Definition at line 85 of file onnxruntime_lite_custom_op.h.

int64_t Ort::Custom::TensorBase::NumberOfElement ( ) const
inline

Definition at line 64 of file onnxruntime_lite_custom_op.h.

Ort::Custom::TensorBase::operator bool ( ) const
inline

Definition at line 49 of file onnxruntime_lite_custom_op.h.

const std::vector<int64_t>& Ort::Custom::TensorBase::Shape ( ) const
inline

Definition at line 53 of file onnxruntime_lite_custom_op.h.

std::string Ort::Custom::TensorBase::Shape2Str ( ) const
inline

Definition at line 72 of file onnxruntime_lite_custom_op.h.

virtual size_t Ort::Custom::TensorBase::SizeInBytes ( ) const
pure virtual
ONNXTensorElementDataType Ort::Custom::TensorBase::Type ( ) const
inline

Definition at line 60 of file onnxruntime_lite_custom_op.h.

Member Data Documentation

const char* Ort::Custom::TensorBase::mem_type_ = "Cpu"
protected

Definition at line 95 of file onnxruntime_lite_custom_op.h.

std::optional<std::vector<int64_t> > Ort::Custom::TensorBase::shape_
protected

Definition at line 93 of file onnxruntime_lite_custom_op.h.

ONNXTensorElementDataType Ort::Custom::TensorBase::type_ = ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED
protected

Definition at line 94 of file onnxruntime_lite_custom_op.h.


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