HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
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
14
AllocateFunc
allocate_func
;
15
DestroyFunc
release_func
;
16
AllocatorHandle
allocator_handle
;
17
const
char
*
node_name
;
18
}
ComputeContext
;
19
20
using
FunctionState
=
void
*;
21
// take the ComputeContext, and create a function state.
22
using
CreateFunctionStateC
=
int
(*)(
ComputeContext
*,
FunctionState
*);
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.
26
using
DestroyFunctionStateC
=
void
(*)(
FunctionState
);
27
}
// namespace onnxruntime
int
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
onnxruntime::ComputeContext::node_name
const char * node_name
Definition:
func_api.h:17
onnxruntime::ComputeContext::allocate_func
AllocateFunc allocate_func
Definition:
func_api.h:14
onnxruntime::FunctionState
void * FunctionState
Definition:
func_api.h:20
void
void
Definition:
png.h:1083
status.h
onnxruntime::ComputeContext::release_func
DestroyFunc release_func
Definition:
func_api.h:15
onnxruntime::ComputeFuncC
common::Status(*)(FunctionState, const OrtApi *, OrtKernelContext *) ComputeFuncC
Definition:
func_api.h:24
onnxruntime::AllocateFunc
void *(*)(void *, size_t, size_t) AllocateFunc
Definition:
func_api.h:8
onnxruntime::DestroyFunc
void(*)(void *, void *) DestroyFunc
Definition:
func_api.h:9
onnxruntime::AllocatorHandle
void * AllocatorHandle
Definition:
func_api.h:10
onnxruntime::ComputeContext
Definition:
func_api.h:12
GU_Flatten2::Status
Status
Definition:
GU_Flatten2.h:36
onnxruntime::CreateFunctionStateC
int(*)(ComputeContext *, FunctionState *) CreateFunctionStateC
Definition:
func_api.h:22
onnxruntime::DestroyFunctionStateC
void(*)(FunctionState) DestroyFunctionStateC
Definition:
func_api.h:26
onnxruntime::ComputeContext::allocator_handle
AllocatorHandle allocator_handle
Definition:
func_api.h:16
onnxruntime
core
framework
func_api.h
Generated on Sun Nov 17 2024 03:01:32 for HDK by
1.8.6