aclrtSwitchStream
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
☓ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Switches between streams based on conditions. This API is asynchronous.
After a successful switch, only the tasks on the target stream are executed, while those on the current stream are stopped.
Prototype
1 | aclError aclrtSwitchStream(void *leftValue, aclrtCondition cond, void *rightValue, aclrtCompareDataType dataType, aclrtStream trueStream, aclrtStream falseStream, aclrtStream stream) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
leftValue |
Input |
Device memory address of the left-value data. |
cond |
Input |
Comparison condition between the left-value and right-value data. For details about the type definition, see aclrtCondition. |
rightValue |
Input |
Device memory address of the right-value data. |
dataType |
Input |
Data type of the left-value and right-value data. For details about the type definition, see aclrtCompareDataType. |
trueStream |
Input |
If the condition specified by cond is met, the task on trueStream is executed. For details about the type definition, see aclrtStream. |
falseStream |
Input |
Reserved. The value is fixed at NULL. |
stream |
Input |
Stream for executing the switching task. For details about the type definition, see aclrtStream. |
Returns
0 on success; otherwise, failure. For details, see aclError.