# Script.LaunchOptions

Added in[API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# LaunchOptions

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions "View this page in Java")  

```
class LaunchOptions
```

|---|----------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                         ||
| ↳ | [android.renderscript.Script.LaunchOptions](https://developer.android.com/reference/kotlin/android/renderscript/Script.LaunchOptions#) |

*** ** * ** ***

| **This class was deprecated in API level 31.**
|
| Deprecated in Java.

Class for specifying the specifics about how a kernel will be launched. This class can specify a potential range of cells on which to run a kernel. If no set is called for a dimension then this class will have no impact on that dimension when the kernel is executed. The forEach kernel launch will operate over the intersection of the dimensions. Example: LaunchOptions with setX(5, 15) Allocation with dimension X=10, Y=10 The resulting forEach run would execute over: x = 5 to 9 (inclusive) and y = 0 to 9 (inclusive).

## Summary

|                                                           Public constructors                                                           ||
|--------------------------------------------------------------------------------------------------------------------------------------|---|
| [LaunchOptions](https://developer.android.com/reference/kotlin/android/renderscript/Script.LaunchOptions#LaunchOptions())`()` <br /> |

|                                                                                                                                                                                                                       Public methods                                                                                                                                                                                                                       ||
|--------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                         | [getXEnd](https://developer.android.com/reference/kotlin/android/renderscript/Script.LaunchOptions#getXEnd())`()` Returns the current X end                                                                                                                                                                                            |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                         | [getXStart](https://developer.android.com/reference/kotlin/android/renderscript/Script.LaunchOptions#getXStart())`()` Returns the current X start                                                                                                                                                                                      |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                         | [getYEnd](https://developer.android.com/reference/kotlin/android/renderscript/Script.LaunchOptions#getYEnd())`()` Returns the current Y end                                                                                                                                                                                            |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                         | [getYStart](https://developer.android.com/reference/kotlin/android/renderscript/Script.LaunchOptions#getYStart())`()` Returns the current Y start                                                                                                                                                                                      |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                         | [getZEnd](https://developer.android.com/reference/kotlin/android/renderscript/Script.LaunchOptions#getZEnd())`()` Returns the current Z end                                                                                                                                                                                            |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                         | [getZStart](https://developer.android.com/reference/kotlin/android/renderscript/Script.LaunchOptions#getZStart())`()` Returns the current Z start                                                                                                                                                                                      |
| [Script.LaunchOptions](https://developer.android.com/reference/kotlin/android/renderscript/Script.LaunchOptions#)! | [setX](https://developer.android.com/reference/kotlin/android/renderscript/Script.LaunchOptions#setX(kotlin.Int,%20kotlin.Int))`(`xstartArg:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `xendArg:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Set the X range. |
| [Script.LaunchOptions](https://developer.android.com/reference/kotlin/android/renderscript/Script.LaunchOptions#)! | [setY](https://developer.android.com/reference/kotlin/android/renderscript/Script.LaunchOptions#setY(kotlin.Int,%20kotlin.Int))`(`ystartArg:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `yendArg:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Set the Y range. |
| [Script.LaunchOptions](https://developer.android.com/reference/kotlin/android/renderscript/Script.LaunchOptions#)! | [setZ](https://developer.android.com/reference/kotlin/android/renderscript/Script.LaunchOptions#setZ(kotlin.Int,%20kotlin.Int))`(`zstartArg:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `zendArg:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Set the Z range. |

## Public constructors

### LaunchOptions

```
LaunchOptions()
```

## Public methods

### getXEnd

Added in[API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getXEnd(): Int
```

**Deprecated:** *Deprecated in Java.*

Returns the current X end

|                                            Return                                             ||
|----------------------------------------------------------------------------|-------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | int current value |

### getXStart

Added in[API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getXStart(): Int
```

**Deprecated:** *Deprecated in Java.*

Returns the current X start

|                                            Return                                             ||
|----------------------------------------------------------------------------|-------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | int current value |

### getYEnd

Added in[API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getYEnd(): Int
```

**Deprecated:** *Deprecated in Java.*

Returns the current Y end

|                                            Return                                             ||
|----------------------------------------------------------------------------|-------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | int current value |

### getYStart

Added in[API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getYStart(): Int
```

**Deprecated:** *Deprecated in Java.*

Returns the current Y start

|                                            Return                                             ||
|----------------------------------------------------------------------------|-------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | int current value |

### getZEnd

Added in[API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getZEnd(): Int
```

**Deprecated:** *Deprecated in Java.*

Returns the current Z end

|                                            Return                                             ||
|----------------------------------------------------------------------------|-------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | int current value |

### getZStart

Added in[API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getZStart(): Int
```

**Deprecated:** *Deprecated in Java.*

Returns the current Z start

|                                            Return                                             ||
|----------------------------------------------------------------------------|-------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | int current value |

### setX

Added in[API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun setX(
    xstartArg: Int, 
    xendArg: Int
): Script.LaunchOptions!
```

**Deprecated:** *Deprecated in Java.*

Set the X range. xstartArg is the lowest coordinate of the range, and xendArg-1 is the highest coordinate of the range.

|                                                  Parameters                                                  ||
|-------------|-------------------------------------------------------------------------------------------------|
| `xstartArg` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):Must be \>= 0        |
| `xendArg`   | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):Must be \> xstartArg |

|                                                              Return                                                               ||
|--------------------------------------------------------------------------------------------------------------------|---------------|
| [Script.LaunchOptions](https://developer.android.com/reference/kotlin/android/renderscript/Script.LaunchOptions#)! | LaunchOptions |

### setY

Added in[API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun setY(
    ystartArg: Int, 
    yendArg: Int
): Script.LaunchOptions!
```

**Deprecated:** *Deprecated in Java.*

Set the Y range. ystartArg is the lowest coordinate of the range, and yendArg-1 is the highest coordinate of the range.

|                                                  Parameters                                                  ||
|-------------|-------------------------------------------------------------------------------------------------|
| `ystartArg` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):Must be \>= 0        |
| `yendArg`   | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):Must be \> ystartArg |

|                                                              Return                                                               ||
|--------------------------------------------------------------------------------------------------------------------|---------------|
| [Script.LaunchOptions](https://developer.android.com/reference/kotlin/android/renderscript/Script.LaunchOptions#)! | LaunchOptions |

### setZ

Added in[API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun setZ(
    zstartArg: Int, 
    zendArg: Int
): Script.LaunchOptions!
```

**Deprecated:** *Deprecated in Java.*

Set the Z range. zstartArg is the lowest coordinate of the range, and zendArg-1 is the highest coordinate of the range.

|                                                  Parameters                                                  ||
|-------------|-------------------------------------------------------------------------------------------------|
| `zstartArg` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):Must be \>= 0        |
| `zendArg`   | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):Must be \> zstartArg |

|                                                              Return                                                               ||
|--------------------------------------------------------------------------------------------------------------------|---------------|
| [Script.LaunchOptions](https://developer.android.com/reference/kotlin/android/renderscript/Script.LaunchOptions#)! | LaunchOptions |