java.lang.Object | ||
↳ | android.renderscript.BaseObj | |
↳ | android.renderscript.ScriptGroup |
ScriptGroup creates a groups of scripts which are executed together based upon upon one execution call as if they were all part of a single script. The scripts may be connected internally or to an external allocation. For the internal connections the intermediate results are not observable after the execution of the script.
The external connections are grouped into inputs and outputs. All outputs are produced by a script kernel and placed into a user supplied allocation. Inputs are similar but supply the input of a kernal. Inputs bounds to a script 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.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ScriptGroup.Builder | Create 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.renderscript.BaseObj
| |||||||||||
From class
java.lang.Object
|
Execute the ScriptGroup. This will run all the kernels in the script. The state of the connecting lines will not be observable after this operation.
Sets an input of the ScriptGroup. This specifies an Allocation to be used for the kernels which require a kernel input and that input is provided external to the group.
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 which require a kernel output and that output is provided external to the group.
s | The ID of the kernel where the allocation should be connected. |
---|---|
a | The allocation to connect. |