See Also: Allocation Members
This class provides the primary method through which data is passed to and from RenderScript kernels. An Allocation provides the backing store for a given Android.Renderscripts.Type.
An Allocation also contains a set of usage flags that denote how the Allocation could be used. For example, an Allocation may have usage flags specifying that it can be used from a script as well as input to a Android.Renderscripts.Sampler. A developer must synchronize across these different usages using Allocation.SyncAll(int) in order to ensure that different users of the Allocation have a consistent view of memory. For example, in the case where an Allocation is used as the output of one kernel and as Sampler input in a later kernel, a developer must call Allocation.SyncAll(int) prior to launching the second kernel to ensure correctness.
An Allocation can be populated with the Allocation.CopyFrom(Android.Graphics.Bitmap) routines. For more complex Element types, the Allocation.CopyFromUnchecked(Byte[]) methods can be used to copy from byte arrays or similar constructs.
For more information about creating an application that uses RenderScript, read the RenderScript developer guide.