diff options
author | Chris Wailes <chriswailes@google.com> | 2014-06-11 12:01:28 -0700 |
---|---|---|
committer | Chris Wailes <chriswailes@google.com> | 2014-07-07 12:27:21 -0700 |
commit | 949610653fdf55dd2cb3c846047e6aa2c6d73f0d (patch) | |
tree | 3062df8ab3960637b2179d4caf688ca97228e627 /rs/java/android/renderscript/RenderScript.java | |
parent | ef2e76675a6c60a2a4764a2e19fdb2c4d9beb00e (diff) |
Adds support for multi-input kernels to Frameworks/Base/RS.
* Added a new JNI call to pass arrays of Allocations to the RS runtime.
* Added a new version of ForEach that takes an array of Allocations.
* Added some casts to disambiguate existing calls to forEach.
Change-Id: I46d2834c37075b2a2407fd8b010546818a4540d1
Diffstat (limited to 'rs/java/android/renderscript/RenderScript.java')
-rw-r--r-- | rs/java/android/renderscript/RenderScript.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java index bbe5c4976adf..f2b1380d5ac4 100644 --- a/rs/java/android/renderscript/RenderScript.java +++ b/rs/java/android/renderscript/RenderScript.java @@ -615,6 +615,29 @@ public class RenderScript { } } + /** + * 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); synchronized void nScriptInvokeV(long id, int slot, byte[] params) { validate(); |