diff options
Diffstat (limited to 'rs/java/android/renderscript/Script.java')
-rw-r--r-- | rs/java/android/renderscript/Script.java | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/rs/java/android/renderscript/Script.java b/rs/java/android/renderscript/Script.java index dfd0ea35ee0e..ed4c6c7be8d4 100644 --- a/rs/java/android/renderscript/Script.java +++ b/rs/java/android/renderscript/Script.java @@ -220,22 +220,21 @@ public class Script extends BaseObj { /** * Only intended for use by generated reflected code. - * - * @hide */ protected void forEach(int slot, Allocation[] ains, Allocation aout, FieldPacker v) { + + // FieldPacker is kept here to support regular params in the future. forEach(slot, ains, aout, v, null); } /** * Only intended for use by generated reflected code. - * - * @hide */ protected void forEach(int slot, Allocation[] ains, Allocation aout, FieldPacker v, LaunchOptions sc) { // TODO: Is this necessary if nScriptForEach calls validate as well? + // FieldPacker is kept here to support regular params in the future. mRS.validate(); if (ains != null) { for (Allocation ain : ains) { @@ -502,7 +501,23 @@ public class Script extends BaseObj { /** - * Class used to specify clipping for a kernel launch. + * Class for specifying the specifics about how a kernel will be + * launched + * + * This class can specify a potential range of cells on which to + * run a kernel. If no set is called for a dimension then this + * class will have no impact on that dimension when the kernel + * is executed. + * + * The forEach launch will operate over the intersection of the + * dimensions. + * + * Example: + * LaunchOptions with setX(5, 15) + * Allocation with dimension X=10, Y=10 + * The resulting forEach run would execute over x = 5 to 10 and + * y = 0 to 10. + * * */ public static final class LaunchOptions { |