From 4df2a1b266a25c1d37126acdb82cf578ac61f9a8 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Tue, 27 Oct 2009 18:51:36 +0100 Subject: generified CLBuffer, added createFromGLBuffer(...). --- resources/clImplCustomCode.c | 4 ++-- resources/clImplCustomCode.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'resources') diff --git a/resources/clImplCustomCode.c b/resources/clImplCustomCode.c index 57d1c3e3..864edc6b 100644 --- a/resources/clImplCustomCode.c +++ b/resources/clImplCustomCode.c @@ -110,7 +110,7 @@ Java_com_mbien_opencl_impl_CLImpl_clCreateContext1(JNIEnv *env, jobject _unused, */ JNIEXPORT jint JNICALL Java_com_mbien_opencl_impl_CLImpl_clBuildProgram1(JNIEnv *env, jobject _unused, - jlong program, jint deviceCount, jobject deviceList, jint offset, jstring options, jobject cb, jobject data) { + jlong program, jint deviceCount, jobject deviceList, jstring options, jobject cb, jobject data) { const char* _strchars_options = NULL; cl_int _res; @@ -126,7 +126,7 @@ Java_com_mbien_opencl_impl_CLImpl_clBuildProgram1(JNIEnv *env, jobject _unused, } if (deviceList != NULL) { - _deviceListPtr = (void *) (((char*) (*env)->GetPrimitiveArrayCritical(env, deviceList, NULL)) + offset); + _deviceListPtr = (void *) (((char*) (*env)->GetPrimitiveArrayCritical(env, deviceList, NULL))); } // TODO payload, callback... diff --git a/resources/clImplCustomCode.java b/resources/clImplCustomCode.java index d74d5b82..c368fe53 100644 --- a/resources/clImplCustomCode.java +++ b/resources/clImplCustomCode.java @@ -46,8 +46,8 @@ if(deviceList != null) listLength = deviceList.length; - return clBuildProgram1(program, listLength, deviceList, 0, options, cb, userData); + return clBuildProgram1(program, listLength, deviceList, options, cb, userData); } /** Entry point to C language function: int32_t clBuildProgram(cl_program, uint32_t, cl_device_id * , const char * , void * ); */ - private native int clBuildProgram1(long program, int devices, Object deviceList, int arg2_byte_offset, String options, BuildProgramCallback cb, Object userData); + private native int clBuildProgram1(long program, int devices, Object deviceList, String options, BuildProgramCallback cb, Object userData); -- cgit v1.2.3