aclrtSwitchLabelByIndex
Applicability
Product |
Supported |
|---|---|
☓ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Jumps to a position based on a label index, executes the tasks in the stream of the label, and stops the tasks in the current stream. This API is asynchronous.
Prototype
aclError aclrtSwitchLabelByIndex(void *ptr, uint32_t maxValue, aclrtLabelList labelList, aclrtStream stream)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
ptr |
Input |
Label index. Device memory address for storing the target label index. The index is of the UInt32 data type, the length is 4 bytes, and the index starts from 0. If the target label index is greater than the maximum index value of the labelList array, the maximum label will be jumped to. |
maxValue |
Input |
Number of labels in the label list. |
labelList |
Input |
Label list. Use a label list created by calling the aclrtCreateLabelList API as the input. |
stream |
Input |
Stream for executing the jump task. |
Returns
0 on success; else, failure. For details, see aclError.