![]() |
TIOVX User Guide
|
APIs for kernel operations on the target.
Typedefs | |
| typedef struct _tivx_target_kernel * | tivx_target_kernel |
| Handle to kernel on a target. | |
| typedef struct _tivx_target_kernel_instance * | tivx_target_kernel_instance |
| Handle to instance of kernel on a target. | |
| typedef vx_status(VX_CALLBACK * | tivx_target_kernel_f) (tivx_target_kernel_instance kernel, tivx_obj_desc_t *obj_desc[], uint16_t num_params, void *priv_arg) |
| The target kernel callback. More... | |
| typedef vx_status(VX_CALLBACK * | tivx_target_kernel_control_f) (tivx_target_kernel_instance kernel, uint32_t node_cmd_id, tivx_obj_desc_t *obj_desc[], uint16_t num_params, void *priv_arg) |
| The target kernel callback for control command. More... | |
Functions | |
| VX_API_ENTRY tivx_target_kernel VX_API_CALL | tivxAddTargetKernel (vx_enum kernel_id, const char *target_name, tivx_target_kernel_f process_func, tivx_target_kernel_f create_func, tivx_target_kernel_f delete_func, tivx_target_kernel_control_f control_func, void *priv_arg) |
| Allows users to add native kernels implementation to specific targets. More... | |
| VX_API_ENTRY tivx_target_kernel VX_API_CALL | tivxAddTargetKernelByName (const char *kernel_name, const char *target_name, tivx_target_kernel_f process_func, tivx_target_kernel_f create_func, tivx_target_kernel_f delete_func, tivx_target_kernel_control_f control_func, void *priv_arg) |
| Allows users to add native kernels implementation to specific targets. More... | |
| VX_API_ENTRY vx_status VX_API_CALL | tivxRemoveTargetKernel (tivx_target_kernel target_kernel) |
| Allows users to remove native kernels implementation to specific targets. | |
| VX_API_ENTRY vx_status VX_API_CALL | tivxRemoveTargetKernelByName (const char *kernel_name, const char *target_name) |
| Allows users to remove native kernels implementation to specific targets by providing a kernel name and target name. | |
| VX_API_ENTRY vx_status VX_API_CALL | tivxQueryNumTargetKernel (vx_uint32 *ptr) |
| Queries the framework to determine the number of target kernels on the target from which it is called. More... | |
| VX_API_ENTRY vx_status VX_API_CALL | tivxSetTargetKernelInstanceContext (tivx_target_kernel_instance target_kernel_instance, void *kernel_context, uint32_t kernel_context_size) |
| Associate a kernel function context or handle with a target kernel instance. More... | |
| VX_API_ENTRY vx_status VX_API_CALL | tivxGetTargetKernelInstanceContext (tivx_target_kernel_instance target_kernel_instance, void **kernel_context, uint32_t *kernel_context_size) |
| Get a kernel function context or handle with a target kernel instance. More... | |
| VX_API_ENTRY vx_status VX_API_CALL | tivxGetTargetKernelInstanceState (tivx_target_kernel_instance target_kernel_instance, vx_enum *state) |
| Get a kernel state with a target kernel instance. More... | |
| VX_API_ENTRY vx_status VX_API_CALL | tivxGetTargetKernelTargetId (tivx_target_kernel_instance target_kernel_instance, uint32_t *targetId) |
| Get a kernel target id with a target kernel instance. More... | |
| VX_API_ENTRY void | tivxGetTargetKernelInstanceBorderMode (tivx_target_kernel_instance target_kernel_instance, vx_border_t *border_mode) |
| Get the border mode for the target kernel instance. More... | |
| VX_API_ENTRY vx_bool | tivxIsTargetKernelInstanceReplicated (tivx_target_kernel_instance kernel_instance) |
| Checks if supplied node is replicated. Returns vx_true if the given node is replicated and vx_false if not. | |
| typedef vx_status(VX_CALLBACK * tivx_target_kernel_f) (tivx_target_kernel_instance kernel, tivx_obj_desc_t *obj_desc[], uint16_t num_params, void *priv_arg) |
The target kernel callback.
For create_func, delete_func and process_func callbacks 'obj_desc' points to array of data object descriptor parameters
For control_func, 'obj_desc' points to array of objects descriptors where obj_desc[0] points to the node object descriptors obj_desc[1..num_params-1] points to target kernel defined parameters
| [in] | kernel | The kernel for which the callback is called |
| [in] | obj_desc | Object descriptor passed as input to this callback |
Definition at line 107 of file tivx_target_kernel.h.
| typedef vx_status(VX_CALLBACK * tivx_target_kernel_control_f) (tivx_target_kernel_instance kernel, uint32_t node_cmd_id, tivx_obj_desc_t *obj_desc[], uint16_t num_params, void *priv_arg) |
The target kernel callback for control command.
For create_func, delete_func and process_func callbacks 'obj_desc' points to array of data object descriptor parameters
For control_func, 'obj_desc' points to array of objects descriptors for control parameter. It could be any vx_(object)
| [in] | kernel | The kernel for which the callback is called |
| [in] | Command | ID to be processed in the given node |
| [in] | obj_desc | Object descriptor passed as input to this callback |
| [in] | num_params | valid entries in object descriptor (obj_desc) array |
Definition at line 127 of file tivx_target_kernel.h.
| VX_API_ENTRY tivx_target_kernel VX_API_CALL tivxAddTargetKernel | ( | vx_enum | kernel_id, |
| const char * | target_name, | ||
| tivx_target_kernel_f | process_func, | ||
| tivx_target_kernel_f | create_func, | ||
| tivx_target_kernel_f | delete_func, | ||
| tivx_target_kernel_control_f | control_func, | ||
| void * | priv_arg | ||
| ) |
Allows users to add native kernels implementation to specific targets.
This is different from vxAddUserKernel() in that this is called on the target CPU. This is a TI proprietary API and not part of OpenVX or TI OpenVX extention.
This allows users to implement and plugin specific target optimized kernels on TI platforms
A equivalent vxAddUserKernel is typically called to pair the target kernel with OpenVX user kernel.
| VX_API_ENTRY tivx_target_kernel VX_API_CALL tivxAddTargetKernelByName | ( | const char * | kernel_name, |
| const char * | target_name, | ||
| tivx_target_kernel_f | process_func, | ||
| tivx_target_kernel_f | create_func, | ||
| tivx_target_kernel_f | delete_func, | ||
| tivx_target_kernel_control_f | control_func, | ||
| void * | priv_arg | ||
| ) |
Allows users to add native kernels implementation to specific targets.
Same as tivxAddTargetKernel except that it take a string name as input instead of kernel_id
Important Note: the kernel table which is populated when calling this API does not throw an error if duplicate names are entered. Therefore, the user must ensure all kernel names are unique on a given core.
| VX_API_ENTRY vx_status VX_API_CALL tivxQueryNumTargetKernel | ( | vx_uint32 * | ptr | ) |
Queries the framework to determine the number of target kernels on the target from which it is called.
| [out] | ptr | The location at which to store the resulting value. |
| VX_API_ENTRY vx_status VX_API_CALL tivxSetTargetKernelInstanceContext | ( | tivx_target_kernel_instance | target_kernel_instance, |
| void * | kernel_context, | ||
| uint32_t | kernel_context_size | ||
| ) |
Associate a kernel function context or handle with a target kernel instance.
Typically set by the kernel function during create phase
| VX_API_ENTRY vx_status VX_API_CALL tivxGetTargetKernelInstanceContext | ( | tivx_target_kernel_instance | target_kernel_instance, |
| void ** | kernel_context, | ||
| uint32_t * | kernel_context_size | ||
| ) |
Get a kernel function context or handle with a target kernel instance.
Typically used by the kernel function during run, control, delete phase
| VX_API_ENTRY vx_status VX_API_CALL tivxGetTargetKernelInstanceState | ( | tivx_target_kernel_instance | target_kernel_instance, |
| vx_enum * | state | ||
| ) |
Get a kernel state with a target kernel instance.
Typically used by a capture kernel function during process to track state
| VX_API_ENTRY vx_status VX_API_CALL tivxGetTargetKernelTargetId | ( | tivx_target_kernel_instance | target_kernel_instance, |
| uint32_t * | targetId | ||
| ) |
Get a kernel target id with a target kernel instance.
Typically used by nodes having multi priority implementation
| VX_API_ENTRY void tivxGetTargetKernelInstanceBorderMode | ( | tivx_target_kernel_instance | target_kernel_instance, |
| vx_border_t * | border_mode | ||
| ) |
Get the border mode for the target kernel instance.
Used by the kernel implementation to get border mode