Killing OpenCL Kernels
问题 Is there any way to kill a running OpenCL kernel through the OpenCL API? I haven't found anything in the spec. The only solutions I could come up with are 1) periodically checking a flag in the kernel that the host writes to when it wants the kernel to stop, or 2) running the kernel in a separate process and killing the entire process. I don't think either of those are very elegant solutions, and I'm not sure #1 would even work reliably. 回答1: No, the OpenCL API doesn't allow to interrupt a