TIOVX User Guide
vx_kernel.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2016 The Khronos Group Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 
18 
19 #ifndef VX_KERNEL_H_
20 #define VX_KERNEL_H_
21 
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
38 #define TIVX_DEFAULT_KERNEL_TIMEOUT (TIVX_EVENT_TIMEOUT_WAIT_FOREVER)
39 
43 typedef struct _tivx_signature_t {
45  vx_enum directions[TIVX_KERNEL_MAX_PARAMS];
47  vx_enum types[TIVX_KERNEL_MAX_PARAMS];
49  vx_enum states[TIVX_KERNEL_MAX_PARAMS];
53 
54 
60 typedef struct _vx_kernel
61 {
64 
78  vx_kernel_f function;
82  char target_name[TIVX_MAX_TARGETS_PER_KERNEL][TIVX_TARGET_MAX_NAME];
87 
104 
105 } tivx_kernel_t;
106 
107 
116 
125 vx_enum ownKernelGetTarget(vx_kernel kernel, const char *target_string);
126 
127 
128 #ifdef __cplusplus
129 }
130 #endif
131 
132 #endif
vx_bool
vx_size local_data_size
Local data size for user kernels.
Definition: vx_kernel.h:84
Kernel object internal state.
Definition: vx_kernel.h:60
size_t vx_size
vx_status(* vx_kernel_f)(vx_node node, const vx_reference *parameters, vx_uint32 num)
int32_t vx_enum
vx_enum ownKernelGetDefaultTarget(vx_kernel kernel)
Get default target ID associated with this kernel.
The most basic type in the OpenVX system. Any type that inherits from tivx_reference_t must have a vx...
Definition: vx_reference.h:63
vx_enum ownKernelGetTarget(vx_kernel kernel, const char *target_string)
Match user provided target with supported targets and return target ID on which to run this kernel...
vx_uint32 num_pipeup_bufs
number of pipeup buffers
Definition: vx_kernel.h:93
vx_kernel_initialize_f initialize
The initialization function.
Definition: vx_kernel.h:74
vx_uint32 connected_sink_bufs
number of buffers needed for allocation at source node when sink node directly connected ...
Definition: vx_kernel.h:99
vx_status(* vx_kernel_initialize_f)(vx_node node, const vx_reference *parameters, vx_uint32 num)
char vx_char
vx_uint32 num_targets
number of supported targets
Definition: vx_kernel.h:80
tivx_signature_t signature
parameter signature of this kernel
Definition: vx_kernel.h:70
vx_enum enumeration
enum associated with this kernel
Definition: vx_kernel.h:68
vx_uint32 pipeup_buf_idx
pipeup buf index, used for querying during enqueue
Definition: vx_kernel.h:95
vx_bool lock_kernel_remove
when this flag is true, kernel cannot be removed via remove kernel API
Definition: vx_kernel.h:91
#define TIVX_TARGET_MAX_NAME
Max possible name of a target.
Definition: tivx.h:94
vx_uint32 num_sink_bufs
number of buffers needed for sink node
Definition: vx_kernel.h:97
struct _vx_kernel * vx_kernel
vx_enum state
capture state (VX_NODE_STATE_PIPEUP or VX_NODE_STATE_STEADY)
Definition: vx_kernel.h:101
vx_kernel_deinitialize_f deinitialize
The deinitialization function.
Definition: vx_kernel.h:76
vx_uint32 timeout_val
Control API processing Timeout value in milli-sec.
Definition: vx_kernel.h:103
The internal representation of the attributes associated with a run-time parameter.
Definition: vx_kernel.h:43
vx_bool is_target_kernel
Flag to check if this is a user kernel or target kernel.
Definition: vx_kernel.h:86
vx_kernel_validate_f validate
The parameters validator.
Definition: vx_kernel.h:72
vx_status(* vx_kernel_deinitialize_f)(vx_node node, const vx_reference *parameters, vx_uint32 num)
#define VX_MAX_KERNEL_NAME
uint32_t vx_uint32
vx_status(* vx_kernel_validate_f)(vx_node node, const vx_reference parameters[], vx_uint32 num, vx_meta_format metas[])
tivx_reference_t base
reference object
Definition: vx_kernel.h:63
vx_uint32 num_parameters
The number of items in both tivx_signature_t::directions and tivx_signature_t::types.
Definition: vx_kernel.h:51