Skip to content

Commit e66e77b

Browse files
committed
opal/accelerator: add synchronize_stream API
Introduce the synchronize stream operation. Signed-off-by: Wenduo Wang <wenduwan@amazon.com>
1 parent 24892cf commit e66e77b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

opal/mca/accelerator/accelerator.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,16 @@ typedef int (*opal_accelerator_base_module_create_stream_fn_t)(
175175
typedef int (*opal_accelerator_base_module_destroy_stream_fn_t)(
176176
opal_accelerator_stream_t *stream);
177177

178+
/**
179+
* Wait until a stream's operations are complete
180+
*
181+
* @param[IN] stream Stream to wait for
182+
*
183+
* @return OPAL_SUCCESS or error status on failure
184+
*/
185+
typedef int (*opal_accelerator_base_module_synchronize_stream_fn_t)(
186+
opal_accelerator_stream_t *stream);
187+
178188
/**
179189
* Creates an event. An event is a synchronization marker that can be
180190
* appended to a stream to monitor device progress or synchronize the
@@ -417,6 +427,7 @@ typedef struct {
417427

418428
opal_accelerator_base_module_create_stream_fn_t create_stream;
419429
opal_accelerator_base_module_destroy_stream_fn_t destroy_stream;
430+
opal_accelerator_base_module_synchronize_stream_fn_t synchronize_stream;
420431
opal_accelerator_base_module_create_event_fn_t create_event;
421432
opal_accelerator_base_module_record_event_fn_t record_event;
422433
opal_accelerator_base_module_query_event_fn_t query_event;

0 commit comments

Comments
 (0)