Merge "[Renderscript] JAVA API update for Allocation.CopyTo add the following functions to make it more symmetric to copyFrom()."
diff --git a/v8/renderscript/java/src/android/support/v8/renderscript/Allocation.java b/v8/renderscript/java/src/android/support/v8/renderscript/Allocation.java
index f5a513c..7b62cf8 100644
--- a/v8/renderscript/java/src/android/support/v8/renderscript/Allocation.java
+++ b/v8/renderscript/java/src/android/support/v8/renderscript/Allocation.java
@@ -759,6 +759,64 @@
component_number, data, data_length);
}
+ /**
+ * @hide
+ * This is only intended to be used by auto-generated code reflected from
+ * the RenderScript script files.
+ *
+ * @param xoff
+ * @param yoff
+ * @param component_number
+ * @param fp
+ */
+ /*
+ public void setFromFieldPacker(int xoff, int yoff, int component_number, FieldPacker fp) {
+ setFromFieldPacker(xoff, yoff, 0, component_number, fp);
+ }
+ */
+
+ /**
+ * @hide
+ * This is only intended to be used by auto-generated code reflected from
+ * the RenderScript script files.
+ *
+ * @param xoff
+ * @param yoff
+ * @param zoff
+ * @param component_number
+ * @param fp
+ */
+ /*
+ public void setFromFieldPacker(int xoff, int yoff, int zoff, int component_number, FieldPacker fp) {
+ mRS.validate();
+ if (component_number >= mType.mElement.mElements.length) {
+ throw new RSIllegalArgumentException("Component_number " + component_number + " out of range.");
+ }
+ if(xoff < 0) {
+ throw new RSIllegalArgumentException("Offset x must be >= 0.");
+ }
+ if(yoff < 0) {
+ throw new RSIllegalArgumentException("Offset y must be >= 0.");
+ }
+ if(zoff < 0) {
+ throw new RSIllegalArgumentException("Offset z must be >= 0.");
+ }
+
+ final byte[] data = fp.getData();
+ int data_length = fp.getPos();
+ int eSize = mType.mElement.mElements[component_number].getBytesSize();
+ eSize *= mType.mElement.mArraySizes[component_number];
+
+ if (data_length != eSize) {
+ throw new RSIllegalArgumentException("Field packer sizelength " + data_length +
+ " does not match component size " + eSize + ".");
+ }
+
+ mRS.nAllocationElementData(getIDSafe(), xoff, yoff, zoff, mSelectedLOD,
+ component_number, data, data_length);
+ }
+ */
+
private void data1DChecks(int off, int count, int len, int dataSize) {
mRS.validate();
if(off < 0) {
@@ -1250,6 +1308,354 @@
copyTo(d, Element.DataType.FLOAT_32, d.length);
}
+ /**
+ * @hide
+ * Copy subelement from the Allocation into an object array.
+ * This is intended to be used with user defined structs
+ *
+ * @param xoff
+ * @param component_number
+ * @param array
+ */
+ /*
+ public void copyElementTo(int xoff, int component_number, Object array) {
+ copyElementTo(xoff, 0, 0, component_number, array);
+ }
+ */
+
+ /**
+ * @hide
+ * Copy subelement from the Allocation into an object array.
+ * This is intended to be used with user defined structs
+ *
+ * @param xoff
+ * @param yoff
+ * @param component_number
+ * @param array
+ */
+ /*
+ public void copyElementTo(int xoff, int yoff, int component_number, Object array) {
+ copyElementTo(xoff, yoff, 0, component_number, array);
+ }
+ */
+
+ /**
+ * @hide
+ * Copy subelement from the Allocation into an object array.
+ * This is intended to be used with user defined structs
+ *
+ * @param xoff
+ * @param yoff
+ * @param zoff
+ * @param component_number
+ * @param array
+ */
+ /*
+ public void copyElementTo(int xoff, int yoff, int zoff, int component_number, Object array) {
+ mRS.validate();
+ if (component_number >= mType.mElement.mElements.length) {
+ throw new RSIllegalArgumentException("Component_number " + component_number + " out of range.");
+ }
+ if(xoff < 0) {
+ throw new RSIllegalArgumentException("Offset x must be >= 0.");
+ }
+ if(yoff < 0) {
+ throw new RSIllegalArgumentException("Offset y must be >= 0.");
+ }
+ if(zoff < 0) {
+ throw new RSIllegalArgumentException("Offset z must be >= 0.");
+ }
+
+ Element.DataType dt = validateObjectIsPrimitiveArray(array, false);
+ int array_size = java.lang.reflect.Array.getLength(array) * dt.mSize;
+ int eSize = mType.mElement.mElements[component_number].getBytesSize();
+ eSize *= mType.mElement.mArraySizes[component_number];
+
+ if (array_size < eSize) {
+ throw new RSIllegalArgumentException("Array Size (bytes)" + array_size +
+ " is smaller than component size " + eSize + ".");
+ }
+
+ mRS.nAllocationElementRead(getIDSafe(), xoff, yoff, zoff, mSelectedLOD,
+ component_number, array, eSize, dt);
+ }
+ */
+
+ private void copy1DRangeToUnchecked(int off, int count, Object array,
+ Element.DataType dt, int arrayLen) {
+ final int dataSize = mType.mElement.getBytesSize() * count;
+ data1DChecks(off, count, arrayLen * dt.mSize, dataSize);
+ mRS.nAllocationRead1D(getIDSafe(), off, mSelectedLOD, count, array, dataSize, dt);
+ }
+
+ /**
+ * @hide
+ * Copy part of this Allocation into an array. This method does not
+ * guarantee that the Allocation is compatible with the input buffer.
+ *
+ * @param off The offset of the first element to be copied.
+ * @param count The number of elements to be copied.
+ * @param array The dest data array
+ */
+ public void copy1DRangeToUnchecked(int off, int count, Object array) {
+ copy1DRangeToUnchecked(off, count, array,
+ validateObjectIsPrimitiveArray(array, false),
+ java.lang.reflect.Array.getLength(array));
+ }
+
+ /**
+ * @hide
+ * Copy part of this Allocation into an array. This method does not
+ * guarantee that the Allocation is compatible with the input buffer.
+ *
+ * @param off The offset of the first element to be copied.
+ * @param count The number of elements to be copied.
+ * @param d the source data array
+ */
+ public void copy1DRangeToUnchecked(int off, int count, int[] d) {
+ copy1DRangeToUnchecked(off, count, (Object)d, Element.DataType.SIGNED_32, d.length);
+ }
+
+ /**
+ * @hide
+ * Copy part of this Allocation into an array. This method does not
+ * guarantee that the Allocation is compatible with the input buffer.
+ *
+ * @param off The offset of the first element to be copied.
+ * @param count The number of elements to be copied.
+ * @param d the source data array
+ */
+ public void copy1DRangeToUnchecked(int off, int count, short[] d) {
+ copy1DRangeToUnchecked(off, count, (Object)d, Element.DataType.SIGNED_16, d.length);
+ }
+
+ /**
+ * @hide
+ * Copy part of this Allocation into an array. This method does not
+ * guarantee that the Allocation is compatible with the input buffer.
+ *
+ * @param off The offset of the first element to be copied.
+ * @param count The number of elements to be copied.
+ * @param d the source data array
+ */
+ public void copy1DRangeToUnchecked(int off, int count, byte[] d) {
+ copy1DRangeToUnchecked(off, count, (Object)d, Element.DataType.SIGNED_8, d.length);
+ }
+
+ /**
+ * @hide
+ * Copy part of this Allocation into an array. This method does not
+ * guarantee that the Allocation is compatible with the input buffer.
+ *
+ * @param off The offset of the first element to be copied.
+ * @param count The number of elements to be copied.
+ * @param d the source data array
+ */
+ public void copy1DRangeToUnchecked(int off, int count, float[] d) {
+ copy1DRangeToUnchecked(off, count, (Object)d, Element.DataType.FLOAT_32, d.length);
+ }
+
+
+ /**
+ * @hide
+ * Copy part of this Allocation into an array. This method does not
+ * and will generate exceptions if the Allocation type does not
+ * match the component type of the array passed in.
+ *
+ * @param off The offset of the first element to be copied.
+ * @param count The number of elements to be copied.
+ * @param array The source data array.
+ */
+ public void copy1DRangeTo(int off, int count, Object array) {
+ copy1DRangeToUnchecked(off, count, array,
+ validateObjectIsPrimitiveArray(array, true),
+ java.lang.reflect.Array.getLength(array));
+ }
+
+ /**
+ * @hide
+ * Copy part of this Allocation into an array. This method does not
+ * and will generate exceptions if the Allocation type is not a 32 bit
+ * integer type.
+ *
+ * @param off The offset of the first element to be copied.
+ * @param count The number of elements to be copied.
+ * @param d the source data array
+ */
+ public void copy1DRangeTo(int off, int count, int[] d) {
+ validateIsInt32();
+ copy1DRangeToUnchecked(off, count, d, Element.DataType.SIGNED_32, d.length);
+ }
+
+ /**
+ * @hide
+ * Copy part of this Allocation into an array. This method does not
+ * and will generate exceptions if the Allocation type is not a 16 bit
+ * integer type.
+ *
+ * @param off The offset of the first element to be copied.
+ * @param count The number of elements to be copied.
+ * @param d the source data array
+ */
+ public void copy1DRangeTo(int off, int count, short[] d) {
+ validateIsInt16();
+ copy1DRangeToUnchecked(off, count, d, Element.DataType.SIGNED_16, d.length);
+ }
+
+ /**
+ * @hide
+ * Copy part of this Allocation into an array. This method does not
+ * and will generate exceptions if the Allocation type is not an 8 bit
+ * integer type.
+ *
+ * @param off The offset of the first element to be copied.
+ * @param count The number of elements to be copied.
+ * @param d the source data array
+ */
+ public void copy1DRangeTo(int off, int count, byte[] d) {
+ validateIsInt8();
+ copy1DRangeToUnchecked(off, count, d, Element.DataType.SIGNED_8, d.length);
+ }
+
+ /**
+ * @hide
+ * Copy part of this Allocation into an array. This method does not
+ * and will generate exceptions if the Allocation type is not a 32 bit float
+ * type.
+ *
+ * @param off The offset of the first element to be copied.
+ * @param count The number of elements to be copied.
+ * @param d the source data array.
+ */
+ public void copy1DRangeTo(int off, int count, float[] d) {
+ validateIsFloat32();
+ copy1DRangeToUnchecked(off, count, d, Element.DataType.FLOAT_32, d.length);
+ }
+
+
+ void copy2DRangeToUnchecked(int xoff, int yoff, int w, int h, Object array,
+ Element.DataType dt, int arrayLen) {
+ mRS.validate();
+ validate2DRange(xoff, yoff, w, h);
+ mRS.nAllocationRead2D(getIDSafe(), xoff, yoff, mSelectedLOD, mSelectedFace.mID, w, h,
+ array, arrayLen * dt.mSize, dt);
+ }
+
+ /**
+ * @hide
+ * Copy from a rectangular region in this Allocation into an array.
+ *
+ * @param xoff X offset of the region to copy in this Allocation
+ * @param yoff Y offset of the region to copy in this Allocation
+ * @param w Width of the region to copy
+ * @param h Height of the region to copy
+ * @param array Dest Array to be copied into
+ */
+ public void copy2DRangeTo(int xoff, int yoff, int w, int h, Object array) {
+ copy2DRangeToUnchecked(xoff, yoff, w, h, array,
+ validateObjectIsPrimitiveArray(array, true),
+ java.lang.reflect.Array.getLength(array));
+ }
+
+ /**
+ * @hide
+ * Copy from a rectangular region in this Allocation into an array.
+ *
+ * @param xoff X offset of the region to copy in this Allocation
+ * @param yoff Y offset of the region to copy in this Allocation
+ * @param w Width of the region to copy
+ * @param h Height of the region to copy
+ * @param array Dest Array to be copied into
+ */
+ public void copy2DRangeTo(int xoff, int yoff, int w, int h, byte[] data) {
+ validateIsInt8();
+ copy2DRangeToUnchecked(xoff, yoff, w, h, data,
+ Element.DataType.SIGNED_8, data.length);
+ }
+
+ /**
+ * @hide
+ * Copy from a rectangular region in this Allocation into an array.
+ *
+ * @param xoff X offset of the region to copy in this Allocation
+ * @param yoff Y offset of the region to copy in this Allocation
+ * @param w Width of the region to copy
+ * @param h Height of the region to copy
+ * @param array Dest Array to be copied into
+ */
+ public void copy2DRangeTo(int xoff, int yoff, int w, int h, short[] data) {
+ validateIsInt16();
+ copy2DRangeToUnchecked(xoff, yoff, w, h, data,
+ Element.DataType.SIGNED_16, data.length);
+ }
+
+ /**
+ * @hide
+ * Copy from a rectangular region in this Allocation into an array.
+ *
+ * @param xoff X offset of the region to copy in this Allocation
+ * @param yoff Y offset of the region to copy in this Allocation
+ * @param w Width of the region to copy
+ * @param h Height of the region to copy
+ * @param array Dest Array to be copied into
+ */
+ public void copy2DRangeTo(int xoff, int yoff, int w, int h, int[] data) {
+ validateIsInt32();
+ copy2DRangeToUnchecked(xoff, yoff, w, h, data,
+ Element.DataType.SIGNED_32, data.length);
+ }
+
+ /**
+ * @hide
+ * Copy from a rectangular region in this Allocation into an array.
+ *
+ * @param xoff X offset of the region to copy in this Allocation
+ * @param yoff Y offset of the region to copy in this Allocation
+ * @param w Width of the region to copy
+ * @param h Height of the region to copy
+ * @param array Dest Array to be copied into
+ */
+ public void copy2DRangeTo(int xoff, int yoff, int w, int h, float[] data) {
+ validateIsFloat32();
+ copy2DRangeToUnchecked(xoff, yoff, w, h, data,
+ Element.DataType.FLOAT_32, data.length);
+ }
+
+
+ /**
+ * @hide
+ *
+ */
+ /*
+ private void copy3DRangeToUnchecked(int xoff, int yoff, int zoff, int w, int h, int d,
+ Object array, Element.DataType dt, int arrayLen) {
+ mRS.validate();
+ validate3DRange(xoff, yoff, zoff, w, h, d);
+ mRS.nAllocationRead3D(getIDSafe(), xoff, yoff, zoff, mSelectedLOD, w, h, d,
+ array, arrayLen * dt.mSize, dt);
+ }
+ */
+
+ /**
+ * @hide
+ * Copy from a rectangular region in this Allocation into an array.
+ *
+ * @param xoff X offset of the region to copy in this Allocation
+ * @param yoff Y offset of the region to copy in this Allocation
+ * @param zoff Z offset of the region to copy in this Allocation
+ * @param w Width of the region to copy
+ * @param h Height of the region to copy
+ * @param d Depth of the region to copy
+ * @param array Dest Array to be copied into
+ */
+ /*
+ public void copy3DRangeTo(int xoff, int yoff, int zoff, int w, int h, int d, Object array) {
+ copy3DRangeToUnchecked(xoff, yoff, zoff, w, h, d, array,
+ validateObjectIsPrimitiveArray(array, true),
+ java.lang.reflect.Array.getLength(array));
+ }
+ */
+
// creation
static BitmapFactory.Options mBitmapOptions = new BitmapFactory.Options();
diff --git a/v8/renderscript/java/src/android/support/v8/renderscript/RenderScript.java b/v8/renderscript/java/src/android/support/v8/renderscript/RenderScript.java
index a379a30..0f12ca3 100644
--- a/v8/renderscript/java/src/android/support/v8/renderscript/RenderScript.java
+++ b/v8/renderscript/java/src/android/support/v8/renderscript/RenderScript.java
@@ -383,11 +383,18 @@
rsnAllocationData1D(mContext, id, off, mip, count, d, sizeBytes, dt.mID);
}
- native void rsnAllocationElementData1D(long con, long id, int xoff, int mip, int compIdx, byte[] d, int sizeBytes);
+ native void rsnAllocationElementData1D(long con,long id, int xoff, int mip, int compIdx, byte[] d, int sizeBytes);
synchronized void nAllocationElementData1D(long id, int xoff, int mip, int compIdx, byte[] d, int sizeBytes) {
validate();
rsnAllocationElementData1D(mContext, id, xoff, mip, compIdx, d, sizeBytes);
}
+ /*
+ native void rsnAllocationElementData(long con,long id, int xoff, int yoff, int zoff, int mip, int compIdx, byte[] d, int sizeBytes);
+ synchronized void nAllocationElementData(long id, int xoff, int yoff, int zoff, int mip, int compIdx, byte[] d, int sizeBytes) {
+ validate();
+ rsnAllocationElementData(mContext, id, xoff, yoff, zoff, mip, compIdx, d, sizeBytes);
+ }
+ */
native void rsnAllocationData2D(long con,
long dstAlloc, int dstXoff, int dstYoff,
@@ -463,6 +470,17 @@
validate();
rsnAllocationRead1D(mContext, id, off, mip, count, d, sizeBytes, dt.mID);
}
+
+ /*
+ native void rsnAllocationElementRead(long con,long id, int xoff, int yoff, int zoff,
+ int mip, int compIdx, Object d, int sizeBytes, int dt);
+ synchronized void nAllocationElementRead(long id, int xoff, int yoff, int zoff,
+ int mip, int compIdx, Object d, int sizeBytes,
+ Element.DataType dt) {
+ validate();
+ rsnAllocationElementRead(mContext, id, xoff, yoff, zoff, mip, compIdx, d, sizeBytes, dt.mID);
+ }
+ */
native void rsnAllocationRead2D(long con, long id, int xoff, int yoff, int mip, int face,
int w, int h, Object d, int sizeBytes, int dt);
@@ -472,6 +490,16 @@
rsnAllocationRead2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes, dt.mID);
}
+ /*
+ native void rsnAllocationRead3D(long con, long id, int xoff, int yoff, int zoff, int mip,
+ int w, int h, int depth, Object d, int sizeBytes, int dt);
+ synchronized void nAllocationRead3D(long id, int xoff, int yoff, int zoff, int mip,
+ int w, int h, int depth, Object d, int sizeBytes, Element.DataType dt) {
+ validate();
+ rsnAllocationRead3D(mContext, id, xoff, yoff, zoff, mip, w, h, depth, d, sizeBytes, dt.mID);
+ }
+ */
+
native long rsnAllocationGetType(long con, long id);
synchronized long nAllocationGetType(long id) {
validate();
diff --git a/v8/renderscript/jni/android_renderscript_RenderScript.cpp b/v8/renderscript/jni/android_renderscript_RenderScript.cpp
index bd35a5e..b33d013 100644
--- a/v8/renderscript/jni/android_renderscript_RenderScript.cpp
+++ b/v8/renderscript/jni/android_renderscript_RenderScript.cpp
@@ -691,20 +691,39 @@
ptr, sizeBytes);
}
+
static void
-// native void rsnAllocationElementData1D(int con, int id, int xoff, int compIdx, byte[] d, int sizeBytes);
-nAllocationElementData1D(JNIEnv *_env, jobject _this, jlong con, jlong alloc, jint offset,
- jint lod, jint compIdx, jbyteArray data, int sizeBytes)
+nAllocationElementData1D(JNIEnv *_env, jobject _this, jlong con, jlong alloc, jint xoff,
+ jint lod, jint compIdx, jbyteArray data, jint sizeBytes)
{
jint len = _env->GetArrayLength(data);
- LOG_API("nAllocationElementData1D, con(%p), alloc(%p), offset(%i), comp(%i), len(%i), sizeBytes(%i)",
- (RsContext)con, (RsAllocation)alloc, offset, compIdx, len, sizeBytes);
- jbyte *ptr = _env->GetByteArrayElements(data, NULL);
- dispatchTab.Allocation1DElementData((RsContext)con, (RsAllocation)alloc, offset, lod,
- ptr, sizeBytes, compIdx);
+ LOG_API("nAllocationElementData1D, con(%p), alloc(%p), xoff(%i), comp(%i), len(%i), "
+ "sizeBytes(%i)", (RsContext)con, (RsAllocation)alloc, xoff, compIdx, len,
+ sizeBytes);
+ jbyte *ptr = _env->GetByteArrayElements(data, nullptr);
+ dispatchTab.Allocation1DElementData((RsContext)con, (RsAllocation)alloc, xoff,
+ lod, ptr, sizeBytes, compIdx);
_env->ReleaseByteArrayElements(data, ptr, JNI_ABORT);
}
+/*
+static void
+nAllocationElementData(JNIEnv *_env, jobject _this, jlong con, jlong alloc,
+ jint xoff, jint yoff, jint zoff,
+ jint lod, jint compIdx, jbyteArray data, jint sizeBytes)
+{
+ jint len = _env->GetArrayLength(data);
+ LOG_API("nAllocationElementData, con(%p), alloc(%p), xoff(%i), yoff(%i), zoff(%i), comp(%i), len(%i), "
+ "sizeBytes(%i)", (RsContext)con, (RsAllocation)alloc, xoff, yoff, zoff, compIdx, len,
+ sizeBytes);
+ jbyte *ptr = _env->GetByteArrayElements(data, nullptr);
+ dispatchTab.AllocationElementData((RsContext)con, (RsAllocation)alloc,
+ xoff, yoff, zoff,
+ lod, ptr, sizeBytes, compIdx);
+ _env->ReleaseByteArrayElements(data, ptr, JNI_ABORT);
+}
+*/
+
// Copies from the Java object data into the Allocation pointed to by _alloc.
static void
nAllocationData2D(JNIEnv *_env, jobject _this, jlong con, jlong _alloc, jint xoff, jint yoff, jint lod, jint _face,
@@ -795,6 +814,21 @@
PER_ARRAY_TYPE(0, dispatchTab.Allocation1DRead, false, (RsContext)con, alloc, offset, lod, count, ptr, sizeBytes);
}
+// Copies from the Element in the Allocation pointed to by _alloc into the Java array data.
+/*
+static void
+nAllocationElementRead(JNIEnv *_env, jobject _this, jlong con, jlong _alloc,
+ jint xoff, jint yoff, jint zoff,
+ jint lod, jint compIdx, jobject data, jint sizeBytes, int dataType)
+{
+ RsAllocation *alloc = (RsAllocation *)_alloc;
+ LOG_API("nAllocationElementRead, con(%p), alloc(%p), xoff(%i), yoff(%i), zoff(%i), comp(%i), "
+ "sizeBytes(%i)", (RsContext)con, alloc, xoff, yoff, zoff, compIdx, sizeBytes);
+ PER_ARRAY_TYPE(0, dispatchTab.AllocationElementRead, false, (RsContext)con, alloc,
+ xoff, yoff, zoff, lod, ptr, sizeBytes, compIdx);
+}
+*/
+
// Copies from the Allocation pointed to by _alloc into the Java object data.
static void
nAllocationRead2D(JNIEnv *_env, jobject _this, jlong con, jlong _alloc, jint xoff, jint yoff, jint lod, jint _face,
@@ -808,6 +842,21 @@
ptr, sizeBytes, 0);
}
+// Copies from the Allocation pointed to by _alloc into the Java object data.
+/*
+static void
+nAllocationRead3D(JNIEnv *_env, jobject _this, jlong con, jlong _alloc, jint xoff, jint yoff, jint zoff, jint lod,
+ jint w, jint h, jint d, jobject data, int sizeBytes, int dataType)
+{
+ RsAllocation *alloc = (RsAllocation *)_alloc;
+ LOG_API("nAllocation3DRead, con(%p), alloc(%p), xoff(%i), yoff(%i), zoff(%i), lod(%i), w(%i),"
+ " h(%i), d(%i), sizeBytes(%i)", (RsContext)con, (RsAllocation)alloc, xoff, yoff, zoff,
+ lod, w, h, d, sizeBytes);
+ PER_ARRAY_TYPE(nullptr, dispatchTab.Allocation3DRead, false, (RsContext)con, alloc, xoff, yoff, zoff,
+ lod, w, h, d, ptr, sizeBytes, 0);
+}
+*/
+
static jlong
nAllocationGetType(JNIEnv *_env, jobject _this, jlong con, jlong a)
{
@@ -1241,13 +1290,16 @@
{"rsnAllocationIoSend", "(JJ)V", (void*)nAllocationIoSend },
{"rsnAllocationData1D", "(JJIIILjava/lang/Object;II)V", (void*)nAllocationData1D },
{"rsnAllocationElementData1D", "(JJIII[BI)V", (void*)nAllocationElementData1D },
+//{"rsnAllocationElementData", "(JJIIIII[BI)V", (void*)nAllocationElementData },
{"rsnAllocationData2D", "(JJIIIIIILjava/lang/Object;II)V", (void*)nAllocationData2D },
{"rsnAllocationData2D", "(JJIIIIIIJIIII)V", (void*)nAllocationData2D_alloc },
{"rsnAllocationData3D", "(JJIIIIIIILjava/lang/Object;II)V", (void*)nAllocationData3D },
{"rsnAllocationData3D", "(JJIIIIIIIJIIII)V", (void*)nAllocationData3D_alloc },
{"rsnAllocationRead", "(JJLjava/lang/Object;I)V", (void*)nAllocationRead },
{"rsnAllocationRead1D", "(JJIIILjava/lang/Object;II)V", (void*)nAllocationRead1D },
+//{"rsnAllocationElementRead", "(JJIIIIILjava/lang/Object;II)V", (void*)nAllocationElementRead },
{"rsnAllocationRead2D", "(JJIIIIIILjava/lang/Object;II)V", (void*)nAllocationRead2D },
+//{"rsnAllocationRead3D", "(JJIIIIIIILjava/lang/Object;II)V", (void*)nAllocationRead3D },
{"rsnAllocationGetType", "(JJ)J", (void*)nAllocationGetType},
{"rsnAllocationResize1D", "(JJI)V", (void*)nAllocationResize1D },
{"rsnAllocationGenerateMipmaps", "(JJ)V", (void*)nAllocationGenerateMipmaps },