aclrtCreateStreamV2
The
The
Description
Creates a stream. Stream configurations can be added during stream creation.
Restrictions
- This API must be used together with other APIs to create a stream. The API call sequence is as follows:
- Call aclrtCreateStreamConfigHandle to create a stream configuration object.
- Call aclrtSetStreamConfigOpt for multiple times to set the value of each attribute in the configuration object.
- Call aclrtCreateStreamV2 to create a stream.
- After the stream is used, call aclrtDestroyStreamConfigHandle to destroy the stream configuration object and call aclrtDestroyStream to destroy the stream.
Prototype
aclError aclrtCreateStreamV2(aclrtStream *stream, const aclrtStreamConfigHandle *handle)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
stream |
Output |
Stream pointer. |
handle |
Input |
Pointer to the stream configuration object. The value must be the same as the value of handle in aclrtSetStreamConfigOpt. |
Returns
The value 0 indicates success, and other values indicate failure. For details, see aclError.
Parent topic: Stream Management