78 #ifndef BAM_KERNEL_WRAPPER_H 79 #define BAM_KERNEL_WRAPPER_H 85 #include "bam_common.h" 92 #define TIVX_BAM_MAX_NODES (16u) 97 #define TIVX_BAM_MAX_EDGES (32u) 102 #define TIVX_MAX_BUF_PARAMS (32u) 108 #define TIVX_IMAGE_NULL_PLANE (255) 145 typedef struct _tivx_bam_kernel_details
147 BAM_KernelInfo kernel_info;
148 void *compute_kernel_params;
149 uint32_t block_width;
150 uint32_t block_height;
160 typedef struct _tivx_bam_plugin_def
242 void *wbuf_mem, uint32_t wbuf_size);
267 VXLIB_bufParams2D_t *buf_params[],
298 BAM_EdgeParams edge_list[],
300 VXLIB_bufParams2D_t *buf_params[],
321 uint32_t num_outputs,
395 uint32_t num_bam_nodes,
416 BAM_NodeParams node_list[],
418 int32_t * bam_node_cnt,
450 BAM_EdgeParams edge_list[],
451 int32_t * bam_edge_cnt);
492 int32_t kernel_params_size,
Interface to TI extension APIs.
vx_status tivxBamProcessGraph(tivx_bam_graph_handle graph_handle)
BAM Process Graph.
VX_API_ENTRY vx_status VX_API_CALL tivxEnableKernelForSuperNode(tivx_target_kernel target_kernel, tivx_target_kernel_create_in_bam_graph_f create_in_bam_func, tivx_target_kernel_get_node_port_f get_node_port_func, tivx_target_kernel_append_internal_edges_f append_internal_edges_func, tivx_target_kernel_pre_post_process_f preprocess_func, tivx_target_kernel_pre_post_process_f postprocess_func, int32_t kernel_params_size, void *priv_arg)
Allows users to support kernel as part of super node.
const BAM_KernelInfo * kernelInfo
const BAM_KernelHelperFuncDef * kernelHelperFunc
struct _tivx_target_kernel * tivx_target_kernel
Handle to kernel on a target.
vx_status tivxBamInitKernelDetails(tivx_bam_kernel_details_t *kernel_details, uint32_t num_bam_nodes, tivx_target_kernel_instance kernel)
BAM Initialize kernel details structure array.
This file includes the relevant header files for all the kernels and acts as a common unified interfa...
vx_status tivxBamGetKernelIdFromName(const char *name, BAM_KernelId *kernelId)
Returns the kernelID associated with a plugin name.
vx_status tivxBamMemInit(void *ibuf_mem, uint32_t ibuf_size, void *wbuf_mem, uint32_t wbuf_size)
Initialize memory block for BAM usage.
struct _tivx_target_kernel_instance * tivx_target_kernel_instance
Handle to instance of kernel on a target.
Target Kernel Instance implementation APIs.
vx_status tivxBamRegisterPlugin(tivx_bam_plugin_def *plugin, BAM_KernelId *kernelId)
Register BAM plugin with OpenVX framework on DSP.
vx_status tivxBamCreateHandleSingleNode(BAM_TI_KernelID kernel_id, VXLIB_bufParams2D_t *buf_params[], tivx_bam_kernel_details_t *kernel_details, tivx_bam_graph_handle *graph_handle)
BAM Create Graph Handle for Single Node.
const BAM_KernelExecFuncDef * kernelExecFunc
void * tivx_bam_graph_handle
Graph handle.
vx_status tivxBamUpdatePointers(tivx_bam_graph_handle graph_handle, uint32_t num_inputs, uint32_t num_outputs, void *ptrs[])
BAM Update Pointers.
vx_status(VX_CALLBACK * tivx_target_kernel_pre_post_process_f)(tivx_target_kernel_instance kernel, tivx_obj_desc_t *obj_desc[], uint16_t num_params, tivx_bam_graph_handle *graph_handle, void *priv_arg)
The "create in bam graph" target kernel callback.
Interface to kernel APIs on target.
vx_status tivxBamCreateHandleMultiNode(BAM_NodeParams node_list[], uint32_t max_nodes, BAM_EdgeParams edge_list[], uint32_t max_edges, VXLIB_bufParams2D_t *buf_params[], tivx_bam_kernel_details_t kernel_details[], tivx_bam_graph_handle *g_handle)
BAM Create Graph Handle for Multiple Nodes.
void tivxBamDestroyHandle(tivx_bam_graph_handle graph_handle)
BAM Destroy Handle.
vx_status(VX_CALLBACK * tivx_target_kernel_get_node_port_f)(tivx_target_kernel_instance kernel, uint8_t ovx_port, uint8_t plane, uint8_t *bam_node, uint8_t *bam_port)
The "get node port" target kernel callback.
vx_status(VX_CALLBACK * tivx_target_kernel_append_internal_edges_f)(tivx_target_kernel_instance kernel, BAM_EdgeParams edge_list[], int32_t *bam_edge_cnt)
The "append internal edges" target kernel callback This callback is optional and only needs to be imp...
vx_status(VX_CALLBACK * tivx_target_kernel_create_in_bam_graph_f)(tivx_target_kernel_instance kernel, tivx_obj_desc_t *obj_desc[], uint16_t num_params, void *priv_arg, BAM_NodeParams node_list[], tivx_bam_kernel_details_t kernel_details[], int32_t *bam_node_cnt, void *scratch, int32_t *size)
The "create in bam graph" target kernel callback.
Kernel Details structure.
vx_status(* VX_API_CALL)(vx_reference *ref)
Callback type used to register release callbacks from object dervied from references.
vx_status tivxBamControlNode(tivx_bam_graph_handle graph_handle, uint32_t node_id, uint32_t cmd, void *payload)
BAM Node Control.