| #pragma once |
| #include "core/common/status.h" |
| using onnxruntime::common::Status; |
|
|
| namespace onnxruntime { |
|
|
| |
| using AllocateFunc = void* (*)(void*, size_t, size_t); |
| using DestroyFunc = void (*)(void*, void*); |
| using AllocatorHandle = void*; |
|
|
| typedef struct { |
| |
| AllocateFunc allocate_func; |
| DestroyFunc release_func; |
| AllocatorHandle allocator_handle; |
| const char* node_name; |
| } ComputeContext; |
|
|
| using FunctionState = void*; |
| |
| using CreateFunctionStateC = int (*)(ComputeContext*, FunctionState*); |
| |
| using ComputeFuncC = common::Status (*)(FunctionState, const OrtApi*, OrtKernelContext*); |
| |
| using DestroyFunctionStateC = void (*)(FunctionState); |
| } |
|
|