为什么我不能多次使用 clSetUserEventStatus()?
Why can't I use clSetUserEventStatus() multiple times?
如果我没有误解 standard,它说当希望重用用户事件时,这是无法完成的,必须创建一个新事件 (clReleaseEvent()
+ clCreateUserEvent()
).
详情:
clSetUserEventStatus()
can only be called once to change the execution
status of event.
现在,出于好奇:为什么会这样?这是设计决定还是由于某些我没有得到的特定原因?
我想这个限制是为了防止 OpenCL 用户事件是 CL_COMPLETE
,然后是 CL_RUNNING
,然后又是 CL_COMPLETE
等情况。这可以可能会导致一些不可预见的后果并导致错误(注册回调有问题?)。
如果我没有误解 standard,它说当希望重用用户事件时,这是无法完成的,必须创建一个新事件 (clReleaseEvent()
+ clCreateUserEvent()
).
详情:
clSetUserEventStatus()
can only be called once to change the execution status of event.
现在,出于好奇:为什么会这样?这是设计决定还是由于某些我没有得到的特定原因?
我想这个限制是为了防止 OpenCL 用户事件是 CL_COMPLETE
,然后是 CL_RUNNING
,然后又是 CL_COMPLETE
等情况。这可以可能会导致一些不可预见的后果并导致错误(注册回调有问题?)。