Function: destroy_stream
Applicability
|
Product |
Supported (√/x) |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function Usage
Destroys a stream created by the acl.rt.create_stream or acl.rt.create_stream_with_config call. If there are unfinished tasks on the stream, the stream is destroyed after the tasks are complete.
Prototype
- C Prototype
1aclError aclrtDestroyStream(aclrtStream stream)
- Python Function
1ret = acl.rt.destroy_stream(stream)
Parameter Description
|
Parameter |
Description |
|---|---|
|
stream |
Int, pointer address of the stream to be destroyed. |
Return Value Description
|
Return Value |
Description |
|---|---|
|
ret |
Int, error code: 0 on success; else, failure. |
Restrictions
- Before calling acl.rt.destroy_stream to destroy a specified stream, call acl.rt.synchronize_stream to ensure that all tasks in the stream are completely executed.
- When calling acl.rt.destroy_stream to destroy a specified stream, ensure that the stream is in the current context.
- When calling acl.rt.destroy_stream to destroy a specified stream, ensure that the stream is not being used by other APIs.
Parent topic: Streams Management