TIOVX User Guide
|
Internal APIs for graph operations.
Data Structures | |
struct | tivx_graph_t |
The top level data for graph object. More... | |
Functions | |
int32_t | ownGraphGetFreeNodeIndex (vx_graph graph) |
Get next free node entry in graph. More... | |
vx_status | ownGraphAddNode (vx_graph graph, vx_node node, int32_t index) |
Add's a node to a graph. More... | |
vx_status | ownGraphAddSuperNode (vx_graph graph, tivx_super_node super_node) |
Add's a super node to a graph. More... | |
vx_status | ownGraphRemoveNode (vx_graph graph, vx_node node) |
Remove a node from a graph. More... | |
void | ownGraphTopologicalSort (tivx_graph_sort_context *context, vx_node *nodes, uint32_t num_nodes, vx_bool *has_cycle) |
Perform topological sort of graph nodes. More... | |
vx_uint32 | ownGraphGetPipeDepth (vx_graph graph) |
Query the leaf nodes of the graph for their depth to find the total depth of the graph. More... | |
vx_bool | ownGraphCheckIsRefMatch (vx_graph graph, vx_reference ref1, vx_reference ref2) |
Abstracted check for checking if references match "vx_true_e" will be returned if references match or if references parent object matches. More... | |
void | ownGraphCheckContinuityOfSupernode (tivx_graph_sort_context *context, tivx_super_node super_node, uint32_t num_nodes, vx_bool *is_continuous) |
Perform topological sort of graph nodes. More... | |
void | ownGraphCheckSupernodeCycles (tivx_graph_sort_context *context, const vx_node *nodes, uint32_t num_nodes, vx_bool *has_cycle) |
Perform topological sort of graph nodes after supernodes have been inserted. More... | |
vx_status | ownGraphSuperNodeConfigure (vx_graph graph) |
Configure Supernode. More... | |
void | ownGraphSetReverify (vx_graph graph) |
Mark graph to be reverified. | |
tivx_data_ref_queue | ownGraphGetParameterDataRefQueue (vx_graph graph, vx_uint32 graph_parameter_index) |
If a data ref queue is associated with 'graph_parameter_index' return it. More... | |
vx_status | ownGraphAllocAndEnqueueObjDescForPipeline (vx_graph graph) |
Alloc and enqueue graph obj desc based on graph pipeline depth. | |
vx_status | ownGraphAllocForStreaming (vx_graph graph) |
Alloc objects for graph streaming. | |
vx_status | ownGraphVerifyStreamingMode (vx_graph graph) |
verify graph schedule mode with streaming | |
void | ownGraphFreeObjDesc (vx_graph graph) |
Free graph obj desc based allocated during ownGraphAllocAndEnqueueObjDescForPipeline() | |
void | ownGraphFreeStreaming (vx_graph graph) |
Free graph streaming objects. | |
vx_status | ownGraphCreateQueues (vx_graph graph) |
Create queues to maintain submitted graph desc and free graph desc. | |
void | ownGraphDeleteQueues (vx_graph graph) |
Delete queues created during ownGraphCreateQueues. | |
vx_status | ownGraphScheduleGraph (vx_graph graph, uint32_t num_schedule) |
Schedule a graph for execution 'num_schedule' times. | |
vx_status | ownGraphScheduleGraphWrapper (vx_graph graph) |
Wrapper for ownGraphScheduleGraph. | |
vx_bool | ownCheckGraphCompleted (vx_graph graph, uint32_t pipeline_id) |
Check if a previoulsy scehduled graph execution is complete. More... | |
vx_bool | ownGraphDoScheduleGraphAfterEnqueue (vx_graph graph, uint32_t graph_parameter_index) |
Check if a graph should be scheduled after a graph parameter has been enqueued. More... | |
vx_status | ownUpdateGraphPerf (vx_graph graph, uint32_t pipeline_id) |
Update graph performance. | |
void | ownGraphClearState (vx_graph graph, uint32_t pipeline_id) |
Graph execution state for given pipeline ID. | |
void | ownSetGraphState (vx_graph graph, uint32_t pipeline_id, vx_enum state) |
Set graph state for a given pipeline ID. | |
vx_status | ownGraphRegisterCompletionEvent (vx_graph graph, vx_uint32 app_value) |
Register event on graph completion. | |
vx_status | ownGraphRegisterParameterConsumedEvent (vx_graph graph, uint32_t graph_parameter_index, vx_uint32 app_value) |
Register event on graph parameter consumed. | |
void | ownSendGraphCompletedEvent (vx_graph graph) |
Send graph completion event if enabled. | |
vx_status | ownGraphParameterCheckValidEnqueueRef (vx_graph graph, uint32_t graph_parameter_index, vx_reference ref) |
Checks if 'ref' is valid ref that can be enqueued. More... | |
uint32_t | ownGraphGetNumSchedule (vx_graph graph) |
Counts number of enqueued 'refs' and returns number of times graph can be scheduled sucessfully. More... | |
vx_status | ownGraphValidatePipelineParameters (vx_graph graph) |
Checks for invalid pipelining conditions (see: TIOVX-726) | |
void | ownGraphDetectAndSetNumBuf (vx_graph graph) |
Sets buffers automatically if not already set (see: TIOVX-903) | |
vx_status VX_API_CALL | tivxSendUserGraphEvent (vx_graph graph, vx_uint32 app_value, const void *parameter) |
Sends user event to graph event queue. | |
vx_status VX_API_CALL | tivxWaitGraphEvent (vx_graph graph, vx_event_t *event, vx_bool do_not_block) |
Waits for user event from graph event queue. | |
int32_t ownGraphGetFreeNodeIndex | ( | vx_graph | graph | ) |
Get next free node entry in graph.
graph | [in] graph object |
Add's a node to a graph.
'index' should be the one that is returned via ownGraphGetFreeNodeIndex()
graph | [in] graph object |
node | [in] the node to add |
index | [in] the index in graph at which to add the node |
vx_status ownGraphAddSuperNode | ( | vx_graph | graph, |
tivx_super_node | super_node | ||
) |
Add's a super node to a graph.
graph | [in] graph object |
super_node | [in] the super node to add |
Remove a node from a graph.
graph | [in] graph object |
node | [in] the node to remove |
void ownGraphTopologicalSort | ( | tivx_graph_sort_context * | context, |
vx_node * | nodes, | ||
uint32_t | num_nodes, | ||
vx_bool * | has_cycle | ||
) |
Perform topological sort of graph nodes.
context | [in] context to use while sorting |
nodes | [in,out] IN: Unsorted node, OUT: Sorted nodes |
num_nodes | [in] Number of nodes |
has_cycle | [out] vx_true_e: Graph has cycles and cannot be sorted vx_false_e: Graph is acyclic and nodes[] contains the sorted nodes |
Query the leaf nodes of the graph for their depth to find the total depth of the graph.
graph | [in] graph object |
vx_bool ownGraphCheckIsRefMatch | ( | vx_graph | graph, |
vx_reference | ref1, | ||
vx_reference | ref2 | ||
) |
Abstracted check for checking if references match "vx_true_e" will be returned if references match or if references parent object matches.
graph | [in] graph in which to check if refs match |
ref1 | [in] first reference |
ref2 | [in] second reference |
void ownGraphCheckContinuityOfSupernode | ( | tivx_graph_sort_context * | context, |
tivx_super_node | super_node, | ||
uint32_t | num_nodes, | ||
vx_bool * | is_continuous | ||
) |
Perform topological sort of graph nodes.
context | [in] context to use while seaching |
super_node | [in] super node |
num_nodes | [in] Number of nodes |
has_cycle | [out] vx_true_e: Super node nodes are connected vx_false_e: Super node nodes are not connected |
void ownGraphCheckSupernodeCycles | ( | tivx_graph_sort_context * | context, |
const vx_node * | nodes, | ||
uint32_t | num_nodes, | ||
vx_bool * | has_cycle | ||
) |
Perform topological sort of graph nodes after supernodes have been inserted.
context | [in] context to use while sorting |
nodes | [in] nodes in graph |
num_nodes | [in] Number of nodes |
has_cycle | [out] vx_true_e: Graph has cycles vx_false_e: Graph is acyclic |
Configure Supernode.
graph | [in] graph in which to configure any supernodes |
tivx_data_ref_queue ownGraphGetParameterDataRefQueue | ( | vx_graph | graph, |
vx_uint32 | graph_parameter_index | ||
) |
If a data ref queue is associated with 'graph_parameter_index' return it.
If a data ref queue is NOT associated with 'graph_parameter_index' NULL is returned
Check if a previoulsy scehduled graph execution is complete.
Called every time a leaf node completes execution. When all leaf nodes complete execution a graph is said to be completed
Check if a graph should be scheduled after a graph parameter has been enqueued.
This returns true only when graph execution mode is VX_GRAPH_SCHEDULE_MODE_QUEUE_AUTO and graph_parameter_index is the graph parameter which acts as a trigger for auto scheduling.
vx_status ownGraphParameterCheckValidEnqueueRef | ( | vx_graph | graph, |
uint32_t | graph_parameter_index, | ||
vx_reference | ref | ||
) |
Checks if 'ref' is valid ref that can be enqueued.
'ref' is compared against pre-registered ref's that can be enqueued to confirm that ref can be enqueued.
uint32_t ownGraphGetNumSchedule | ( | vx_graph | graph | ) |
Counts number of enqueued 'refs' and returns number of times graph can be scheduled sucessfully.
Value returned is minimum of number of refs enqueued at each graph parameter Valid only in VX_GRAPH_SCHEDULE_MODE_QUEUE_MANUAL mode