65 #ifndef TIVX_TARGET_KERNEL_H_ 66 #define TIVX_TARGET_KERNEL_H_ 148 const char *target_name,
164 const char *kernel_name,
165 const char *target_name,
201 void *kernel_context, uint32_t kernel_context_size);
212 void **kernel_context, uint32_t *kernel_context_size);
263 static inline void tivxFlagBitSet(
volatile uint32_t *flag_var, uint32_t flag_val);
264 static inline void tivxFlagBitClear(
volatile uint32_t *flag_var, uint32_t flag_val);
271 return (
vx_bool)((flag_var & flag_val) == flag_val);
277 static inline void tivxFlagBitSet(
volatile uint32_t *flag_var, uint32_t flag_val)
279 *flag_var |= flag_val;
287 uint32_t value = *flag_var;
289 value = value & ~flag_val;
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...
void tivxLogRtTraceKernelInstanceExeEnd(tivx_target_kernel_instance kernel, uint16_t event_index)
Log trace on target kernel instance execute end.
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.
struct _tivx_target_kernel * tivx_target_kernel
Handle to kernel on a target.
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.
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.
tivx_target_kernel tivxTargetKernelInstanceGetKernel(tivx_target_kernel_instance target_kernel_instance)
Get target kernel for a given target kernel instance.
Interface to object descriptor.
struct _tivx_target_kernel_instance * tivx_target_kernel_instance
Handle to instance of kernel on a target.
static vx_bool tivxFlagIsBitSet(uint32_t flag_var, uint32_t flag_val)
Macro to check if flag is set, flag MUST be of bit type.
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.
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.
static void tivxFlagBitSet(volatile uint32_t *flag_var, uint32_t flag_val)
Macro to set flag value, flag MUST be of bit type.
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 i...
static void tivxFlagBitClear(volatile uint32_t *flag_var, uint32_t flag_val)
Macro to clear flag value, flag MUST be of bit type.
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.
VX_API_ENTRY vx_status VX_API_CALL tivxRemoveTargetKernel(tivx_target_kernel target_kernel)
Allows users to remove native kernels implementation to specific targets.
void tivxLogRtTraceKernelInstanceExeStart(tivx_target_kernel_instance kernel, uint16_t event_index)
Log trace on target kernel instance execute start.
void * tivxPlatformGetDmaObj(void)
Utility function to obtain DMA handle.
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.
struct _vx_node * vx_node
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.
void tivxLogRtTraceKernelInstanceRemoveEvent(vx_node node, uint16_t event_index)
Remove real-time log event in host side deinitilize callback for user kernel.
void tivxLogRtTraceKernelInstanceAddEvent(vx_node node, uint16_t event_index, char *event_name)
Add real-time log event in host side initilize callback for user kernel.
vx_status(* VX_API_CALL)(vx_reference *ref)
Callback type used to register release callbacks from object dervied from references.
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.