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

#include <onnxruntime_lite_custom_op.h>

+ Inheritance diagram for Ort::Custom::Tensor< std::string_view >:

Public Types

using strings = std::vector< std::string >
 
using string_views = std::vector< std::string_view >
 

Public Member Functions

 Tensor (OrtKernelContext *ctx, size_t indice, bool is_input)
 
const string_viewsData () const
 
const voidDataRaw () const override
 
size_t SizeInBytes () const override
 
void SetStringOutput (const strings &ss, const std::vector< int64_t > &dims)
 
const Span< std::string_view > & AsSpan ()
 
std::string_view AsScalar ()
 
- 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 ()
 

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<>
class Ort::Custom::Tensor< std::string_view >

Definition at line 243 of file onnxruntime_lite_custom_op.h.

Member Typedef Documentation

Definition at line 245 of file onnxruntime_lite_custom_op.h.

Constructor & Destructor Documentation

Ort::Custom::Tensor< std::string_view >::Tensor ( OrtKernelContext *  ctx,
size_t  indice,
bool  is_input 
)
inline

Definition at line 248 of file onnxruntime_lite_custom_op.h.

Member Function Documentation

Definition at line 297 of file onnxruntime_lite_custom_op.h.

Definition at line 294 of file onnxruntime_lite_custom_op.h.

const string_views& Ort::Custom::Tensor< std::string_view >::Data ( ) const
inline

Definition at line 269 of file onnxruntime_lite_custom_op.h.

const void* Ort::Custom::Tensor< std::string_view >::DataRaw ( ) const
inlineoverridevirtual

Implements Ort::Custom::TensorBase.

Definition at line 272 of file onnxruntime_lite_custom_op.h.

void Ort::Custom::Tensor< std::string_view >::SetStringOutput ( const strings ss,
const std::vector< int64_t > &  dims 
)
inline

Definition at line 284 of file onnxruntime_lite_custom_op.h.

size_t Ort::Custom::Tensor< std::string_view >::SizeInBytes ( ) const
inlineoverridevirtual

Implements Ort::Custom::TensorBase.

Definition at line 278 of file onnxruntime_lite_custom_op.h.


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