![]() |
OpenVX Graph Pipelining Extension
950f130
|
Data Structures | |
| struct | _vx_event_graph_parameter_consumed |
| struct | _vx_event_graph_completed |
| struct | _vx_event_node_completed |
| struct | _vx_event_user_event |
| struct | vx_event_t |
| union | vx_event_t.event_info |
Enumerations | |
| enum | vx_event_enum_e |
| enum | vx_event_type_e |
Functions | |
| vx_status | vxWaitEvent (vx_context context, vx_event_t *event, vx_bool do_not_block) |
| vx_status | vxEnableEvents (vx_context context) |
| vx_status | vxDisableEvents (vx_context context) |
| vx_status | vxSendUserEvent (vx_context context, vx_uint32 id, void *parameter) |
| vx_status | vxRegisterEvent (vx_reference ref, enum vx_event_type_e type, vx_uint32 param) |
This section lists the APIs required for event driven graph execution.
| struct _vx_event_graph_parameter_consumed |
Parameter structure returned with event of type VX_EVENT_GRAPH_PARAMETER_CONSUMED.
Definition at line 371 of file vx_khr_pipelining.h.

| Data Fields | ||
|---|---|---|
| vx_graph | graph | graph which generated this event |
| vx_uint32 | graph_parameter_index | graph parameter index which generated this event |
| struct _vx_event_graph_completed |
Parameter structure returned with event of type VX_EVENT_GRAPH_COMPLETED.
Definition at line 384 of file vx_khr_pipelining.h.

| Data Fields | ||
|---|---|---|
| vx_graph | graph | graph which generated this event |
| struct _vx_event_node_completed |
Parameter structure returned with event of type VX_EVENT_NODE_COMPLETED.
Definition at line 394 of file vx_khr_pipelining.h.

| Data Fields | ||
|---|---|---|
| vx_graph | graph | graph which generated this event |
| vx_node | node | node which generated this event |
| struct _vx_event_user_event |
Parameter structure returned with event of type VX_EVENT_USER_EVENT.
Definition at line 407 of file vx_khr_pipelining.h.

| struct vx_event_t |
Data structure which holds event information.
Definition at line 421 of file vx_khr_pipelining.h.

| Data Fields | ||
|---|---|---|
| vx_enum | type | see event type vx_event_type_e |
| vx_uint64 | timestamp |
time at which this event was generated, in units of nano-secs |
| union vx_event_t | event_info |
parameter structure associated with a event. Depends on type of the event |
| union vx_event_t.event_info |
Definition at line 429 of file vx_khr_pipelining.h.

| Data Fields | ||
|---|---|---|
|
struct _vx_event_graph_parameter_consumed |
graph_parameter_consumed |
event information for type: VX_EVENT_GRAPH_PARAMETER_CONSUMED |
| struct _vx_event_graph_completed | graph_completed |
event information for type: VX_EVENT_GRAPH_COMPLETED |
| struct _vx_event_node_completed | node_completed |
event information for type: VX_EVENT_NODE_COMPLETED |
| struct _vx_event_user_event | user_event |
event information for type: VX_EVENT_USER |
| enum vx_event_enum_e |
Extra enums.
| Enumerator | |
|---|---|
| VX_ENUM_EVENT_TYPE |
Event Type enumeration. |
Definition at line 321 of file vx_khr_pipelining.h.
| enum vx_event_type_e |
Type of event that can be generated during system execution.
| Enumerator | |
|---|---|
| VX_EVENT_GRAPH_PARAMETER_CONSUMED |
Graph parameter consumed event. This event is generated when a data reference at a graph parameter is consumed during a graph execution. It is used to indicate that a given data reference is no longer used by the graph and can be dequeued and accessed by the application.
|
| VX_EVENT_GRAPH_COMPLETED |
Graph completion event. This event is generated every time a graph execution completes. Graph completion event is generated for both successful execution of a graph or abandoned execution of a graph. |
| VX_EVENT_NODE_COMPLETED |
Node completion event. This event is generated every time a node within a graph completes execution. |
| VX_EVENT_USER |
User defined event. This event is generated by user application outside of OpenVX framework using the vxSendUserEvent API. User events allow application to have single centralized 'wait-for' loop to handle both framework generated events as well as user generated events. |
Definition at line 330 of file vx_khr_pipelining.h.
| vx_status vxWaitEvent | ( | vx_context | context, |
| vx_event_t * | event, | ||
| vx_bool | do_not_block | ||
| ) |
Wait for a single event.
After vxDisableEvents is called, if vxWaitEvent(.. ,.. , vx_false_e) is called, vxWaitEvent will remain blocked until events are re-enabled using vxEnableEvents and a new event is received.
If vxReleaseContext is called while a application is blocked on vxWaitEvent , the behavior is not defined by OpenVX.
If vxWaitEvent is called simultaneously from multiple thread/task contexts then its behaviour is not defined by OpenVX.
| context | [in] OpenVX context |
| event | [out] Data structure which holds information about a received event |
| do_not_block | [in] When value is vx_true_e API does not block and only checks for the condition |
vx_status_e enumeration. | VX_SUCCESS | Event received and event information available in 'event' |
| VX_FAILURE | No event is received |
| vx_status vxEnableEvents | ( | vx_context | context | ) |
Enable event generation.
| context | [in] OpenVX context |
vx_status_e enumeration. | VX_SUCCESS | No errors; any other value indicates failure. |
| vx_status vxDisableEvents | ( | vx_context | context | ) |
Disable event generation.
When events are disabled, any event generated before this API is called will still be returned via vxWaitEvent API. However no additional events would be returned via vxWaitEvent API until events are enabled again.
| context | [in] OpenVX context |
vx_status_e enumeration. | VX_SUCCESS | No errors; any other value indicates failure. |
| vx_status vxSendUserEvent | ( | vx_context | context, |
| vx_uint32 | id, | ||
| void * | parameter | ||
| ) |
Generate user defined event.
| context | [in] OpenVX context |
| user_event_id | [in] User defined event ID |
| user_event_parameter | [in] User defined event parameter. NOT used by implementation. Returned to user as part vx_event_t.user_event_parameter field |
vx_status_e enumeration. | VX_SUCCESS | No errors; any other value indicates failure. |
| vx_status vxRegisterEvent | ( | vx_reference | ref, |
| enum vx_event_type_e | type, | ||
| vx_uint32 | param | ||
| ) |
Register an event to be generated.
Generation of event may need additional resources and overheads for an implementation. Hence events should be registered for references only when really required by an application.
This API can be called on graph, node or graph parameter. This API MUST be called before doing vxVerifyGraph for that graph.
| ref | [in] Reference which will generate the event |
| type | [in] Type or condition on which the event is generated |
| param | [in] Specifies the graph parameter index when type is VX_EVENT_GRAPH_PARAMETER_CONSUMED |
vx_status_e enumeration. | VX_SUCCESS | No errors; any other value indicates failure. |
| VX_ERROR_INVALID_REFERENCE | ref is not a valid vx_reference reference. |
| VX_ERROR_NOT_SUPPORTED | type is not valid for the provided reference. |