Skip to content

Commit 673b5f0

Browse files
committed
opal/accelerator: add stream_wait_event API
Introduce the operation to make stream wait on an event. Signed-off-by: Wenduo Wang <wenduwan@amazon.com>
1 parent e66e77b commit 673b5f0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

opal/mca/accelerator/accelerator.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,17 @@ typedef int (*opal_accelerator_base_module_destroy_stream_fn_t)(
185185
typedef int (*opal_accelerator_base_module_synchronize_stream_fn_t)(
186186
opal_accelerator_stream_t *stream);
187187

188+
/**
189+
* Make a stream wait on an event
190+
*
191+
* @param[IN] stream Stream to wait
192+
* @param[IN] event Event to wait on
193+
*
194+
* @return OPAL_SUCCESS or error status on failure
195+
*/
196+
typedef int (*opal_accelerator_base_module_stream_wait_event_fn_t)(
197+
opal_accelerator_stream_t *stream, opal_accelerator_event_t *event);
198+
188199
/**
189200
* Creates an event. An event is a synchronization marker that can be
190201
* appended to a stream to monitor device progress or synchronize the
@@ -428,6 +439,7 @@ typedef struct {
428439
opal_accelerator_base_module_create_stream_fn_t create_stream;
429440
opal_accelerator_base_module_destroy_stream_fn_t destroy_stream;
430441
opal_accelerator_base_module_synchronize_stream_fn_t synchronize_stream;
442+
opal_accelerator_base_module_stream_wait_event_fn_t stream_wait_event;
431443
opal_accelerator_base_module_create_event_fn_t create_event;
432444
opal_accelerator_base_module_record_event_fn_t record_event;
433445
opal_accelerator_base_module_query_event_fn_t query_event;

0 commit comments

Comments
 (0)