ONNX Runtime
Loading...
Searching...
No Matches
OrtScanKernelHelper Struct Reference

Contains helper functions for a Scan OrtKernelImpl created via OrtEpApi::CreateScanKernel. More...

#include <onnxruntime_ep_c_api.h>

Public Member Functions

OrtStatusTranspose (OrtScanKernelHelper *this_ptr, const size_t *permutation, size_t num_permutation_elems, const OrtValue *input, OrtSyncStream *stream, OrtValue *output)
 Helper function that transposes an OrtValue instance during execution of a Scan kernel.
 

Public Attributes

uint32_t ort_version_supported
 Must be initialized to ORT_API_VERSION.
 
void(* Release )(OrtScanKernelHelper *this_ptr)
 Called by ORT to release the OrtScanKernelHelper instance and its resources.
 

Detailed Description

Contains helper functions for a Scan OrtKernelImpl created via OrtEpApi::CreateScanKernel.

Since
Version 1.24.

Member Function Documentation

◆ Transpose()

OrtStatus * OrtScanKernelHelper::Transpose ( OrtScanKernelHelper this_ptr,
const size_t *  permutation,
size_t  num_permutation_elems,
const OrtValue input,
OrtSyncStream stream,
OrtValue output 
)

Helper function that transposes an OrtValue instance during execution of a Scan kernel.

Note
Called for Scan (opset >= 9) when the 'scan_input_axes' or 'scan_output_axes' attributes contain non-zero values. Implementing this function is required for Scan opset versions >= 9.
Parameters
[in]this_ptrThe OrtScanKernelHelper instance.
[in]permutationAn array of integers that defines how the input tensor's axes should be permuted.
[in]num_permutation_elemsThe number of integer elements in the permutation array.
[in]inputThe input OrtValue tensor to transpose.
[in]streamAn optional OrtSyncStream instance to be used for asynchronous operations. May be NULL.
[out]outputThe pre-allocated output OrtValue instance into which to store the results of the transpose operation. Must not be released as it is owned by ORT.

Returns
If no error, nullptr will be returned. If there is an error, a pointer to an OrtStatus that contains error details will be returned. Use OrtApi::ReleaseStatus to free this pointer.

Since
Version 1.24.

Member Data Documentation

◆ ort_version_supported

uint32_t OrtScanKernelHelper::ort_version_supported

Must be initialized to ORT_API_VERSION.

◆ Release

void( * OrtScanKernelHelper::Release) (OrtScanKernelHelper *this_ptr)

Called by ORT to release the OrtScanKernelHelper instance and its resources.

Parameters
[in]this_ptrThe OrtScanKernelHelper instance.
Since
Version 1.24.