OpenVX Graph Pipelining Extension  950f130
vx_khr_pipelining.h
1 /*
2  * Copyright (c) 2012-2017 The Khronos Group Inc.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and/or associated documentation files (the
6  * "Materials"), to deal in the Materials without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sublicense, and/or sell copies of the Materials, and to
9  * permit persons to whom the Materials are furnished to do so, subject to
10  * the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included
13  * in all copies or substantial portions of the Materials.
14  *
15  * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
16  * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
17  * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
18  * https://www.khronos.org/registry/
19  *
20  * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26  * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
27  */
28 #ifndef _OPENVX_PIPELINING_H_
29 #define _OPENVX_PIPELINING_H_
30 
31 /*!
32  * \file
33  * \brief The OpenVX Pipelining, Streaming and Batch Processing extension API.
34  */
35 
36 #define OPENVX_KHR_PIPELINING "vx_khr_pipelining"
37 
38 #include <VX/vx.h>
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 /*
45  * PIPELINING API
46  */
47 
48 /*! \brief The Pipelining, Streaming and Batch Processing Extension Library Set
49  *
50  * \ingroup group_pipelining
51  */
52 #define VX_LIBRARY_KHR_PIPELINING_EXTENSION (0x1)
53 
54 
55 /*! \brief Extra enums.
56  *
57  * \ingroup group_pipelining
58  */
60 {
61  VX_ENUM_GRAPH_SCHEDULE_MODE_TYPE = 0x1E, /*!< \brief Graph schedule mode type enumeration. */
62 };
63 
64 /*! \brief Type of graph scheduling mode
65  *
66  * See <tt>\ref vxSetGraphScheduleConfig</tt> and <tt>\ref vxGraphParameterEnqueueReadyRef</tt> for details about each mode.
67  *
68  * \ingroup group_pipelining
69  */
71 
72  /*! \brief Schedule graph in non-queueing mode
73  */
74  VX_GRAPH_SCHEDULE_MODE_NORMAL = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_GRAPH_SCHEDULE_MODE_TYPE << 12)) + 0x0,
75 
76  /*! \brief Schedule graph in queueing mode with auto scheduling
77  */
78  VX_GRAPH_SCHEDULE_MODE_QUEUE_AUTO = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_GRAPH_SCHEDULE_MODE_TYPE << 12)) + 0x1,
79 
80  /*! \brief Schedule graph in queueing mode with manual scheduling
81  */
82  VX_GRAPH_SCHEDULE_MODE_QUEUE_MANUAL = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_GRAPH_SCHEDULE_MODE_TYPE << 12)) + 0x2,
83 };
84 
85 /*! \brief The graph attributes added by this extension.
86  * \ingroup group_pipelining
87  */
89  /*! \brief Returns the schedule mode of a graph. Read-only. Use a <tt>\ref vx_enum</tt> parameter.
90  * See <tt>\ref vx_graph_schedule_mode_type_e </tt> enum.
91  * */
92  VX_GRAPH_SCHEDULE_MODE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_GRAPH) + 0x5,
93 };
94 
95 /*! \brief Queueing parameters for a specific graph parameter
96  *
97  * See <tt>\ref vxSetGraphScheduleConfig</tt> for additional details.
98  *
99  * \ingroup group_pipelining
100  */
101 typedef struct {
102 
104  /*!< \brief Index of graph parameter to which these properties apply */
105 
106  vx_uint32 refs_list_size;
107  /*!< \brief Number of elements in array 'refs_list' */
108 
109  vx_reference *refs_list;
110  /*!< \brief Array of references that could be enqueued at a later point of time at this graph parameter */
111 
113 
114 /*! \brief Sets the graph scheduler config
115  *
116  * This API is used to set the graph scheduler config to
117  * allow user to schedule multiple instances of a graph for execution.
118  *
119  * For legacy applications that don't need graph pipelining or batch processing,
120  * this API need not be used.
121  *
122  * Using this API, the application specifies the graph schedule mode, as well as
123  * queueing parameters for all graph parameters that need to allow enqueueing of references.
124  * A single monolithic API is provided instead of discrete APIs, since this allows
125  * the implementation to get all information related to scheduling in one shot and
126  * then optimize the subsequent graph scheduling based on this information.
127  * <b> This API MUST be called before graph verify </b> since
128  * in this case it allows implementations the opportunity to optimize resources based on
129  * information provided by the application.
130  *
131  * 'graph_schedule_mode' selects how input and output references are provided to a graph and
132  * how the next graph schedule is triggered by an implementation.
133  *
134  * Below scheduling modes are supported:
135  *
136  * When graph schedule mode is <tt>\ref VX_GRAPH_SCHEDULE_MODE_QUEUE_AUTO</tt>:
137  * - Application needs to explicitly call <tt>\ref vxVerifyGraph</tt> before enqueing data references
138  * - Application should not call <tt>\ref vxScheduleGraph</tt> or <tt>\ref vxProcessGraph</tt>
139  * - When enough references are enqueued at various graph parameters, the implementation
140  * could trigger the next graph schedule.
141  * - Here, not all graph parameters need to have enqueued references for a graph schedule to begin.
142  * An implementation is expected to execute the graph as much as possible until a enqueued reference
143  * is not available at which time it will stall the graph until the reference becomes available.
144  * This allows application to schedule a graph even when all parameters references are
145  * not yet available, i.e do a 'late' enqueue. However, exact behaviour is implementation specific.
146  *
147  * When graph schedule mode is <tt>\ref VX_GRAPH_SCHEDULE_MODE_QUEUE_MANUAL</tt>:
148  * - Application needs to explicitly call <tt>\ref vxScheduleGraph</tt>
149  * - Application should not call <tt>\ref vxProcessGraph</tt>
150  * - References for all graph parameters of the graph needs to enqueued before <tt>\ref vxScheduleGraph</tt>
151  * is called on the graph else an error is returned by <tt>\ref vxScheduleGraph</tt>
152  * - Application can enqueue multiple references at the same graph parameter.
153  * When <tt>\ref vxScheduleGraph</tt> is called, all enqueued references get processed in a 'batch'.
154  * - User can use <tt>\ref vxWaitGraph</tt> to wait for the previous <tt>\ref vxScheduleGraph</tt>
155  * to complete.
156  *
157  * When graph schedule mode is <tt>\ref VX_GRAPH_SCHEDULE_MODE_NORMAL</tt>:
158  * - 'graph_parameters_list_size' MUST be 0 and
159  * - 'graph_parameters_queue_params_list' MUST be NULL
160  * - This mode is equivalent to non-queueing scheduling mode as defined by OpenVX v1.2 and earlier.
161  *
162  * By default all graphs are in VX_GRAPH_SCHEDULE_MODE_NORMAL mode until this API is called.
163  *
164  * 'graph_parameters_queue_params_list' allows to specify below information:
165  * - For the graph parameter index that is specified, it enables queueing mode of operation
166  * - Further it allows the application to specify the list of references that it could later
167  * enqueue at this graph parameter.
168  *
169  * For graph parameters listed in 'graph_parameters_queue_params_list',
170  * application MUST use <tt>\ref vxGraphParameterEnqueueReadyRef</tt> to
171  * set references at the graph parameter. Using other data access API's on
172  * these parameters or corresponding data objects will return an error.
173  * For graph parameters not listed in 'graph_parameters_queue_params_list'
174  * application MUST use the <tt>\ref vxSetGraphParameterByIndex</tt> to set the reference
175  * at the graph parameter. Using other data access API's on these parameters or
176  * corresponding data objects will return an error.
177  *
178  * This API also allows application to provide a list of references which could be later
179  * enqueued at the graph parameter. This allows implementation to do meta-data checking
180  * up front rather than during each reference enqueue.
181  *
182  * When this API is called before <tt>\ref vxVerifyGraph</tt>, the 'refs_list' field
183  * can be NULL, if the reference handles are not available yet at the application.
184  * However 'refs_list_size' MUST always be specified by the application.
185  * Application can call <tt>\ref vxSetGraphScheduleConfig</tt> again after verify graph
186  * with all parameters remaining the same except with 'refs_list' field providing
187  * the list of references that can be enqueued at the graph parameter.
188  *
189  * \param [in] graph Graph reference
190  * \param [in] graph_schedule_mode Graph schedule mode. See <tt>\ref vx_graph_schedule_mode_type_e</tt>
191  * \param [in] graph_parameters_list_size Number of elements in graph_parameters_queue_params_list
192  * \param [in] graph_parameters_queue_params_list Array containing queuing properties at graph parameters that need to support queueing.
193  *
194  * \return A <tt>\ref vx_status_e</tt> enumeration.
195  * \retval VX_SUCCESS No errors.
196  * \retval VX_ERROR_INVALID_REFERENCE graph is not a valid reference
197  * \retval VX_ERROR_INVALID_PARAMETERS Invalid graph parameter queueing parameters
198  * \retval VX_FAILURE Any other failure.
199  *
200  * \ingroup group_pipelining
201  */
202 VX_API_ENTRY vx_status vxSetGraphScheduleConfig(
203  vx_graph graph,
204  vx_enum graph_schedule_mode,
205  uint32_t graph_parameters_list_size,
206  const vx_graph_parameter_queue_params_t graph_parameters_queue_params_list[]
207  );
208 
209 /*! \brief Enqueues new references into a graph parameter for processing
210  *
211  * This new reference will take effect on the next graph schedule.
212  *
213  * In case of a graph parameter which is input to a graph, this function provides
214  * a data reference with new input data to the graph.
215  * In case of a graph parameter which is not input to a graph, this function provides
216  * a 'empty' reference into which a graph execution can write new data into.
217  *
218  * This function essentially transfers ownership of the reference from the application to the graph.
219  *
220  * User MUST use <tt>vxGraphParameterDequeueDoneRef</tt> to get back the
221  * processed or consumed references.
222  *
223  * The references that are enqueued MUST be the references listed during
224  * <tt>\ref vxSetGraphScheduleConfig</tt>. If a reference outside this list is provided then
225  * behaviour is undefined.
226  *
227  * \param [in] graph Graph reference
228  * \param [in] graph_parameter_index Graph parameter index
229  * \param [in] refs The array of references to enqueue into the graph parameter
230  * \param [in] num_refs Number of references to enqueue
231  *
232  * \return A <tt>\ref vx_status_e</tt> enumeration.
233  * \retval VX_SUCCESS No errors.
234  * \retval VX_ERROR_INVALID_REFERENCE graph is not a valid reference OR reference is not a valid reference
235  * \retval VX_ERROR_INVALID_PARAMETERS graph_parameter_index is NOT a valid graph parameter index
236  * \retval VX_FAILURE Reference could not be enqueued.
237  *
238  * \ingroup group_pipelining
239  */
240 VX_API_ENTRY vx_status VX_API_CALL vxGraphParameterEnqueueReadyRef(vx_graph graph,
241  vx_uint32 graph_parameter_index,
242  vx_reference *refs,
243  vx_uint32 num_refs);
244 
245 
246 
247 /*! \brief Dequeues 'consumed' references from a graph parameter
248  *
249  * This function dequeues references from a graph parameter of a graph.
250  * The reference that is dequeued is a reference that had been previously enqueued into a graph,
251  * and after subsequent graph execution is considered as processed or consumed by the graph.
252  * This function essentially transfers ownership of the reference from the graph to the application.
253  *
254  * <b> IMPORTANT </b> : This API will block until at least one reference is dequeued.
255  *
256  * In case of a graph parameter which is input to a graph, this function provides
257  * a 'consumed' buffer to the application so that new input data can filled
258  * and later enqueued to the graph.
259  * In case of a graph parameter which is not input to a graph, this function provides
260  * a reference filled with new data based on graph execution. User can then use this
261  * newly generated data with their application. Typically when this new data is
262  * consumed by the application the 'empty' reference is again enqueued to the graph.
263  *
264  * This API returns an array of references up to a maximum of 'max_refs'. Application MUST ensure
265  * the array pointer ('refs') passed as input can hold 'max_refs'.
266  * 'num_refs' is actual number of references returned and will be <= 'max_refs'.
267  *
268  *
269  * \param [in] graph Graph reference
270  * \param [in] graph_parameter_index Graph parameter index
271  * \param [in] refs Pointer to an array of max elements 'max_refs'
272  * \param [out] refs Dequeued references filled in the array
273  * \param [in] max_refs Max number of references to dequeue
274  * \param [out] num_refs Actual number of references dequeued.
275  *
276  * \return A <tt>\ref vx_status_e</tt> enumeration.
277  * \retval VX_SUCCESS No errors.
278  * \retval VX_ERROR_INVALID_REFERENCE graph is not a valid reference
279  * \retval VX_ERROR_INVALID_PARAMETERS graph_parameter_index is NOT a valid graph parameter index
280  * \retval VX_FAILURE Reference could not be dequeued.
281  *
282  * \ingroup group_pipelining
283  */
284 VX_API_ENTRY vx_status VX_API_CALL vxGraphParameterDequeueDoneRef(vx_graph graph,
285  vx_uint32 graph_parameter_index,
286  vx_reference *refs,
287  vx_uint32 max_refs,
288  vx_uint32 *num_refs);
289 
290 /*! \brief Checks and returns the number of references that are ready for dequeue
291  *
292  * This function checks the number of references that can be dequeued and
293  * returns the value to the application.
294  *
295  * See also <tt>\ref vxGraphParameterDequeueDoneRef</tt>.
296  *
297  * \param [in] graph Graph reference
298  * \param [in] graph_parameter_index Graph parameter index
299  * \param [out] num_refs Number of references that can be dequeued using
300  *
301  * \return A <tt>\ref vx_status_e</tt> enumeration.
302  * \retval VX_SUCCESS No errors.
303  * \retval VX_ERROR_INVALID_REFERENCE graph is not a valid reference
304  * \retval VX_ERROR_INVALID_PARAMETERS graph_parameter_index is NOT a valid graph parameter index
305  * \retval VX_FAILURE Any other failure.
306  *
307  * \ingroup group_pipelining
308  */
309 VX_API_ENTRY vx_status VX_API_CALL vxGraphParameterCheckDoneRef(vx_graph graph,
310  vx_uint32 graph_parameter_index,
311  vx_uint32 *num_refs);
312 
313 /*
314  * EVENT QUEUE API
315  */
316 
317 /*! \brief Extra enums.
318  *
319  * \ingroup group_event
320  */
322 {
323  VX_ENUM_EVENT_TYPE = 0x1D, /*!< \brief Event Type enumeration. */
324 };
325 
326 /*! \brief Type of event that can be generated during system execution
327  *
328  * \ingroup group_event
329  */
331 
332  /*! \brief Graph parameter consumed event
333  *
334  * This event is generated when a data reference at a graph parameter
335  * is consumed during a graph execution.
336  * It is used to indicate that a given data reference is no longer used by the graph and can be
337  * dequeued and accessed by the application.
338  *
339  * \note Graph execution could still be "in progress" for rest of the graph that does not use
340  * this data reference.
341  */
342  VX_EVENT_GRAPH_PARAMETER_CONSUMED = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_EVENT_TYPE << 12)) + 0x0,
343 
344  /*! \brief Graph completion event
345  *
346  * This event is generated every time a graph execution completes.
347  * Graph completion event is generated for both successful execution of a graph
348  * or abandoned execution of a graph.
349  */
350  VX_EVENT_GRAPH_COMPLETED = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_EVENT_TYPE << 12)) + 0x1,
351 
352  /*! \brief Node completion event
353  *
354  * This event is generated every time a node within a graph completes execution.
355  */
356  VX_EVENT_NODE_COMPLETED = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_EVENT_TYPE << 12)) + 0x2,
357 
358  /*! \brief User defined event
359  *
360  * This event is generated by user application outside of OpenVX framework using the \ref vxSendUserEvent API.
361  * User events allow application to have single centralized 'wait-for' loop to handle
362  * both framework generated events as well as user generated events.
363  */
364  VX_EVENT_USER = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_EVENT_TYPE << 12)) + 0x3
365 };
366 
367 /*! \brief Parameter structure returned with event of type VX_EVENT_GRAPH_PARAMETER_CONSUMED
368  *
369  * \ingroup group_event
370  */
372 
373  vx_graph graph;
374  /*!< \brief graph which generated this event */
375 
377  /*!< \brief graph parameter index which generated this event */
378 };
379 
380 /*! \brief Parameter structure returned with event of type VX_EVENT_GRAPH_COMPLETED
381  *
382  * \ingroup group_event
383  */
385 
386  vx_graph graph;
387  /*!< \brief graph which generated this event */
388 };
389 
390 /*! \brief Parameter structure returned with event of type VX_EVENT_NODE_COMPLETED
391  *
392  * \ingroup group_event
393  */
395 
396  vx_graph graph;
397  /*!< \brief graph which generated this event */
398 
399  vx_node node;
400  /*!< \brief node which generated this event */
401 };
402 
403 /*! \brief Parameter structure returned with event of type VX_EVENT_USER_EVENT
404  *
405  * \ingroup group_event
406  */
408 
409  vx_uint32 user_event_id;
410  /*!< \brief user event ID associated with this event */
411 
413  /*!< \brief User defined parameter value. This is used to pass additional user defined parameters with a user event.
414  */
415 };
416 
417 /*! \brief Data structure which holds event information
418  *
419  * \ingroup group_event
420  */
421 typedef struct _vx_event {
422 
423  vx_enum type;
424  /*!< \brief see event type \ref vx_event_type_e */
425 
426  vx_uint64 timestamp;
427  /*!< time at which this event was generated, in units of nano-secs */
428 
429  union {
430  struct _vx_event_graph_parameter_consumed graph_parameter_consumed; /*!< event information for type: \ref VX_EVENT_GRAPH_PARAMETER_CONSUMED */
431  struct _vx_event_graph_completed graph_completed; /*!< event information for type: \ref VX_EVENT_GRAPH_COMPLETED */
432  struct _vx_event_node_completed node_completed; /*!< event information for type: \ref VX_EVENT_NODE_COMPLETED */
433  struct _vx_event_user_event user_event; /*!< event information for type: \ref VX_EVENT_USER */
434  } event_info;
435  /*!< parameter structure associated with a event. Depends on type of the event */
436 
437 } vx_event_t;
438 
439 /*! \brief Wait for a single event
440  *
441  * After <tt> \ref vxDisableEvents </tt> is called, if <tt> \ref vxWaitEvent(.. ,.. , vx_false_e) </tt> is called,
442  * <tt> \ref vxWaitEvent </tt> will remain blocked until events are re-enabled using <tt> \ref vxEnableEvents </tt>
443  * and a new event is received.
444  *
445  * If <tt> \ref vxReleaseContext </tt> is called while a application is blocked on <tt> \ref vxWaitEvent </tt>, the
446  * behavior is not defined by OpenVX.
447  *
448  * If <tt> \ref vxWaitEvent </tt> is called simultaneously from multiple thread/task contexts
449  * then its behaviour is not defined by OpenVX.
450  *
451  * \param context [in] OpenVX context
452  * \param event [out] Data structure which holds information about a received event
453  * \param do_not_block [in] When value is vx_true_e API does not block and only checks for the condition
454  *
455  * \return A <tt>\ref vx_status_e</tt> enumeration.
456  * \retval VX_SUCCESS Event received and event information available in 'event'
457  * \retval VX_FAILURE No event is received
458  *
459  * \ingroup group_event
460  */
461 VX_API_ENTRY vx_status VX_API_CALL vxWaitEvent(vx_context context, vx_event_t *event, vx_bool do_not_block);
462 
463 /*! \brief Enable event generation
464  *
465  * \param context [in] OpenVX context
466  *
467  * \return A <tt>\ref vx_status_e</tt> enumeration.
468  * \retval VX_SUCCESS No errors; any other value indicates failure.
469  *
470  * \ingroup group_event
471  */
472 VX_API_ENTRY vx_status VX_API_CALL vxEnableEvents(vx_context context);
473 
474 /*! \brief Disable event generation
475  *
476  * When events are disabled, any event generated before this API is
477  * called will still be returned via \ref vxWaitEvent API.
478  * However no additional events would be returned via \ref vxWaitEvent API
479  * until events are enabled again.
480  *
481  * \param context [in] OpenVX context
482  *
483  * \return A <tt>\ref vx_status_e</tt> enumeration.
484  * \retval VX_SUCCESS No errors; any other value indicates failure.
485  *
486  * \ingroup group_event
487  */
488 VX_API_ENTRY vx_status VX_API_CALL vxDisableEvents(vx_context context);
489 
490 /*! \brief Generate user defined event
491  *
492  * \param context [in] OpenVX context
493  * \param user_event_id [in] User defined event ID
494  * \param user_event_parameter [in] User defined event parameter. NOT used by implementation.
495  * Returned to user as part \ref vx_event_t.user_event_parameter field
496  *
497  * \return A <tt>\ref vx_status_e</tt> enumeration.
498  * \retval VX_SUCCESS No errors; any other value indicates failure.
499  *
500  * \ingroup group_event
501  */
502 VX_API_ENTRY vx_status VX_API_CALL vxSendUserEvent(vx_context context, vx_uint32 id, void *parameter);
503 
504 
505 /*! \brief Register an event to be generated
506  *
507  * Generation of event may need additional resources and overheads for an implementation.
508  * Hence events should be registered for references only when really required by an application.
509  *
510  * This API can be called on graph, node or graph parameter.
511  * This API MUST be called before doing \ref vxVerifyGraph for that graph.
512  *
513  * \param ref [in] Reference which will generate the event
514  * \param type [in] Type or condition on which the event is generated
515  * \param param [in] Specifies the graph parameter index when type is VX_EVENT_GRAPH_PARAMETER_CONSUMED
516  *
517  * \return A <tt>\ref vx_status_e</tt> enumeration.
518  * \retval VX_SUCCESS No errors; any other value indicates failure.
519  * \retval VX_ERROR_INVALID_REFERENCE ref is not a valid <tt>\ref vx_reference</tt> reference.
520  * \retval VX_ERROR_NOT_SUPPORTED type is not valid for the provided reference.
521  *
522  * \ingroup group_event
523  */
524 VX_API_ENTRY vx_status VX_API_CALL vxRegisterEvent(vx_reference ref, enum vx_event_type_e type, vx_uint32 param);
525 
526 /*
527  * STREAMING API
528  */
529 
530 /*! \brief Start streaming mode of graph execution
531  *
532  * In streaming mode of graph execution, once a application starts graph execution
533  * further intervention of the application is not needed to re-schedule a graph;
534  * i.e. a graph re-schedules itself and executes continuously until streaming mode of execution is stopped.
535  *
536  * When this API is called, the framework schedules the graph via <tt>\ref vxScheduleGraph</tt> and
537  * returns.
538  * This graph gets re-scheduled continuously until <tt>\ref vxStopGraphStreaming</tt> is called by the user
539  * or any of the graph nodes return error during execution.
540  *
541  * The graph MUST be verified via \ref vxVerifyGraph before calling this API.
542  * Also user application MUST ensure no previous executions of the graph are scheduled before calling this API.
543  *
544  * After streaming mode of a graph has been started, the following APIs should \a \b not be used on that graph by an application:
545  * <tt>\ref vxScheduleGraph</tt>, <tt>\ref vxWaitScheduleGraphDone</tt>, and
546  * <tt>\ref vxIsScheduleGraphAllowed</tt>.
547  *
548  * <tt>\ref vxWaitGraph</tt> can be used as before to wait for all pending graph executions
549  * to complete.
550  *
551  * \param graph [in] Reference to the graph to start streaming mode of execution.
552  *
553  * \return A <tt>\ref vx_status_e</tt> enumeration.
554  * \retval VX_SUCCESS No errors; any other value indicates failure.
555  * \retval VX_ERROR_INVALID_REFERENCE graph is not a valid <tt>\ref vx_graph</tt> reference.
556  *
557  * \ingroup group_streaming
558  */
559 VX_API_ENTRY vx_status vxStartGraphStreaming(vx_graph graph);
560 
561 
562 /*! \brief Stop streaming mode of graph execution
563  *
564  * This function blocks until graph execution is gracefully stopped at a logical boundary, for example,
565  * when all internally scheduled graph executions are completed.
566  *
567  * \param graph [in] Reference to the graph to stop streaming mode of execution.
568  *
569  * \return A <tt>\ref vx_status_e</tt> enumeration.
570  * \retval VX_SUCCESS No errors; any other value indicates failure.
571  * \retval VX_FAILURE Graph is not started in streaming execution mode.
572  * \retval VX_ERROR_INVALID_REFERENCE graph is not a valid reference.
573  *
574  * \ingroup group_streaming
575  */
576 VX_API_ENTRY vx_status vxStopGraphStreaming(vx_graph graph);
577 
578 #ifdef __cplusplus
579 }
580 #endif
581 
582 #endif
vx_status vxGraphParameterCheckDoneRef(vx_graph graph, vx_uint32 graph_parameter_index, vx_uint32 *num_refs)
Checks and returns the number of references that are ready for dequeue.
vx_uint64 timestamp
vx_status vxWaitEvent(vx_context context, vx_event_t *event, vx_bool do_not_block)
Wait for a single event.
vx_uint32 graph_parameter_index
graph parameter index which generated this event
Parameter structure returned with event of type VX_EVENT_NODE_COMPLETED.
Graph parameter consumed event.
vx_graph graph
graph which generated this event
Graph schedule mode type enumeration.
vx_status vxDisableEvents(vx_context context)
Disable event generation.
vx_enum type
see event type vx_event_type_e
vx_status vxRegisterEvent(vx_reference ref, enum vx_event_type_e type, vx_uint32 param)
Register an event to be generated.
Parameter structure returned with event of type VX_EVENT_GRAPH_PARAMETER_CONSUMED.
vx_event_type_e
Type of event that can be generated during system execution.
vx_reference * refs_list
Array of references that could be enqueued at a later point of time at this graph parameter...
Schedule graph in non-queueing mode.
vx_status vxStopGraphStreaming(vx_graph graph)
Stop streaming mode of graph execution.
vx_node node
node which generated this event
vx_graph_schedule_mode_type_e
Type of graph scheduling mode.
vx_graph_attribute_pipelining_e
The graph attributes added by this extension.
Data structure which holds event information.
vx_uint32 user_event_id
user event ID associated with this event
Event Type enumeration.
Schedule graph in queueing mode with manual scheduling.
Schedule graph in queueing mode with auto scheduling.
uint32_t graph_parameter_index
Index of graph parameter to which these properties apply.
User defined event.
Node completion event.
vx_graph graph
graph which generated this event
vx_graph graph
graph which generated this event
vx_status vxStartGraphStreaming(vx_graph graph)
Start streaming mode of graph execution.
vx_graph_schedule_mode_enum_e
Extra enums.
Returns the schedule mode of a graph. Read-only. Use a vx_enum parameter. See vx_graph_schedule_mode_...
vx_status vxSendUserEvent(vx_context context, vx_uint32 id, void *parameter)
Generate user defined event.
Graph completion event.
vx_uint32 refs_list_size
Number of elements in array &#39;refs_list&#39;.
vx_status vxGraphParameterDequeueDoneRef(vx_graph graph, vx_uint32 graph_parameter_index, vx_reference *refs, vx_uint32 max_refs, vx_uint32 *num_refs)
Dequeues &#39;consumed&#39; references from a graph parameter.
Parameter structure returned with event of type VX_EVENT_USER_EVENT.
vx_status vxEnableEvents(vx_context context)
Enable event generation.
vx_status vxGraphParameterEnqueueReadyRef(vx_graph graph, vx_uint32 graph_parameter_index, vx_reference *refs, vx_uint32 num_refs)
Enqueues new references into a graph parameter for processing.
Parameter structure returned with event of type VX_EVENT_GRAPH_COMPLETED.
vx_status vxSetGraphScheduleConfig(vx_graph graph, vx_enum graph_schedule_mode, uint32_t graph_parameters_list_size, const vx_graph_parameter_queue_params_t graph_parameters_queue_params_list[])
Sets the graph scheduler config.
vx_event_enum_e
Extra enums.
void * user_event_parameter
User defined parameter value. This is used to pass additional user defined parameters with a user eve...
Queueing parameters for a specific graph parameter.