aclrtSetStreamConfigOpt
The
The
Description
Sets the value of each attribute in the stream configuration object.
Restrictions
- 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 aclrtSetStreamConfigOpt(aclrtStreamConfigHandle *handle, aclrtStreamConfigAttr attr, const void *attrValue, size_t valueSize)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
handle |
Output |
Pointer to the stream configuration object. Call aclrtCreateStreamConfigHandle to create an object in advance. |
attr |
Input |
Attribute to set. |
attrValue |
Input |
Pointer to the attr value to set. If the attribute value itself is a pointer, pass the address of the pointer. |
valueSize |
Input |
Data length of attrValue. You can use the sizeof(*attrValue) function in the C/C++ standard library to query the data length. |
Returns
The value 0 indicates success, and other values indicate failure. For details, see aclError.