java.lang.Object | ||
↳ | android.support.v8.renderscript.BaseObj | |
↳ | android.support.v8.renderscript.ScriptGroup |
ScriptGroup creates a group of kernels that are executed together with one execution call as if they were a single kernel. The kernels may be connected internally or to an external allocation. The intermediate results for internal connections are not observable after the execution of the script.
External connections are grouped into inputs and outputs. All outputs are produced by a script kernel and placed into a user-supplied allocation. Inputs provide the input of a kernel. Inputs bound to script globals are set directly upon the script.
A ScriptGroup must contain at least one kernel. A ScriptGroup must contain only a single directed acyclic graph (DAG) of script kernels and connections. Attempting to create a ScriptGroup with multiple DAGs or attempting to create a cycle within a ScriptGroup will throw an exception.
Currently, all kernels in a ScriptGroup must be from separate
Script objects. Attempting to use multiple kernels from the same
Script object will result in an
RSInvalidStateException
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ScriptGroup.Builder | Helper class to build a ScriptGroup. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Execute the ScriptGroup.
| |||||||||||
Sets an input of the ScriptGroup.
| |||||||||||
Sets an output of the ScriptGroup.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.support.v8.renderscript.BaseObj
| |||||||||||
From class
java.lang.Object
|
Execute the ScriptGroup. This will run all the kernels in the ScriptGroup. No internal connection results will be visible after execution of the ScriptGroup.
Sets an input of the ScriptGroup. This specifies an Allocation to be used for kernels that require an input Allocation provided from outside of the ScriptGroup.
s | The ID of the kernel where the allocation should be connected. |
---|---|
a | The allocation to connect. |
Sets an output of the ScriptGroup. This specifies an Allocation to be used for the kernels that require an output Allocation visible after the ScriptGroup is executed.
s | The ID of the kernel where the allocation should be connected. |
---|---|
a | The allocation to connect. |