# OnnxRuntime: Ort::KernelInfo Struct Reference

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

This struct owns the OrtKernInfo* pointer when a copy is made. For convenient wrapping of OrtKernelInfo* passed to kernel constructor and query attributes, warp the pointer with Ort::Unowned<KernelInfo> instance so it does not destroy the pointer the kernel does not own. More...

`#include <onnxruntime_cxx_api.h>`

Inheritance diagram for Ort::KernelInfo:

## Public Member Functions

| KernelInfo (std::nullptr_t)
| Create an empty instance to initialize later.
| KernelInfo (OrtKernelInfo *info)
| Take ownership of the instance.
ConstKernelInfo | GetConst () const
Public Member Functions inherited from Ort::detail::KernelInfoImpl< OrtKernelInfo >
KernelInfo | Copy () const
R | GetAttribute (const char *name) const
std::vector< R > | GetAttributes (const char *name) const
Value | GetTensorAttribute (const char *name, OrtAllocator *allocator) const
size_t | GetInputCount () const
size_t | GetOutputCount () const
std::string | GetInputName (size_t index) const
std::string | GetOutputName (size_t index) const
TypeInfo | GetInputTypeInfo (size_t index) const
TypeInfo | GetOutputTypeInfo (size_t index) const
Public Member Functions inherited from Ort::detail::Base< T >
constexpr | Base ()=default
constexpr | Base (contained_type *p) noexcept
| ~Base ()
| Base (const Base &)=delete
Base & | operator= (const Base &)=delete
| Base (Base &&v) noexcept
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.

## Additional Inherited Members

Public Types inherited from Ort::detail::KernelInfoImpl< OrtKernelInfo >
using | B = Base< OrtKernelInfo >
Public Types inherited from Ort::detail::Base< T >
using | contained_type = T
Protected Attributes inherited from Ort::detail::Base< T >
contained_type * | p_ {}

## Detailed Description

This struct owns the OrtKernInfo* pointer when a copy is made. For convenient wrapping of OrtKernelInfo* passed to kernel constructor and query attributes, warp the pointer with Ort::Unowned<KernelInfo> instance so it does not destroy the pointer the kernel does not own.

## Constructor & Destructor Documentation

## KernelInfo() [1/2]

Ort::KernelInfo::KernelInfo | ( | std::nullptr_t |  | ) |

inlineexplicit

Create an empty instance to initialize later.

## KernelInfo() [2/2]

Ort::KernelInfo::KernelInfo | ( | OrtKernelInfo * | info | ) |

explicit

Take ownership of the instance.

## Member Function Documentation

## GetConst()

ConstKernelInfo Ort::KernelInfo::GetConst | ( |  | ) | const

inline