Can one invoke a non-root RenderScript kernel using rsForEach
?
There are many examples of using rsForEach
to call the root kernel from within an in
Unfortunately we don't currrently have a way to invoke a non-root RenderScript kernel using rsForEach() from the script. You will have to call into it from Java directly. You could also put the second kernel in another Script as root() and then bind that rs_script as well (e.g. you can have gScriptGradient and gScriptGray and execute them sequentially from a single invoke in your primary Script).
I initially missed your second question about synchronization between parallel kernels. They are indeed ordered. Although kernels are launched asynchronously, the second kernel will not run until the first kernel is complete.