diff options
Diffstat (limited to 'rs/java/android')
-rw-r--r-- | rs/java/android/renderscript/Allocation.java | 2 | ||||
-rw-r--r-- | rs/java/android/renderscript/Element.java | 5 | ||||
-rw-r--r-- | rs/java/android/renderscript/RenderScript.java | 6 | ||||
-rw-r--r-- | rs/java/android/renderscript/Script.java | 4 | ||||
-rw-r--r-- | rs/java/android/renderscript/ScriptGroup.java | 6 | ||||
-rw-r--r-- | rs/java/android/renderscript/ScriptIntrinsicBLAS.java | 10 |
6 files changed, 16 insertions, 17 deletions
diff --git a/rs/java/android/renderscript/Allocation.java b/rs/java/android/renderscript/Allocation.java index 3b61f9d..70a5821 100644 --- a/rs/java/android/renderscript/Allocation.java +++ b/rs/java/android/renderscript/Allocation.java @@ -1422,6 +1422,8 @@ public class Allocation extends BaseObj { } /** + * @hide + * * This is only intended to be used by auto-generated code reflected from * the RenderScript script files and should not be used by developers. * diff --git a/rs/java/android/renderscript/Element.java b/rs/java/android/renderscript/Element.java index 4b3e30f..6efb6d6 100644 --- a/rs/java/android/renderscript/Element.java +++ b/rs/java/android/renderscript/Element.java @@ -536,8 +536,8 @@ public class Element extends BaseObj { } public static Element F16_3(RenderScript rs) { - if(rs.mElement_FLOAT_3 == null) { - rs.mElement_FLOAT_3 = createVector(rs, DataType.FLOAT_16, 3); + if(rs.mElement_HALF_3 == null) { + rs.mElement_HALF_3 = createVector(rs, DataType.FLOAT_16, 3); } return rs.mElement_HALF_3; } @@ -911,6 +911,7 @@ public class Element extends BaseObj { switch (dt) { // Support only primitive integer/float/boolean types as vectors. + case FLOAT_16: case FLOAT_32: case FLOAT_64: case SIGNED_8: diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java index 4f10699..27f2cc8 100644 --- a/rs/java/android/renderscript/RenderScript.java +++ b/rs/java/android/renderscript/RenderScript.java @@ -131,7 +131,7 @@ public class RenderScript { // this should be a monotonically increasing ID // used in conjunction with the API version of a device - static final long sMinorID = 1; + static final long sMinorVersion = 1; /** * Returns an identifier that can be used to identify a particular @@ -140,8 +140,8 @@ public class RenderScript { * @return The minor RenderScript version number * */ - public static long getMinorID() { - return sMinorID; + public static long getMinorVersion() { + return sMinorVersion; } /** diff --git a/rs/java/android/renderscript/Script.java b/rs/java/android/renderscript/Script.java index 6a1efee..7cd6d09 100644 --- a/rs/java/android/renderscript/Script.java +++ b/rs/java/android/renderscript/Script.java @@ -182,9 +182,9 @@ public class Script extends BaseObj { mRS.validateObject(ain); mRS.validateObject(aout); - if (ain == null && aout == null) { + if (ain == null && aout == null && sc == null) { throw new RSIllegalArgumentException( - "At least one of ain or aout is required to be non-null."); + "At least one of input allocation, output allocation, or LaunchOptions is required to be non-null."); } long[] in_ids = null; diff --git a/rs/java/android/renderscript/ScriptGroup.java b/rs/java/android/renderscript/ScriptGroup.java index be8b0fd..d1a12f9 100644 --- a/rs/java/android/renderscript/ScriptGroup.java +++ b/rs/java/android/renderscript/ScriptGroup.java @@ -400,8 +400,10 @@ public final class ScriptGroup extends BaseObj { /** * Executes a script group * - * @param inputs inputs to the script group - * @return outputs of the script group as an array of objects + * @param inputs Values for inputs to the script group, in the order as the + * inputs are added via {@link Builder2#addInput}. + * @return Outputs of the script group as an array of objects, in the order + * as futures are passed to {@link Builder2#create}. */ public Object[] execute(Object... inputs) { diff --git a/rs/java/android/renderscript/ScriptIntrinsicBLAS.java b/rs/java/android/renderscript/ScriptIntrinsicBLAS.java index 5e28d3f..f7e81b0 100644 --- a/rs/java/android/renderscript/ScriptIntrinsicBLAS.java +++ b/rs/java/android/renderscript/ScriptIntrinsicBLAS.java @@ -1039,14 +1039,8 @@ public final class ScriptIntrinsicBLAS extends ScriptIntrinsic { if (cM != cN) { throw new RSRuntimeException("Matrix C is not symmetric"); } - if (TransA != NO_TRANSPOSE) { - if (aN != cM) { - throw new RSRuntimeException("Called BLAS with invalid dimensions"); - } - } else { - if (aM != cM) { - throw new RSRuntimeException("Called BLAS with invalid dimensions"); - } + if (aM != cM) { + throw new RSRuntimeException("Called BLAS with invalid dimensions"); } } else if (A != null && B != null) { // A and B only |