diff options
author | David Gross <dgross@google.com> | 2016-06-13 22:20:32 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-06-13 22:20:32 +0000 |
commit | 1d5ce9ab34d8ffed5d31b1fda1b0990dff4c138a (patch) | |
tree | 049bca31dd79f11feb91f25c47d948dee976068f /rs/java/android | |
parent | 3b76cb76097d05531ba730dfd926b14b54d9e4e3 (diff) | |
parent | 9a53329b0ad7509d4081d2d35bbc229a2b69f816 (diff) |
Merge \\"Delete simple reduction implementation.\\" into nyc-dev am: d749245b88
am: 9a53329b0a
Change-Id: I66f67b6d55f4ce0496c6e136b82ca58a7a5fbfd6
Diffstat (limited to 'rs/java/android')
-rw-r--r-- | rs/java/android/renderscript/RenderScript.java | 14 | ||||
-rw-r--r-- | rs/java/android/renderscript/Script.java | 31 |
2 files changed, 4 insertions, 41 deletions
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java index 017b5d62af0f..0f22568a9e2a 100644 --- a/rs/java/android/renderscript/RenderScript.java +++ b/rs/java/android/renderscript/RenderScript.java @@ -752,20 +752,12 @@ public class RenderScript { rsnScriptForEach(mContext, id, slot, ains, aout, params, limits); } - native void rsnScriptReduce(long con, long id, int slot, long ain, + native void rsnScriptReduce(long con, long id, int slot, long[] ains, long aout, int[] limits); - synchronized void nScriptReduce(long id, int slot, long ain, long aout, + synchronized void nScriptReduce(long id, int slot, long ains[], long aout, int[] limits) { validate(); - rsnScriptReduce(mContext, id, slot, ain, aout, limits); - } - - native void rsnScriptReduceNew(long con, long id, int slot, long[] ains, - long aout, int[] limits); - synchronized void nScriptReduceNew(long id, int slot, long ains[], long aout, - int[] limits) { - validate(); - rsnScriptReduceNew(mContext, id, slot, ains, aout, limits); + rsnScriptReduce(mContext, id, slot, ains, aout, limits); } native void rsnScriptInvokeV(long con, long id, int slot, byte[] params); diff --git a/rs/java/android/renderscript/Script.java b/rs/java/android/renderscript/Script.java index fc3280be3ac7..13d5fcd57446 100644 --- a/rs/java/android/renderscript/Script.java +++ b/rs/java/android/renderscript/Script.java @@ -286,35 +286,6 @@ public class Script extends BaseObj { } /** - * Only intended for use by generated reflected code. (Simple reduction) - * - * @hide - */ - protected void reduce(int slot, Allocation ain, Allocation aout, LaunchOptions sc) { - mRS.validate(); - mRS.validateObject(ain); - mRS.validateObject(aout); - - if (ain == null || aout == null) { - throw new RSIllegalArgumentException( - "Both ain and aout are required to be non-null."); - } - - long in_id = ain.getID(mRS); - long out_id = aout.getID(mRS); - - int[] limits = null; - if (sc != null) { - limits = new int[2]; - - limits[0] = sc.xstart; - limits[1] = sc.xend; - } - - mRS.nScriptReduce(getID(mRS), slot, in_id, out_id, limits); - } - - /** * Only intended for use by generated reflected code. (General reduction) * */ @@ -350,7 +321,7 @@ public class Script extends BaseObj { limits[5] = sc.zend; } - mRS.nScriptReduceNew(getID(mRS), slot, in_ids, out_id, limits); + mRS.nScriptReduce(getID(mRS), slot, in_ids, out_id, limits); } long[] mInIdsBuffer; |