HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ort::Custom::Tensor< T > Class Template Reference

#include <onnxruntime_lite_custom_op.h>

+ Inheritance diagram for Ort::Custom::Tensor< T >:

Public Types

using TT = typename std::remove_reference< T >::type
 

Public Member Functions

 Tensor (OrtKernelContext *ctx, size_t indice, bool is_input)
 
const TTData () const
 
TTAllocate (const std::vector< int64_t > &shape)
 
const Span< T > & AsSpan ()
 
const T & AsScalar ()
 
const voidDataRaw () const override
 
size_t SizeInBytes () const override
 
- Public Member Functions inherited from Ort::Custom::TensorBase
 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
 
- Public Member Functions inherited from Ort::Custom::ArgBase
 ArgBase (OrtKernelContext *ctx, size_t indice, bool is_input)
 
virtual ~ArgBase ()
 

Static Public Member Functions

static TT GetT ()
 

Additional Inherited Members

- Protected Attributes inherited from Ort::Custom::TensorBase
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

template<typename T>
class Ort::Custom::Tensor< T >

Definition at line 114 of file onnxruntime_lite_custom_op.h.

Member Typedef Documentation

template<typename T >
using Ort::Custom::Tensor< T >::TT = typename std::remove_reference<T>::type

Definition at line 116 of file onnxruntime_lite_custom_op.h.

Constructor & Destructor Documentation

template<typename T >
Ort::Custom::Tensor< T >::Tensor ( OrtKernelContext *  ctx,
size_t  indice,
bool  is_input 
)
inline

Definition at line 117 of file onnxruntime_lite_custom_op.h.

Member Function Documentation

template<typename T >
TT* Ort::Custom::Tensor< T >::Allocate ( const std::vector< int64_t > &  shape)
inline

Definition at line 130 of file onnxruntime_lite_custom_op.h.

template<typename T >
const T& Ort::Custom::Tensor< T >::AsScalar ( )
inline

Definition at line 147 of file onnxruntime_lite_custom_op.h.

template<typename T >
const Span<T>& Ort::Custom::Tensor< T >::AsSpan ( )
inline

Definition at line 139 of file onnxruntime_lite_custom_op.h.

template<typename T >
const TT* Ort::Custom::Tensor< T >::Data ( ) const
inline

Definition at line 127 of file onnxruntime_lite_custom_op.h.

template<typename T >
const void* Ort::Custom::Tensor< T >::DataRaw ( ) const
inlineoverridevirtual

Implements Ort::Custom::TensorBase.

Definition at line 154 of file onnxruntime_lite_custom_op.h.

template<typename T >
static TT Ort::Custom::Tensor< T >::GetT ( )
inlinestatic

Definition at line 138 of file onnxruntime_lite_custom_op.h.

template<typename T >
size_t Ort::Custom::Tensor< T >::SizeInBytes ( ) const
inlineoverridevirtual

Implements Ort::Custom::TensorBase.

Definition at line 158 of file onnxruntime_lite_custom_op.h.


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