HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
func_api.h
Go to the documentation of this file.
1 #pragma once
2 #include "core/common/status.h"
3 using onnxruntime::common::Status; // TODO: Needed by WinML, but shouldn't be put into the global namespace like this
4 
5 namespace onnxruntime {
6 
7 // AllocateFunc(void* handle, size_t alignment, size_t size)
8 using AllocateFunc = void* (*)(void*, size_t, size_t);
9 using DestroyFunc = void (*)(void*, void*);
10 using AllocatorHandle = void*;
11 
12 typedef struct {
13  // right now we only include allocation for host memory
17  const char* node_name;
19 
20 using FunctionState = void*;
21 // take the ComputeContext, and create a function state.
23 // pass in the function state and input/output tensors, perform compute and return status
24 using ComputeFuncC = common::Status (*)(FunctionState, const OrtApi*, OrtKernelContext*);
25 // release the function state.
27 } // namespace onnxruntime
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
const char * node_name
Definition: func_api.h:17
AllocateFunc allocate_func
Definition: func_api.h:14
void * FunctionState
Definition: func_api.h:20
void
Definition: png.h:1083
DestroyFunc release_func
Definition: func_api.h:15
common::Status(*)(FunctionState, const OrtApi *, OrtKernelContext *) ComputeFuncC
Definition: func_api.h:24
void *(*)(void *, size_t, size_t) AllocateFunc
Definition: func_api.h:8
void(*)(void *, void *) DestroyFunc
Definition: func_api.h:9
void * AllocatorHandle
Definition: func_api.h:10
int(*)(ComputeContext *, FunctionState *) CreateFunctionStateC
Definition: func_api.h:22
void(*)(FunctionState) DestroyFunctionStateC
Definition: func_api.h:26
AllocatorHandle allocator_handle
Definition: func_api.h:16