# AllocationAdapter

Added in[API level 11](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)

# AllocationAdapter

*** ** * ** ***

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

```
open class AllocationAdapter : Allocation
```

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

*** ** * ** ***

| **This class was deprecated in API level 31.**
|
| Renderscript has been deprecated in API level 31. Please refer to the[migration guide](https://developer.android.com/guide/topics/renderscript/migration-guide)for the proposed alternatives.

Only intended for use by generated reflected code.

## Summary

| Inherited constants ||
|---|---|
| From class[Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation) |----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [USAGE_GRAPHICS_CONSTANTS](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_GRAPHICS_CONSTANTS:kotlin.Int) <br /> The Allocation will be used as the source of shader constants by one or more programs. This was deprecated in API level 16. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [USAGE_GRAPHICS_RENDER_TARGET](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_GRAPHICS_RENDER_TARGET:kotlin.Int) <br /> The Allocation will be used as a target for offscreen rendering This was deprecated in API level 16. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [USAGE_GRAPHICS_TEXTURE](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_GRAPHICS_TEXTURE:kotlin.Int) <br /> The Allocation will be used as a texture source by one or more graphics programs. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [USAGE_GRAPHICS_VERTEX](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_GRAPHICS_VERTEX:kotlin.Int) <br /> The Allocation will be used as a graphics mesh. This was deprecated in API level 16. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [USAGE_IO_INPUT](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_IO_INPUT:kotlin.Int) <br /> The Allocation will be used as a[android.view.Surface](https://developer.android.com/reference/kotlin/android/view/Surface.html#)consumer. This usage will cause the Allocation to be created as read-only. <br />                                                                                                                                                                                                                                                                                                                                                                    | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [USAGE_IO_OUTPUT](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_IO_OUTPUT:kotlin.Int) <br /> The Allocation will be used as a[android.view.Surface](https://developer.android.com/reference/kotlin/android/view/Surface.html#)producer. The dimensions and format of the will be forced to those of the Allocation. <br />                                                                                                                                                                                                                                                                                                                                                       | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [USAGE_SCRIPT](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_SCRIPT:kotlin.Int) <br /> The Allocation will be bound to and accessed by scripts. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [USAGE_SHARED](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_SHARED:kotlin.Int) <br /> The Allocation's backing store will be inherited from another object (usually a[android.graphics.Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)); copying to or from the original source Bitmap will cause a synchronization rather than a full copy.[syncAll](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#syncAll(kotlin.Int))may also be used to synchronize the Allocation and the source Bitmap. This is set by default for allocations created with #createFromBitmap in API version 18 and higher. <br /> | ||

|                                                                                                                                                                                                                                                                                                                                                Public methods                                                                                                                                                                                                                                                                                                                                                 ||
|------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| openstatic[AllocationAdapter](https://developer.android.com/reference/kotlin/android/renderscript/AllocationAdapter#)! | [create1D](https://developer.android.com/reference/kotlin/android/renderscript/AllocationAdapter#create1D(android.renderscript.RenderScript,%20android.renderscript.Allocation))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `a:` `[Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!`)` <br />                                                                                                                                                                            |
| openstatic[AllocationAdapter](https://developer.android.com/reference/kotlin/android/renderscript/AllocationAdapter#)! | [create2D](https://developer.android.com/reference/kotlin/android/renderscript/AllocationAdapter#create2D(android.renderscript.RenderScript,%20android.renderscript.Allocation))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `a:` `[Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!`)` <br />                                                                                                                                                                            |
| openstatic[AllocationAdapter](https://developer.android.com/reference/kotlin/android/renderscript/AllocationAdapter#)! | [createTyped](https://developer.android.com/reference/kotlin/android/renderscript/AllocationAdapter#createTyped(android.renderscript.RenderScript,%20android.renderscript.Allocation,%20android.renderscript.Type))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `a:` `[Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!`, `t:` `[Type](https://developer.android.com/reference/kotlin/android/renderscript/Type)!`)` Create an arbitrary window into the base allocation. |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                       | [resize](https://developer.android.com/reference/kotlin/android/renderscript/AllocationAdapter#resize(kotlin.Int))`(`dimX:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Override the Allocation resize.                                                                                                                                                                                                                                                                                                                                            |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                       | [setFace](https://developer.android.com/reference/kotlin/android/renderscript/AllocationAdapter#setFace(android.renderscript.Type.CubemapFace))`(`cf:` `[Type.CubemapFace](https://developer.android.com/reference/kotlin/android/renderscript/Type.CubemapFace)!`)` Set the active Face.                                                                                                                                                                                                                                                                                             |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                       | [setLOD](https://developer.android.com/reference/kotlin/android/renderscript/AllocationAdapter#setLOD(kotlin.Int))`(`lod:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Set the active LOD.                                                                                                                                                                                                                                                                                                                                                         |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                       | [setX](https://developer.android.com/reference/kotlin/android/renderscript/AllocationAdapter#setX(kotlin.Int))`(`x:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Set the active X.                                                                                                                                                                                                                                                                                                                                                                 |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                       | [setY](https://developer.android.com/reference/kotlin/android/renderscript/AllocationAdapter#setY(kotlin.Int))`(`y:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Set the active Y.                                                                                                                                                                                                                                                                                                                                                                 |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                       | [setZ](https://developer.android.com/reference/kotlin/android/renderscript/AllocationAdapter#setZ(kotlin.Int))`(`z:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Set the active Z.                                                                                                                                                                                                                                                                                                                                                                 |

| Inherited functions ||
|---|---|
| From class[Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation) |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeFrom(kotlin.Int,%20kotlin.Int,%20android.renderscript.Allocation,%20kotlin.Int))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `data:` `[Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!`, `dataOff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Copy part of an Allocation into this Allocation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeFrom(kotlin.Int,%20kotlin.Int,%20kotlin.ByteArray))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)!`)` <br /> Copy an array into a 1D region of this Allocation. This variant is type checked and will generate exceptions if the Allocation's is not an 8 bit integer nor a vector of 8 bit integers[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeFrom(kotlin.Int,%20kotlin.Int,%20kotlin.FloatArray))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[FloatArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/index.html)!`)` <br /> Copy an array into a 1D region of this Allocation. This variant is type checked and will generate exceptions if the Allocation's is neither a 32 bit float nor a vector of 32 bit floats[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeFrom(kotlin.Int,%20kotlin.Int,%20kotlin.IntArray))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html)!`)` <br /> Copy an array into a 1D region of this Allocation. This variant is type checked and will generate exceptions if the Allocation's is not an 32 bit integer nor a vector of 32 bit integers[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeFrom(kotlin.Int,%20kotlin.Int,%20kotlin.Any))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `array:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!`)` <br /> Copy an array into a 1D region of this Allocation. This variant is type checked and will generate exceptions if the Allocation's does not match the component type of the array passed in. The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeFrom(kotlin.Int,%20kotlin.Int,%20kotlin.ShortArray))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[ShortArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short-array/index.html)!`)` <br /> Copy an array into a 1D region of this Allocation. This variant is type checked and will generate exceptions if the Allocation's is not an 16 bit integer nor a vector of 16 bit integers[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeFromUnchecked](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeFromUnchecked(kotlin.Int,%20kotlin.Int,%20kotlin.ByteArray))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)!`)` <br /> Copy an array into a 1D region of this Allocation. This method does not guarantee that the Allocation is compatible with the input buffer. The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeFromUnchecked](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeFromUnchecked(kotlin.Int,%20kotlin.Int,%20kotlin.FloatArray))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[FloatArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/index.html)!`)` <br /> Copy an array into a 1D region of this Allocation. This method does not guarantee that the Allocation is compatible with the input buffer. The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeFromUnchecked](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeFromUnchecked(kotlin.Int,%20kotlin.Int,%20kotlin.IntArray))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html)!`)` <br /> Copy an array into a 1D region of this Allocation. This method does not guarantee that the Allocation is compatible with the input buffer. The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeFromUnchecked](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeFromUnchecked(kotlin.Int,%20kotlin.Int,%20kotlin.Any))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `array:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!`)` <br /> Copy an array into a 1D region of this Allocation. This method does not guarantee that the Allocation is compatible with the input buffer. The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeFromUnchecked](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeFromUnchecked(kotlin.Int,%20kotlin.Int,%20kotlin.ShortArray))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[ShortArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short-array/index.html)!`)` <br /> Copy an array into a 1D region of this Allocation. This method does not guarantee that the Allocation is compatible with the input buffer. The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeTo](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeTo(kotlin.Int,%20kotlin.Int,%20kotlin.ByteArray))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)!`)` <br /> Copy a 1D region of this Allocation into an array. This variant is type checked and will generate exceptions if the Allocation's is neither an 8 bit integer nor a vector of 8 bit integers[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeTo](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeTo(kotlin.Int,%20kotlin.Int,%20kotlin.FloatArray))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[FloatArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/index.html)!`)` <br /> Copy a 1D region of this Allocation into an array. This variant is type checked and will generate exceptions if the Allocation's is neither a 32 bit float nor a vector of 32 bit floats[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeTo](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeTo(kotlin.Int,%20kotlin.Int,%20kotlin.IntArray))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html)!`)` <br /> Copy a 1D region of this Allocation into an array. This variant is type checked and will generate exceptions if the Allocation's is neither a 32 bit integer nor a vector of 32 bit integers[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeTo](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeTo(kotlin.Int,%20kotlin.Int,%20kotlin.Any))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `array:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!`)` <br /> Copy a 1D region of this Allocation into an array. This method is type checked and will generate exceptions if the Allocation's does not match the component type of the array passed in. The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeTo](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeTo(kotlin.Int,%20kotlin.Int,%20kotlin.ShortArray))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[ShortArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short-array/index.html)!`)` <br /> Copy a 1D region of this Allocation into an array. This variant is type checked and will generate exceptions if the Allocation's is neither a 16 bit integer nor a vector of 16 bit integers[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeToUnchecked](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeToUnchecked(kotlin.Int,%20kotlin.Int,%20kotlin.ByteArray))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)!`)` <br /> Copy a 1D region of this Allocation into an array. This method does not guarantee that the Allocation is compatible with the input buffer. The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeToUnchecked](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeToUnchecked(kotlin.Int,%20kotlin.Int,%20kotlin.FloatArray))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[FloatArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/index.html)!`)` <br /> Copy a 1D region of this Allocation into an array. This method does not guarantee that the Allocation is compatible with the input buffer. The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeToUnchecked](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeToUnchecked(kotlin.Int,%20kotlin.Int,%20kotlin.IntArray))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html)!`)` <br /> Copy a 1D region of this Allocation into an array. This method does not guarantee that the Allocation is compatible with the input buffer. The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeToUnchecked](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeToUnchecked(kotlin.Int,%20kotlin.Int,%20kotlin.Any))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `array:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!`)` <br /> Copy a 1D region of this Allocation into an array. This method does not guarantee that the Allocation is compatible with the input buffer. The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy1DRangeToUnchecked](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy1DRangeToUnchecked(kotlin.Int,%20kotlin.Int,%20kotlin.ShortArray))`(`off:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[ShortArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short-array/index.html)!`)` <br /> Copy a 1D region of this Allocation into an array. This method does not guarantee that the Allocation is compatible with the input buffer. The size of the region is: count \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy2DRangeFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy2DRangeFrom(kotlin.Int,%20kotlin.Int,%20android.graphics.Bitmap))`(`xoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `yoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `data:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`)` <br /> Copy a[android.graphics.Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)into an Allocation. The height and width of the update will use the height and width of the . <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy2DRangeFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy2DRangeFrom(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20android.renderscript.Allocation,%20kotlin.Int,%20kotlin.Int))`(`xoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `yoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `w:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `h:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `data:` `[Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!`, `dataXoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `dataYoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Copy a rectangular region from an Allocation into a rectangular region in this Allocation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy2DRangeFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy2DRangeFrom(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.ByteArray))`(`xoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `yoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `w:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `h:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `data:` `[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)!`)` <br /> Copy from an array into a rectangular region in this Allocation. The array is assumed to be tightly packed. This variant is type checked and will generate exceptions if the Allocation's is not an 8 bit integer nor a vector of 8 bit integers[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). The size of the region is: w \* h \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy2DRangeFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy2DRangeFrom(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.FloatArray))`(`xoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `yoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `w:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `h:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `data:` `[FloatArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/index.html)!`)` <br /> Copy from an array into a rectangular region in this Allocation. The array is assumed to be tightly packed. This variant is type checked and will generate exceptions if the Allocation's is neither a 32 bit float nor a vector of 32 bit floats[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). The size of the region is: w \* h \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy2DRangeFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy2DRangeFrom(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.IntArray))`(`xoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `yoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `w:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `h:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `data:` `[IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html)!`)` <br /> Copy from an array into a rectangular region in this Allocation. The array is assumed to be tightly packed. This variant is type checked and will generate exceptions if the Allocation's is not a 32 bit integer nor a vector of 32 bit integers[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). The size of the region is: w \* h \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy2DRangeFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy2DRangeFrom(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Any))`(`xoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `yoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `w:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `h:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `array:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!`)` <br /> Copy from an array into a rectangular region in this Allocation. The array is assumed to be tightly packed. This variant is type checked and will generate exceptions if the Allocation's does not match the input data type. The size of the region is: w \* h \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy2DRangeFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy2DRangeFrom(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.ShortArray))`(`xoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `yoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `w:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `h:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `data:` `[ShortArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short-array/index.html)!`)` <br /> Copy from an array into a rectangular region in this Allocation. The array is assumed to be tightly packed. This variant is type checked and will generate exceptions if the Allocation's is not a 16 bit integer nor a vector of 16 bit integers[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). The size of the region is: w \* h \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy2DRangeTo](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy2DRangeTo(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.ByteArray))`(`xoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `yoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `w:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `h:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `data:` `[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)!`)` <br /> Copy from a rectangular region in this Allocation into an array. This variant is type checked and will generate exceptions if the Allocation's[android.renderscript.Element](https://developer.android.com/reference/kotlin/android/renderscript/Element)is neither an 8 bit integer nor a vector of 8 bit integers[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). The size of the region is: w \* h \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy2DRangeTo](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy2DRangeTo(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.FloatArray))`(`xoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `yoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `w:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `h:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `data:` `[FloatArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/index.html)!`)` <br /> Copy from a rectangular region in this Allocation into an array. This variant is type checked and will generate exceptions if the Allocation's[android.renderscript.Element](https://developer.android.com/reference/kotlin/android/renderscript/Element)is neither a 32 bit float nor a vector of 32 bit floats[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). The size of the region is: w \* h \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy2DRangeTo](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy2DRangeTo(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.IntArray))`(`xoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `yoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `w:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `h:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `data:` `[IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html)!`)` <br /> Copy from a rectangular region in this Allocation into an array. This variant is type checked and will generate exceptions if the Allocation's[android.renderscript.Element](https://developer.android.com/reference/kotlin/android/renderscript/Element)is neither a 32 bit integer nor a vector of 32 bit integers[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). The size of the region is: w \* h \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy2DRangeTo](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy2DRangeTo(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Any))`(`xoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `yoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `w:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `h:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `array:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!`)` <br /> Copy from a rectangular region in this Allocation into an array. This method is type checked and will generate exceptions if the Allocation's[android.renderscript.Element](https://developer.android.com/reference/kotlin/android/renderscript/Element)does not match the component type of the array passed in. The size of the region is: w \* h \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy2DRangeTo](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy2DRangeTo(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.ShortArray))`(`xoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `yoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `w:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `h:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `data:` `[ShortArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short-array/index.html)!`)` <br /> Copy from a rectangular region in this Allocation into an array. This variant is type checked and will generate exceptions if the Allocation's[android.renderscript.Element](https://developer.android.com/reference/kotlin/android/renderscript/Element)is neither a 16 bit integer nor a vector of 16 bit integers[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). The size of the region is: w \* h \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy3DRangeFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy3DRangeFrom(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20android.renderscript.Allocation,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int))`(`xoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `yoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `zoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `w:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `h:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `data:` `[Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!`, `dataXoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `dataYoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `dataZoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Copy a rectangular region into the allocation from another allocation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy3DRangeFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy3DRangeFrom(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Any))`(`xoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `yoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `zoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `w:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `h:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `array:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!`)` <br /> Copy from an array into a 3D region in this Allocation. The array is assumed to be tightly packed. This variant is type checked and will generate exceptions if the Allocation's does not match the input data type. The size of the region is: w \* h \* d \*[getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement()).[android.renderscript.Element#getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Element#getBytesSize()). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the region. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the region. The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the region. The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copy3DRangeTo](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copy3DRangeTo(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Any))`(`xoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `yoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `zoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `w:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `h:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `d:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `array:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyFrom(android.graphics.Bitmap))`(`b:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`)` <br /> Copy into an Allocation from a[android.graphics.Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#). The height, width, and format of the bitmap must match the existing allocation. If the[android.graphics.Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)is the same as the used to create the Allocation with #createFromBitmap and[USAGE_SHARED](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_SHARED:kotlin.Int)is set on the Allocation, this will synchronize the Allocation with the latest data from the , potentially avoiding the actual copy. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyFrom(android.renderscript.Allocation))`(`a:` `[Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!`)` <br /> Copy an Allocation from an Allocation. The types of both allocations must be identical. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyFrom(kotlin.Array))`(`d:` `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[BaseObj](https://developer.android.com/reference/kotlin/android/renderscript/BaseObj)!>!`)` <br /> Copy an array of RS objects to the Allocation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyFrom(kotlin.ByteArray))`(`d:` `[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)!`)` <br /> Copy into this Allocation from an array. This variant is type checked and will generate exceptions if the Allocation's is not an 8 bit integer nor a vector of 8 bit integers[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyFrom(kotlin.FloatArray))`(`d:` `[FloatArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/index.html)!`)` <br /> Copy into this Allocation from an array. This variant is type checked and will generate exceptions if the Allocation's is neither a 32 bit float nor a vector of 32 bit floats[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyFrom(kotlin.IntArray))`(`d:` `[IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html)!`)` <br /> Copy into this Allocation from an array. This variant is type checked and will generate exceptions if the Allocation's is not a 32 bit integer nor a vector of 32 bit integers[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyFrom(kotlin.Any))`(`array:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!`)` <br /> Copy into this Allocation from an array. This variant is type checked and will generate exceptions if the Allocation's does not match the array's primitive type. If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyFrom](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyFrom(kotlin.ShortArray))`(`d:` `[ShortArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short-array/index.html)!`)` <br /> Copy into this Allocation from an array. This variant is type checked and will generate exceptions if the Allocation's is not a 16 bit integer nor a vector of 16 bit integers[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyFromUnchecked](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyFromUnchecked(kotlin.ByteArray))`(`d:` `[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)!`)` <br /> Copy into this Allocation from an array. This method does not guarantee that the Allocation is compatible with the input buffer; it copies memory without reinterpretation. If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyFromUnchecked](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyFromUnchecked(kotlin.FloatArray))`(`d:` `[FloatArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/index.html)!`)` <br /> Copy into this Allocation from an array. This method does not guarantee that the Allocation is compatible with the input buffer; it copies memory without reinterpretation. If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyFromUnchecked](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyFromUnchecked(kotlin.IntArray))`(`d:` `[IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html)!`)` <br /> Copy into this Allocation from an array. This method does not guarantee that the Allocation is compatible with the input buffer; it copies memory without reinterpretation. If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyFromUnchecked](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyFromUnchecked(kotlin.Any))`(`array:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!`)` <br /> Copy into this Allocation from an array. This method does not guarantee that the Allocation is compatible with the input buffer; it copies memory without reinterpretation. If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyFromUnchecked](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyFromUnchecked(kotlin.ShortArray))`(`d:` `[ShortArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short-array/index.html)!`)` <br /> Copy into this Allocation from an array. This method does not guarantee that the Allocation is compatible with the input buffer; it copies memory without reinterpretation. If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyTo](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyTo(android.graphics.Bitmap))`(`b:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`)` <br /> Copy from the Allocation into a[android.graphics.Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#). The bitmap must match the dimensions of the Allocation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyTo](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyTo(kotlin.ByteArray))`(`d:` `[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)!`)` <br /> Copy from the Allocation into a byte array. This variant is type checked and will generate exceptions if the Allocation's is neither an 8 bit integer nor a vector of 8 bit integers[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells will be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyTo](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyTo(kotlin.FloatArray))`(`d:` `[FloatArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/index.html)!`)` <br /> Copy from the Allocation into a float array. This variant is type checked and will generate exceptions if the Allocation's is neither a 32 bit float nor a vector of 32 bit floats[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells will be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyTo](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyTo(kotlin.IntArray))`(`d:` `[IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html)!`)` <br /> Copy from the Allocation into a int array. This variant is type checked and will generate exceptions if the Allocation's is not a 32 bit integer nor a vector of 32 bit integers[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells will be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyTo](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyTo(kotlin.Any))`(`array:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!`)` <br /> Copy from the Allocation into an array. The method is type checked and will generate exceptions if the Allocation's does not match the input data type. If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells will be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [copyTo](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyTo(kotlin.ShortArray))`(`d:` `[ShortArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short-array/index.html)!`)` <br /> Copy from the Allocation into a short array. This variant is type checked and will generate exceptions if the Allocation's is not a 16 bit integer nor a vector of 16 bit integers[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType). If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is disabled, then the size of the array in bytes must be at least the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells will be part of the array. If the Allocation has Vec3 Elements and[AutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation[getBytesSize()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize()). The padding bytes for the cells must not be part of the array. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!>! | [createAllocations](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#createAllocations(android.renderscript.RenderScript,%20android.renderscript.Type,%20kotlin.Int,%20kotlin.Int))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `t:` `[Type](https://developer.android.com/reference/kotlin/android/renderscript/Type)!`, `usage:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `numAlloc:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Creates a new Allocation Array with the given , and usage flags. Note: If the input allocation is of usage: USAGE_IO_INPUT, the created Allocation will be sharing the same BufferQueue. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!                                                                                  | [createCubemapFromBitmap](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#createCubemapFromBitmap(android.renderscript.RenderScript,%20android.graphics.Bitmap))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `b:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`)` <br /> Creates a non-mipmapped cubemap Allocation for use as a graphics texture from a[android.graphics.Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)containing the horizontal list of cube faces. Each face must be a square, have the same size as all other faces, and have a width that is a power of 2. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!                                                                                  | [createCubemapFromBitmap](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#createCubemapFromBitmap(android.renderscript.RenderScript,%20android.graphics.Bitmap,%20android.renderscript.Allocation.MipmapControl,%20kotlin.Int))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `b:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`, `mips:` `[Allocation.MipmapControl](https://developer.android.com/reference/kotlin/android/renderscript/Allocation.MipmapControl)!`, `usage:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Creates a cubemap Allocation from a[android.graphics.Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)containing the horizontal list of cube faces. Each face must be a square, have the same size as all other faces, and have a width that is a power of 2. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!                                                                                  | [createCubemapFromCubeFaces](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#createCubemapFromCubeFaces(android.renderscript.RenderScript,%20android.graphics.Bitmap,%20android.graphics.Bitmap,%20android.graphics.Bitmap,%20android.graphics.Bitmap,%20android.graphics.Bitmap,%20android.graphics.Bitmap))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `xpos:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`, `xneg:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`, `ypos:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`, `yneg:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`, `zpos:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`, `zneg:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`)` <br /> Creates a non-mipmapped cubemap Allocation for use as a sampler input from 6[android.graphics.Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)objects containing the cube faces. Each face must be a square, have the same size as all other faces, and have a width that is a power of 2. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!                                                                                  | [createCubemapFromCubeFaces](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#createCubemapFromCubeFaces(android.renderscript.RenderScript,%20android.graphics.Bitmap,%20android.graphics.Bitmap,%20android.graphics.Bitmap,%20android.graphics.Bitmap,%20android.graphics.Bitmap,%20android.graphics.Bitmap,%20android.renderscript.Allocation.MipmapControl,%20kotlin.Int))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `xpos:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`, `xneg:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`, `ypos:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`, `yneg:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`, `zpos:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`, `zneg:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`, `mips:` `[Allocation.MipmapControl](https://developer.android.com/reference/kotlin/android/renderscript/Allocation.MipmapControl)!`, `usage:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Creates a cubemap Allocation from 6[android.graphics.Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)objects containing the cube faces. Each face must be a square, have the same size as all other faces, and have a width that is a power of 2. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!                                                                                  | [createFromBitmap](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#createFromBitmap(android.renderscript.RenderScript,%20android.graphics.Bitmap))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `b:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`)` <br /> Creates an Allocation from a[android.graphics.Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#). With target API version 18 or greater, this Allocation will be created with[USAGE_SHARED](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_SHARED:kotlin.Int),[USAGE_SCRIPT](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_SCRIPT:kotlin.Int), and[USAGE_GRAPHICS_TEXTURE](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_GRAPHICS_TEXTURE:kotlin.Int). With target API version 17 or lower, this Allocation will be created with[USAGE_GRAPHICS_TEXTURE](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_GRAPHICS_TEXTURE:kotlin.Int). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!                                                                                  | [createFromBitmap](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#createFromBitmap(android.renderscript.RenderScript,%20android.graphics.Bitmap,%20android.renderscript.Allocation.MipmapControl,%20kotlin.Int))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `b:` `[Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)!`, `mips:` `[Allocation.MipmapControl](https://developer.android.com/reference/kotlin/android/renderscript/Allocation.MipmapControl)!`, `usage:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Creates an Allocation from a[android.graphics.Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!                                                                                  | [createFromBitmapResource](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#createFromBitmapResource(android.renderscript.RenderScript,%20android.content.res.Resources,%20kotlin.Int))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `res:` `[Resources](https://developer.android.com/reference/kotlin/android/content/res/Resources.html#)!`, `id:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Creates a non-mipmapped Allocation to use as a graphics texture from the[android.graphics.Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)referenced by resource ID. With target API version 18 or greater, this allocation will be created with[USAGE_SCRIPT](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_SCRIPT:kotlin.Int)and[USAGE_GRAPHICS_TEXTURE](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_GRAPHICS_TEXTURE:kotlin.Int). With target API version 17 or lower, this allocation will be created with[USAGE_GRAPHICS_TEXTURE](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_GRAPHICS_TEXTURE:kotlin.Int). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!                                                                                  | [createFromBitmapResource](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#createFromBitmapResource(android.renderscript.RenderScript,%20android.content.res.Resources,%20kotlin.Int,%20android.renderscript.Allocation.MipmapControl,%20kotlin.Int))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `res:` `[Resources](https://developer.android.com/reference/kotlin/android/content/res/Resources.html#)!`, `id:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `mips:` `[Allocation.MipmapControl](https://developer.android.com/reference/kotlin/android/renderscript/Allocation.MipmapControl)!`, `usage:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Creates an Allocation from the Bitmap referenced by resource ID. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!                                                                                  | [createFromString](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#createFromString(android.renderscript.RenderScript,%20kotlin.String,%20kotlin.Int))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `str:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `usage:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Creates an Allocation containing string data encoded in UTF-8 format. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!                                                                                  | [createSized](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#createSized(android.renderscript.RenderScript,%20android.renderscript.Element,%20kotlin.Int))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `e:` `[Element](https://developer.android.com/reference/kotlin/android/renderscript/Element)!`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Creates an Allocation with a specified number of given elements <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!                                                                                  | [createSized](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#createSized(android.renderscript.RenderScript,%20android.renderscript.Element,%20kotlin.Int,%20kotlin.Int))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `e:` `[Element](https://developer.android.com/reference/kotlin/android/renderscript/Element)!`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `usage:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Creates an Allocation with a specified number of given elements <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!                                                                                  | [createTyped](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#createTyped(android.renderscript.RenderScript,%20android.renderscript.Type))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `type:` `[Type](https://developer.android.com/reference/kotlin/android/renderscript/Type)!`)` <br /> Creates an Allocation for use by scripts with a given and no mipmaps <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!                                                                                  | [createTyped](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#createTyped(android.renderscript.RenderScript,%20android.renderscript.Type,%20android.renderscript.Allocation.MipmapControl,%20kotlin.Int))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `type:` `[Type](https://developer.android.com/reference/kotlin/android/renderscript/Type)!`, `mips:` `[Allocation.MipmapControl](https://developer.android.com/reference/kotlin/android/renderscript/Allocation.MipmapControl)!`, `usage:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Creates a new Allocation with the given , mipmap flag, and usage flags. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)!                                                                                  | [createTyped](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#createTyped(android.renderscript.RenderScript,%20android.renderscript.Type,%20kotlin.Int))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `type:` `[Type](https://developer.android.com/reference/kotlin/android/renderscript/Type)!`, `usage:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Creates an Allocation with the size specified by the type and no mipmaps generated by default <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [destroy](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#destroy())`()` <br /> For USAGE_IO_OUTPUT, destroy() implies setSurface(null). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [finalize](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#finalize())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [generateMipmaps](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#generateMipmaps())`()` <br /> Generate a mipmap chain. This is only valid if the Type of the Allocation includes mipmaps. This function will generate a complete set of mipmaps from the top level LOD and place them into the script memory space. If the Allocation is also using other memory spaces, a call to[syncAll(Allocation.USAGE_SCRIPT)](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#syncAll(kotlin.Int))is required. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [ByteBuffer](https://developer.android.com/reference/kotlin/java/nio/ByteBuffer.html#)!                                                                                        | [getByteBuffer](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getByteBuffer())`()` <br /> Gets or creates a ByteBuffer that contains the raw data of the current Allocation. If the Allocation is created with USAGE_IO_INPUT, the returned ByteBuffer would contain the up-to-date data as READ ONLY. For a 2D or 3D Allocation, the raw data maybe padded so that each row of the Allocation has certain alignment. The size of each row including padding, called stride, can be queried using the[getStride()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getStride())method. Note: Operating on the ByteBuffer of a destroyed Allocation will triger errors. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                     | [getBytesSize](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getBytesSize())`()` <br /> Get the size of the Allocation in bytes. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Element](https://developer.android.com/reference/kotlin/android/renderscript/Element)!                                                                                        | [getElement](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getElement())`()` <br /> Get the[android.renderscript.Element](https://developer.android.com/reference/kotlin/android/renderscript/Element)of the of the Allocation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)                                                                                                   | [getStride](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getStride())`()` <br /> Gets the stride of the Allocation. For a 2D or 3D Allocation, the raw data maybe padded so that each row of the Allocation has certain alignment. The size of each row including such padding is called stride. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Surface](https://developer.android.com/reference/kotlin/android/view/Surface.html#)!                                                                                          | [getSurface](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getSurface())`()` <br /> Returns the handle to a raw buffer that is being managed by the screen compositor. This operation is only valid for Allocations with[USAGE_IO_INPUT](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_IO_INPUT:kotlin.Int). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)                                                                                                   | [getTimeStamp](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getTimeStamp())`()` <br /> Get the timestamp for the most recent buffer held by this Allocation. The timestamp is guaranteed to be unique and monotonically increasing. Default value: -1. The timestamp will be updated after each[ioReceive()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#ioReceive())call. It can be used to identify the images by comparing the unique timestamps when used with[android.hardware.camera2](https://developer.android.com/reference/kotlin/android/hardware/camera2/package-summary.html)APIs. Example steps: 1. Save[android.hardware.camera2.TotalCaptureResult](https://developer.android.com/reference/kotlin/android/hardware/camera2/TotalCaptureResult.html#)when the capture is completed. 2. Get the timestamp after[ioReceive()](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#ioReceive())call. 3. Comparing totalCaptureResult.get(CaptureResult.SENSOR_TIMESTAMP) with alloc.getTimeStamp(). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Type](https://developer.android.com/reference/kotlin/android/renderscript/Type)!                                                                                              | [getType](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getType())`()` <br /> Get the[android.renderscript.Type](https://developer.android.com/reference/kotlin/android/renderscript/Type)of the Allocation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                     | [getUsage](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#getUsage())`()` <br /> Get the usage flags of the Allocation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [ioReceive](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#ioReceive())`()` <br /> Receive the latest input into the Allocation. This operation is only valid if[USAGE_IO_INPUT](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_IO_INPUT:kotlin.Int)is set on the Allocation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [ioSend](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#ioSend())`()` <br /> Send a buffer to the output stream. The contents of the Allocation will be undefined after this operation. This operation is only valid if[USAGE_IO_OUTPUT](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_IO_OUTPUT:kotlin.Int)is set on the Allocation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [setAutoPadding](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setAutoPadding(kotlin.Boolean))`(`useAutoPadding:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` <br /> Specifies the mapping between the Allocation's cells and an array's elements when data is copied from the Allocation to the array, or vice-versa. Only applies to an Allocation whose Element is a vector of length 3 (such as[Element.U8_3](https://developer.android.com/reference/kotlin/android/renderscript/Element#U8_3(android.renderscript.RenderScript))or[Element.RGB_888](https://developer.android.com/reference/kotlin/android/renderscript/Element#RGB_888(android.renderscript.RenderScript))). Enabling this feature may make copying data from the Allocation to an array or vice-versa less efficient. Vec3 Element cells are stored in an Allocation as Vec4 Element cells with the same[android.renderscript.Element.DataType](https://developer.android.com/reference/kotlin/android/renderscript/Element.DataType), with the fourth vector component treated as padding. When this feature is enabled, only the data components, i.e. the first 3 vector components of each cell, will be mapped between the array and the Allocation. When disabled, explicit mapping of the padding components is required, as described in the following example. For example, when copying an integer array to an Allocation of two[android.renderscript.Element#I32_3](https://developer.android.com/reference/kotlin/android/renderscript/Element#I32_3(android.renderscript.RenderScript))cells using[copyFrom(int[])](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyFrom(kotlin.IntArray)): When disabled: The array must have at least 8 integers, with the first 4 integers copied to the first cell of the Allocation, and the next 4 integers copied to the second cell. The 4th and 8th integers are mapped as the padding components. When enabled: The array just needs to have at least 6 integers, with the first 3 integers copied to the the first cell as data components, and the next 3 copied to the second cell. There is no mapping for the padding components. Similarly, when copying a byte array to an Allocation of two[android.renderscript.Element#I32_3](https://developer.android.com/reference/kotlin/android/renderscript/Element#I32_3(android.renderscript.RenderScript))cells, using[copyFromUnchecked(int[])](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#copyFromUnchecked(kotlin.IntArray)): When disabled: The array must have at least 32 bytes, with the first 16 bytes copied to the first cell of the Allocation, and the next 16 bytes copied to the second cell. The 13th-16th and 29th-32nd bytes are mapped as padding components. When enabled: The array just needs to have at least 24 bytes, with the first 12 bytes copied to the first cell of the Allocation, and the next 12 bytes copied to the second cell. There is no mapping for the padding components. Similar to copying data to an Allocation from an array, when copying data from an Allocation to an array, the padding components for Vec3 Element cells will not be copied/mapped to the array if AutoPadding is enabled. Default: Disabled. <br /> | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [setFromFieldPacker](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setFromFieldPacker(kotlin.Int,%20android.renderscript.FieldPacker))`(`xoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `fp:` `[FieldPacker](https://developer.android.com/reference/kotlin/android/renderscript/FieldPacker)!`)` <br /> This is only intended to be used by auto-generated code reflected from the RenderScript script files and should not be used by developers. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [setFromFieldPacker](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setFromFieldPacker(kotlin.Int,%20kotlin.Int,%20android.renderscript.FieldPacker))`(`xoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `component_number:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `fp:` `[FieldPacker](https://developer.android.com/reference/kotlin/android/renderscript/FieldPacker)!`)` <br /> This is only intended to be used by auto-generated code reflected from the RenderScript script files and should not be used by developers. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [setFromFieldPacker](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setFromFieldPacker(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20android.renderscript.FieldPacker))`(`xoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `yoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `zoff:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `component_number:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `fp:` `[FieldPacker](https://developer.android.com/reference/kotlin/android/renderscript/FieldPacker)!`)` <br /> This is only intended to be used by auto-generated code reflected from the RenderScript script files and should not be used by developers. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [setOnBufferAvailableListener](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setOnBufferAvailableListener(android.renderscript.Allocation.OnBufferAvailableListener))`(`callback:` `[Allocation.OnBufferAvailableListener](https://developer.android.com/reference/kotlin/android/renderscript/Allocation.OnBufferAvailableListener)!`)` <br /> Set a notification handler for[USAGE_IO_INPUT](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_IO_INPUT:kotlin.Int). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [setSurface](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#setSurface(android.view.Surface))`(`sur:` `[Surface](https://developer.android.com/reference/kotlin/android/view/Surface.html#)!`)` <br /> Associate a[android.view.Surface](https://developer.android.com/reference/kotlin/android/view/Surface.html#)with this Allocation. This operation is only valid for Allocations with[USAGE_IO_OUTPUT](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#USAGE_IO_OUTPUT:kotlin.Int). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                   | [syncAll](https://developer.android.com/reference/kotlin/android/renderscript/Allocation#syncAll(kotlin.Int))`(`srcLocation:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Propagate changes from one usage of the Allocation to the other usages of the Allocation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | ||
| From class[BaseObj](https://developer.android.com/reference/kotlin/android/renderscript/BaseObj) |------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/android/renderscript/BaseObj#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` <br /> Compare the current BaseObj with another BaseObj for equality. <br />                                  | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!  | [getName](https://developer.android.com/reference/kotlin/android/renderscript/BaseObj#getName())`()` <br />                                                                                                                                                                                                      | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [hashCode](https://developer.android.com/reference/kotlin/android/renderscript/BaseObj#hashCode())`()` <br /> Calculates the hash code value for a BaseObj. <br />                                                                                                                                               | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)       | [setName](https://developer.android.com/reference/kotlin/android/renderscript/BaseObj#setName(kotlin.String))`(`name:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` <br /> setName assigns a name to an object. This object can later be looked up by this name. <br /> | ||

## Public methods

### create1D

Added in[API level 14](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)  

```
open static fun create1D(
    rs: RenderScript!, 
    a: Allocation!
): AllocationAdapter!
```

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

### create2D

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

```
open static fun create2D(
    rs: RenderScript!, 
    a: Allocation!
): AllocationAdapter!
```

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

### createTyped

Added in[API level 23](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)  

```
open static fun createTyped(
    rs: RenderScript!, 
    a: Allocation!, 
    t: Type!
): AllocationAdapter!
```

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

Create an arbitrary window into the base allocation. The type describes the shape of the window. Any dimensions present in the type must be equal or smaller to the dimensions in the source allocation. A dimension present in the allocation that is not present in the type will be constrained away with the selectors. If a dimension is present in both the type and allocation, one of two things will happen. If the type is smaller than the allocation, a window will be created, the selected value in the adapter for that dimension will act as the base address, and the type will describe the size of the view starting at that point. If the type and allocation dimension are of the same size, then setting the selector for the dimension will be an error.  

### resize

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

```
open fun resize(dimX: Int): Unit
```

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

Override the Allocation resize. Resizing adapters is not allowed and will throw a RSInvalidStateException.

|                                         Parameters                                          ||
|--------|-------------------------------------------------------------------------------------|
| `dimX` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):ignored. |

### setFace

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

```
open fun setFace(cf: Type.CubemapFace!): Unit
```

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

Set the active Face. The base allocation must be of a type that includes faces.

|                                                                Parameters                                                                ||
|------|------------------------------------------------------------------------------------------------------------------------------------|
| `cf` | [Type.CubemapFace](https://developer.android.com/reference/kotlin/android/renderscript/Type.CubemapFace)!:The face to make active. |

### setLOD

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

```
open fun setLOD(lod: Int): Unit
```

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

Set the active LOD. The LOD must be within the range for the type being adapted. The base allocation must have mipmaps. Because this changes the dimensions of the adapter the current Y and Z will be reset.

|                                                Parameters                                                 ||
|-------|----------------------------------------------------------------------------------------------------|
| `lod` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The LOD to make active. |

### setX

Added in[API level 23](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)  

```
open fun setX(x: Int): Unit
```

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

Set the active X. The x value must be within the range for the allocation being adapted.

|                                              Parameters                                               ||
|-----|--------------------------------------------------------------------------------------------------|
| `x` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The x to make active. |

### setY

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

```
open fun setY(y: Int): Unit
```

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

Set the active Y. The y value must be within the range for the allocation being adapted. The base allocation must contain the Y dimension.

|                                              Parameters                                               ||
|-----|--------------------------------------------------------------------------------------------------|
| `y` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The y to make active. |

### setZ

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

```
open fun setZ(z: Int): Unit
```

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

Set the active Z. The z value must be within the range for the allocation being adapted. The base allocation must contain the Z dimension.

|                                              Parameters                                               ||
|-----|--------------------------------------------------------------------------------------------------|
| `z` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The z to make active. |