diff options
author | Stephen Hines <srhines@google.com> | 2014-08-13 17:32:49 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-08-12 19:57:35 +0000 |
commit | 4179e88963456946fe6e580f2211341cc8ccba5c (patch) | |
tree | 53aefa80f73827ffa611ea3a621a987de9eecd76 /rs/java/android/renderscript/RenderScript.java | |
parent | 24a2ee660aa216d45b06304303c1efa01f011024 (diff) | |
parent | c9c7daf69b32c0e72a3b99379cc5116c1647f24e (diff) |
Merge "Revert "Collapse code paths for single- and multi-input kernels.""
Diffstat (limited to 'rs/java/android/renderscript/RenderScript.java')
-rw-r--r-- | rs/java/android/renderscript/RenderScript.java | 50 |
1 files changed, 44 insertions, 6 deletions
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java index bd272bcc2e7b..f2b1380d5ac4 100644 --- a/rs/java/android/renderscript/RenderScript.java +++ b/rs/java/android/renderscript/RenderScript.java @@ -590,14 +590,52 @@ public class RenderScript { validate(); rsnScriptInvoke(mContext, id, slot); } + native void rsnScriptForEach(long con, long id, int slot, long ain, long aout, byte[] params); + native void rsnScriptForEach(long con, long id, int slot, long ain, long aout); + native void rsnScriptForEachClipped(long con, long id, int slot, long ain, long aout, byte[] params, + int xstart, int xend, int ystart, int yend, int zstart, int zend); + native void rsnScriptForEachClipped(long con, long id, int slot, long ain, long aout, + int xstart, int xend, int ystart, int yend, int zstart, int zend); + synchronized void nScriptForEach(long id, int slot, long ain, long aout, byte[] params) { + validate(); + if (params == null) { + rsnScriptForEach(mContext, id, slot, ain, aout); + } else { + rsnScriptForEach(mContext, id, slot, ain, aout, params); + } + } - native void rsnScriptForEach(long con, long id, int slot, long[] ains, - long aout, byte[] params, int[] limits); - - synchronized void nScriptForEach(long id, int slot, long[] ains, long aout, - byte[] params, int[] limits) { + synchronized void nScriptForEachClipped(long id, int slot, long ain, long aout, byte[] params, + int xstart, int xend, int ystart, int yend, int zstart, int zend) { validate(); - rsnScriptForEach(mContext, id, slot, ains, aout, params, limits); + if (params == null) { + rsnScriptForEachClipped(mContext, id, slot, ain, aout, xstart, xend, ystart, yend, zstart, zend); + } else { + rsnScriptForEachClipped(mContext, id, slot, ain, aout, params, xstart, xend, ystart, yend, zstart, zend); + } + } + + /** + * Multi-input code. + * + */ + + // @hide + native void rsnScriptForEachMultiClipped(long con, long id, int slot, long[] ains, long aout, byte[] params, + int xstart, int xend, int ystart, int yend, int zstart, int zend); + // @hide + native void rsnScriptForEachMultiClipped(long con, long id, int slot, long[] ains, long aout, + int xstart, int xend, int ystart, int yend, int zstart, int zend); + + // @hide + synchronized void nScriptForEachMultiClipped(long id, int slot, long[] ains, long aout, byte[] params, + int xstart, int xend, int ystart, int yend, int zstart, int zend) { + validate(); + if (params == null) { + rsnScriptForEachMultiClipped(mContext, id, slot, ains, aout, xstart, xend, ystart, yend, zstart, zend); + } else { + rsnScriptForEachMultiClipped(mContext, id, slot, ains, aout, params, xstart, xend, ystart, yend, zstart, zend); + } } native void rsnScriptInvokeV(long con, long id, int slot, byte[] params); |