to top
Android APIs
public final class

ScriptGroup

extends BaseObj
java.lang.Object
   ↳ android.renderscript.BaseObj
     ↳ android.renderscript.ScriptGroup

Class Overview

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.

Summary

Nested Classes
class ScriptGroup.Builder Create a ScriptGroup. 
Public Methods
void execute()
Execute the ScriptGroup.
void setInput(Script.KernelID s, Allocation a)
Sets an input of the ScriptGroup.
void setOutput(Script.KernelID s, Allocation a)
Sets an output of the ScriptGroup.
[Expand]
Inherited Methods
From class android.renderscript.BaseObj
From class java.lang.Object

Public Methods

public void execute ()

Added in API level 17

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.

public void setInput (Script.KernelID s, Allocation a)

Added in API level 17

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.

Parameters
s The ID of the kernel where the allocation should be connected.
a The allocation to connect.

public void setOutput (Script.KernelID s, Allocation a)

Added in API level 17

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.

Parameters
s The ID of the kernel where the allocation should be connected.
a The allocation to connect.