|
产品 |
是否支持 |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
在指定Stream中记录一个Event。异步接口。
aclrtRecordEvent接口与aclrtStreamWaitEvent接口配合使用时,主要用于多Stream之间同步等待的场景。
调用aclrtRecordEvent接口时,会捕获当前Stream上已下发的任务,并记录到Event事件中,因此后续若调用aclrtQueryEventStatus或aclrtStreamWaitEvent接口时,会检查或等待该Event事件中所捕获的任务都已经完成。
另外,对于使用aclrtCreateEventExWithFlag创建的Event:
1
|
aclError aclrtRecordEvent(aclrtEvent event, aclrtStream stream) |
|
参数名 |
输入/输出 |
说明 |
|---|---|---|
|
event |
输入 |
待记录的Event。类型定义请参见aclrtEvent。 |
|
stream |
输入 |
指定Stream。类型定义请参见aclrtStream。 多Stream同步等待场景下,例如,Stream2等待Stream1的场景,此处配置为Stream1。 |
返回0表示成功,返回其他值表示失败,请参见aclError。
接口调用示例,参见Event等待。