# OnnxRuntime: Ort::Op Struct Reference

Loading...
Searching...
No Matches
Ort::Op Struct Reference

Create and own custom defined operation. More...

`#include <onnxruntime_cxx_api.h>`

Inheritance diagram for Ort::Op:

## Public Member Functions

| Op (std::nullptr_t)
| Create an empty Operator object, must be assigned a valid one to be used.
| Op (OrtOp *)
| Take ownership of the OrtOp.
void | Invoke (const OrtKernelContext *context, const Value *input_values, size_t input_count, Value *output_values, size_t output_count)
void | Invoke (const OrtKernelContext *context, const OrtValue *const *input_values, size_t input_count, OrtValue *const *output_values, size_t output_count)
Public Member Functions inherited from Ort::detail::Base< OrtOp >
constexpr | Base ()=default
constexpr | Base (contained_type *p) noexcept
| Base (const Base &)=delete
| Base (Base &&v) noexcept
| ~Base ()
Base & | operator= (const Base &)=delete
Base & | operator= (Base &&v) noexcept
constexpr | operator contained_type * () const noexcept
contained_type * | release ()
| Relinquishes ownership of the contained C object pointer The underlying object is not destroyed.

## Static Public Member Functions

static Op | Create (const OrtKernelInfo *info, const char *op_name, const char *domain, int version, const char **type_constraint_names, const ONNXTensorElementDataType *type_constraint_values, size_t type_constraint_count, const OpAttr *attr_values, size_t attr_count, size_t input_count, size_t output_count)

## Additional Inherited Members

Public Types inherited from Ort::detail::Base< OrtOp >
using | contained_type = OrtOp
Protected Attributes inherited from Ort::detail::Base< OrtOp >
contained_type * | p_

## Detailed Description

Create and own custom defined operation.

## Constructor & Destructor Documentation

## Op() [1/2]

Ort::Op::Op | ( | std::nullptr_t |  | ) |

inlineexplicit

Create an empty Operator object, must be assigned a valid one to be used.

## Op() [2/2]

Ort::Op::Op | ( | OrtOp * |  | ) |

explicit

Take ownership of the OrtOp.

## Member Function Documentation

## Create()

static Op Ort::Op::Create | ( | const OrtKernelInfo * | info,
|  | const char * | op_name,
|  | const char * | domain,
|  | int | version,
|  | const char ** | type_constraint_names,
|  | const ONNXTensorElementDataType * | type_constraint_values,
|  | size_t | type_constraint_count,
|  | const OpAttr * | attr_values,
|  | size_t | attr_count,
|  | size_t | input_count,
|  | size_t | output_count
| ) |  |

static

## Invoke() [1/2]

void Ort::Op::Invoke | ( | const OrtKernelContext * | context,
|  | const OrtValue *const * | input_values,
|  | size_t | input_count,
|  | OrtValue *const * | output_values,
|  | size_t | output_count
| ) |  |

## Invoke() [2/2]

void Ort::Op::Invoke | ( | const OrtKernelContext * | context,
|  | const Value * | input_values,
|  | size_t | input_count,
|  | Value * | output_values,
|  | size_t | output_count
| ) |  |