Beispiel #1
0
        public virtual unsafe void Buffer2Array(global::Org.Jocl.Cl_mem p0, int[] p1)
        {
            if (id_buffer2Array_Lorg_jocl_cl_mem_arrayI == IntPtr.Zero)
            {
                id_buffer2Array_Lorg_jocl_cl_mem_arrayI = JNIEnv.GetMethodID(class_ref, "buffer2Array", "(Lorg/jocl/cl_mem;[I)V");
            }
            IntPtr native_p1 = JNIEnv.NewArray(p1);

            try {
                JValue *__args = stackalloc JValue [2];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(native_p1);

                if (GetType() == ThresholdType)
                {
                    JNIEnv.CallVoidMethod(((global::Java.Lang.Object) this).Handle, id_buffer2Array_Lorg_jocl_cl_mem_arrayI, __args);
                }
                else
                {
                    JNIEnv.CallNonvirtualVoidMethod(((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID(ThresholdClass, "buffer2Array", "(Lorg/jocl/cl_mem;[I)V"), __args);
                }
            } finally {
                if (p1 != null)
                {
                    JNIEnv.CopyArray(native_p1, p1);
                    JNIEnv.DeleteLocalRef(native_p1);
                }
            }
        }
Beispiel #2
0
        public virtual unsafe void Array2Buffer(float[] p0, global::Org.Jocl.Cl_mem p1)
        {
            if (id_array2Buffer_arrayFLorg_jocl_cl_mem_ == IntPtr.Zero)
            {
                id_array2Buffer_arrayFLorg_jocl_cl_mem_ = JNIEnv.GetMethodID(class_ref, "array2Buffer", "([FLorg/jocl/cl_mem;)V");
            }
            IntPtr native_p0 = JNIEnv.NewArray(p0);

            try {
                JValue *__args = stackalloc JValue [2];
                __args [0] = new JValue(native_p0);
                __args [1] = new JValue(p1);

                if (GetType() == ThresholdType)
                {
                    JNIEnv.CallVoidMethod(((global::Java.Lang.Object) this).Handle, id_array2Buffer_arrayFLorg_jocl_cl_mem_, __args);
                }
                else
                {
                    JNIEnv.CallNonvirtualVoidMethod(((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID(ThresholdClass, "array2Buffer", "([FLorg/jocl/cl_mem;)V"), __args);
                }
            } finally {
                if (p0 != null)
                {
                    JNIEnv.CopyArray(native_p0, p0);
                    JNIEnv.DeleteLocalRef(native_p0);
                }
            }
        }
Beispiel #3
0
 static void n_Buffer2Array_Lorg_jocl_cl_mem_arrayI(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, IntPtr native_p1)
 {
     global::Org.Encog.Engine.Opencl.EncogCLQueue __this = global::Java.Lang.Object.GetObject <global::Org.Encog.Engine.Opencl.EncogCLQueue> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Org.Jocl.Cl_mem p0 = global::Java.Lang.Object.GetObject <global::Org.Jocl.Cl_mem> (native_p0, JniHandleOwnership.DoNotTransfer);
     int[] p1 = (int[])JNIEnv.GetArray(native_p1, JniHandleOwnership.DoNotTransfer, typeof(int));
     __this.Buffer2Array(p0, p1);
     if (p1 != null)
     {
         JNIEnv.CopyArray(p1, native_p1);
     }
 }
Beispiel #4
0
 static void n_Array2Buffer_arrayFLorg_jocl_cl_mem_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, IntPtr native_p1)
 {
     global::Org.Encog.Engine.Opencl.EncogCLQueue __this = global::Java.Lang.Object.GetObject <global::Org.Encog.Engine.Opencl.EncogCLQueue> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     float[] p0 = (float[])JNIEnv.GetArray(native_p0, JniHandleOwnership.DoNotTransfer, typeof(float));
     global::Org.Jocl.Cl_mem p1 = global::Java.Lang.Object.GetObject <global::Org.Jocl.Cl_mem> (native_p1, JniHandleOwnership.DoNotTransfer);
     __this.Array2Buffer(p0, p1);
     if (p0 != null)
     {
         JNIEnv.CopyArray(p0, native_p0);
     }
 }