Closure
class Closure : BaseObj
| kotlin.Any | ||
| ↳ | android.renderscript.BaseObj | |
| ↳ | android.renderscript.ScriptGroup.Closure | |
An opaque class for closures
A closure represents a function call to a kernel or invocable function, combined with arguments and values for global variables. A closure is created using the android.renderscript.ScriptGroup.Builder2#addKernel or android.renderscript.ScriptGroup.Builder2#addInvoke method.
Summary
Public methods |
|
|---|---|
| Unit |
destroy()Destroys this Closure and the Allocation for its return value |
| ScriptGroup.Future! |
getGlobal(field: Script.FieldID!)Returns the future for a global variable |
| ScriptGroup.Future! |
Returns the future for the return value |
Protected methods |
|
|---|---|
| Unit |
finalize() |
Inherited functions |
|
|---|---|
Public methods
destroy
fun destroy(): Unit
Destroys this Closure and the Allocation for its return value
getGlobal
fun getGlobal(field: Script.FieldID!): ScriptGroup.Future!
Returns the future for a global variable
| Parameters | |
|---|---|
field |
Script.FieldID!: the field ID for the global variable |
| Return | |
|---|---|
ScriptGroup.Future! |
a future |
getReturn
fun getReturn(): ScriptGroup.Future!
Returns the future for the return value
| Return | |
|---|---|
ScriptGroup.Future! |
a future |
Protected methods
finalize
protected fun finalize(): Unit
| Exceptions | |
|---|---|
java.lang.Throwable |
the Exception raised by this method |