关键源代码:
vx_graph_pipeline.c
ownGraphScheduleGraph()
/* trigger graph execution by scheduling the head nodes
* Head nodes will trigger further nodes execution after
* their completion
* This will continue until leaf nodes executes
* After a leaf node executes, it will send a completion
* event.
* After all completion events are received, a graph is
* considered to have
* executed
*/
for(node_id=0; node_idnum_head_nodes; node_id++)
{
ownNodeKernelSchedule(graph->head_nodes[node_id], graph_obj_desc->pipeline_id);
}
vx_target.c
while(target->targetExitRequest == (vx_bool)vx_false_e)
{
status = tivxTargetDequeueObjDesc(target,
&obj_desc_id, TIVX_EVENT_TIMEOUT_WAIT_FOREVER);
switch(obj_desc->type)
{
case (vx_enum)TIVX_OBJ_DESC_CMD:
if( tivxObjDescIsValidType( obj_desc, TIVX_OBJ_DESC_CMD) != 0)
{
tivxTargetCmdDescHandler((tivx_obj_desc_cmd_t*)obj_desc);
}
break;
case (vx_enum)TIVX_OBJ_DESC_NODE:
if( tivxObjDescIsValidType( obj_desc, TIVX_OBJ_DESC_NODE) != 0)
{
tivxTargetNodeDescNodeExecute(target, (tivx_obj_desc_node_t*)obj_desc);
}
break;
default:
/* unsupported obj_desc received at target */
break;
}
}
Node Exe源代码
ownNodeUserKernelExecute()
vx_reference params[TIVX_KERNEL_MAX_PARAMS]; //TIVX_KERNEL_MAX_PARAMS:64
vx_reference parent_ref[TIVX_KERNEL_MAX_PARAMS];
status = node->kernel->function(node, prm_ref, num_params);
解读:
Node 的执行参数是 最大64个,必须是固定格式的(vx_type_e中的一个)。