OnnxRuntime
Ort::CustomOpApi Struct Reference

#include <onnxruntime_cxx_api.h>

Public Member Functions

 CustomOpApi (const OrtApi &api)
 
template<typename T >
KernelInfoGetAttribute (const OrtKernelInfo *info, const char *name)
 
OrtTensorTypeAndShapeInfoGetTensorTypeAndShape (const OrtValue *value)
 
size_t GetTensorShapeElementCount (const OrtTensorTypeAndShapeInfo *info)
 
ONNXTensorElementDataType GetTensorElementType (const OrtTensorTypeAndShapeInfo *info)
 
size_t GetDimensionsCount (const OrtTensorTypeAndShapeInfo *info)
 
void GetDimensions (const OrtTensorTypeAndShapeInfo *info, int64_t *dim_values, size_t dim_values_length)
 
void SetDimensions (OrtTensorTypeAndShapeInfo *info, const int64_t *dim_values, size_t dim_count)
 
template<typename T >
T * GetTensorMutableData (OrtValue *value)
 
template<typename T >
const T * GetTensorData (const OrtValue *value)
 
const OrtMemoryInfoGetTensorMemoryInfo (const OrtValue *value)
 
std::vector< int64_t > GetTensorShape (const OrtTensorTypeAndShapeInfo *info)
 
void ReleaseTensorTypeAndShapeInfo (OrtTensorTypeAndShapeInfo *input)
 
size_t KernelContext_GetInputCount (const OrtKernelContext *context)
 
const OrtValueKernelContext_GetInput (const OrtKernelContext *context, size_t index)
 
size_t KernelContext_GetOutputCount (const OrtKernelContext *context)
 
OrtValueKernelContext_GetOutput (OrtKernelContext *context, size_t index, const int64_t *dim_values, size_t dim_count)
 
void * KernelContext_GetGPUComputeStream (const OrtKernelContext *context)
 
void ThrowOnError (OrtStatus *result)
 

Constructor & Destructor Documentation

◆ CustomOpApi()

Ort::CustomOpApi::CustomOpApi ( const OrtApi api)
inline

Member Function Documentation

◆ GetDimensions()

void Ort::CustomOpApi::GetDimensions ( const OrtTensorTypeAndShapeInfo info,
int64_t *  dim_values,
size_t  dim_values_length 
)

◆ GetDimensionsCount()

size_t Ort::CustomOpApi::GetDimensionsCount ( const OrtTensorTypeAndShapeInfo info)

◆ GetTensorData()

template<typename T >
const T * Ort::CustomOpApi::GetTensorData ( const OrtValue value)

◆ GetTensorElementType()

ONNXTensorElementDataType Ort::CustomOpApi::GetTensorElementType ( const OrtTensorTypeAndShapeInfo info)

◆ GetTensorMemoryInfo()

const OrtMemoryInfo * Ort::CustomOpApi::GetTensorMemoryInfo ( const OrtValue value)

◆ GetTensorMutableData()

template<typename T >
T * Ort::CustomOpApi::GetTensorMutableData ( OrtValue value)

◆ GetTensorShape()

std::vector< int64_t > Ort::CustomOpApi::GetTensorShape ( const OrtTensorTypeAndShapeInfo info)

◆ GetTensorShapeElementCount()

size_t Ort::CustomOpApi::GetTensorShapeElementCount ( const OrtTensorTypeAndShapeInfo info)

◆ GetTensorTypeAndShape()

OrtTensorTypeAndShapeInfo * Ort::CustomOpApi::GetTensorTypeAndShape ( const OrtValue value)

◆ KernelContext_GetGPUComputeStream()

void * Ort::CustomOpApi::KernelContext_GetGPUComputeStream ( const OrtKernelContext context)

◆ KernelContext_GetInput()

const OrtValue * Ort::CustomOpApi::KernelContext_GetInput ( const OrtKernelContext context,
size_t  index 
)

◆ KernelContext_GetInputCount()

size_t Ort::CustomOpApi::KernelContext_GetInputCount ( const OrtKernelContext context)

◆ KernelContext_GetOutput()

OrtValue * Ort::CustomOpApi::KernelContext_GetOutput ( OrtKernelContext context,
size_t  index,
const int64_t *  dim_values,
size_t  dim_count 
)

◆ KernelContext_GetOutputCount()

size_t Ort::CustomOpApi::KernelContext_GetOutputCount ( const OrtKernelContext context)

◆ KernelInfoGetAttribute()

template<typename T >
T Ort::CustomOpApi::KernelInfoGetAttribute ( const OrtKernelInfo info,
const char *  name 
)

◆ ReleaseTensorTypeAndShapeInfo()

void Ort::CustomOpApi::ReleaseTensorTypeAndShapeInfo ( OrtTensorTypeAndShapeInfo input)

◆ SetDimensions()

void Ort::CustomOpApi::SetDimensions ( OrtTensorTypeAndShapeInfo info,
const int64_t *  dim_values,
size_t  dim_count 
)

◆ ThrowOnError()

void Ort::CustomOpApi::ThrowOnError ( OrtStatus result)