简体   繁体   English

是否有通知RenderScript函数或内核完成的回调方法?

[英]Is there a callback method informing a RenderScript function or kernel is finished?

I'm thinking about using a RenderScript kernel to do some computation work and, as RenderScript execution is asynchronous, I wonder how I can be informed when the script execution is finished. 我正在考虑使用RenderScript内核来执行一些计算工作,并且由于RenderScript执行是异步的,所以我想知道如何在脚本执行完成时得到通知。

So far, I have found no answer neither in the documention nor on the internet. 到目前为止,无论是在文档中还是在互联网上,我都没有找到答案。 Is there some kind of callback method or any other mechanism to do this? 是否有某种回调方法或任何其他机制可以做到这一点?

No, there is no callback mechanism defined by the API. 否,API没有定义回调机制。 The operations are async, but the only way to get the results back to Java or native code is to copy the data back, which will block until it is complete. 这些操作是异步的,但是将结果返回到Java或本机代码的唯一方法是将数据复制回去,这将阻塞直到完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM