diff options
author | Michael Bien <[email protected]> | 2011-05-27 03:00:12 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2011-05-27 03:00:12 +0200 |
commit | a444a384b808e423f2e8377ff14c69b0c4be043a (patch) | |
tree | 56050afad314344ee8c99aa57698969da97b3d97 | |
parent | 08a479b22d4ba9da9ee79fc938ac4de7fb83dc5a (diff) |
LLB refactoring.
- split up CL into multiple sub interfaces
- seperation is now feature wise
- introdused llb package for low level classes
54 files changed, 446 insertions, 129 deletions
@@ -93,7 +93,119 @@ <echo message=" - - - generate JOCL binding files - - - "/> - <echo message="generate CL interface..."/> + <echo message="generate CL interfaces..."/> + + <echo message="context..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-context-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="program..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-program-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="kernel..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-kernel-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="queue..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-queue-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="device..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-device-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="memobj..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-mem-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="image..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-image-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="buffer..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-buffer-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="sampler..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-sampler-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="event..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-event-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="platform..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-platform-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="CL..."/> <gluegen src="resources/opencl.h" config="resources/cl-if.cfg" includeRefid="jocl.include.path" @@ -103,7 +215,7 @@ <classpath refid="gluegen.classpath" /> </gluegen> - <echo message="generate CLGLI interface..."/> + <echo message="CLGL..."/> <gluegen src="resources/opencl.h" config="resources/clgl-if.cfg" includeRefid="jocl.include.path" @@ -112,7 +224,7 @@ <classpath refid="gluegen.classpath" /> </gluegen> - <echo message="generate GLImpl..."/> + <echo message="GLImpl..."/> <gluegen src="resources/opencl.h" config="resources/cl-impl.cfg" includeRefid="jocl.include.path" diff --git a/resources/cl-buffer-if.cfg b/resources/cl-buffer-if.cfg new file mode 100644 index 0000000..95d5f57 --- /dev/null +++ b/resources/cl-buffer-if.cfg @@ -0,0 +1,13 @@ +Include cl-common.cfg + +Style InterfaceOnly + +ClassJavadoc CLBuffer /** +ClassJavadoc CLBuffer * Java bindings to OpenCL, the Open Computing Language. +ClassJavadoc CLBuffer * @author Michael Bien +ClassJavadoc CLBuffer */ +JavaClass CLBuffer + +Extends CLBuffer CLMemObj + +IgnoreNot .*CreateBuffer.*|.*CreateSubBuffer.* diff --git a/resources/cl-common.cfg b/resources/cl-common.cfg index baac28f..36c5d66 100644 --- a/resources/cl-common.cfg +++ b/resources/cl-common.cfg @@ -1,7 +1,7 @@ JavaOutputDir gensrc/java NativeOutputDir gensrc/native -Package com.jogamp.opencl +Package com.jogamp.opencl.llb #map pointers to long as internal representation Opaque long cl_context @@ -98,7 +98,7 @@ NioDirectOnly clGetGLContextInfoKHR #common rename emitted struct accessors #struct cl_image_format RenameJavaType cl_image_format CLImageFormatImpl -StructPackage cl_image_format com.jogamp.opencl.impl +StructPackage cl_image_format com.jogamp.opencl.llb.impl #struct fields ([set|get]+FieldName()) RenameJavaMethod image_channel_order imageChannelOrder diff --git a/resources/cl-context-if.cfg b/resources/cl-context-if.cfg new file mode 100644 index 0000000..ce7fba2 --- /dev/null +++ b/resources/cl-context-if.cfg @@ -0,0 +1,23 @@ +Include cl-common.cfg + +Style InterfaceOnly + +Import com.jogamp.opencl.llb.impl.CLImageFormatImpl +Import com.jogamp.opencl.CLErrorHandler + +ClassJavadoc CLContext /** +ClassJavadoc CLContext * Java bindings to OpenCL, the Open Computing Language. +ClassJavadoc CLContext * @author Michael Bien +ClassJavadoc CLContext */ +JavaClass CLContext + +IgnoreNot clGetSupportedImageFormats.*|.*GetContextInfo.*|.*RetainContext.*|.*ReleaseContext.*|CL_CONTEXT_.* + +#custom implementations +CustomJavaCode CLContext +CustomJavaCode CLContext /** Interface to C language function: <br> <code> cl_context {@native clCreateContext}(intptr_t * , uint32_t, cl_device_id * , void (*pfn_notify)(const char *, const void *, size_t, void *), void *, int32_t * ); </code> */ +CustomJavaCode CLContext public long clCreateContext(NativeSizeBuffer properties, NativeSizeBuffer devices, CLErrorHandler pfn_notify, IntBuffer errcode_ret); + +CustomJavaCode CLContext +CustomJavaCode CLContext /** Interface to C language function: <br> <code> cl_context {@native clCreateContextFromType}(cl_context_properties *properties, cl_device_type device_type, void (*pfn_notify)(const char *errinfo, const void *private_info, size_t cb, void *user_data), void *user_data, cl_int *errcode_ret) ; </code> */ +CustomJavaCode CLContext public long clCreateContextFromType(NativeSizeBuffer properties, long device_type, CLErrorHandler pfn_notify, IntBuffer errcode_ret); diff --git a/resources/cl-device-if.cfg b/resources/cl-device-if.cfg new file mode 100644 index 0000000..fe09a34 --- /dev/null +++ b/resources/cl-device-if.cfg @@ -0,0 +1,12 @@ +Include cl-common.cfg + +Style InterfaceOnly + +ClassJavadoc CLDevice /** +ClassJavadoc CLDevice * Java bindings to OpenCL, the Open Computing Language. +ClassJavadoc CLDevice * @author Michael Bien +ClassJavadoc CLDevice */ +JavaClass CLDevice + +IgnoreNot .*CreateSubDevice.*|.*GetDeviceInfo.*|.*RetainDevice.*|.*ReleaseDevice.*|CL_DEVICE_.*|CL_FP_.*|CL_GLOBAL|CL_LOCAL|CL_READ_.*_CACHE + diff --git a/resources/cl-event-if.cfg b/resources/cl-event-if.cfg new file mode 100644 index 0000000..5d24302 --- /dev/null +++ b/resources/cl-event-if.cfg @@ -0,0 +1,17 @@ +Include cl-common.cfg + +Style InterfaceOnly + +import com.jogamp.opencl.llb.impl.CLEventCallback + +ClassJavadoc CLEvent /** +ClassJavadoc CLEvent * Java bindings to OpenCL, the Open Computing Language. +ClassJavadoc CLEvent * @author Michael Bien +ClassJavadoc CLEvent */ +JavaClass CLEvent + +IgnoreNot .*CreateUserEvent.*|.*GetEventInfo.*|.*GetEventProfilingInfo.*|.*SetUserEventStatus.*|clWaitForEvents.*|.*RetainEvent.*|.*ReleaseEvent.*|CL_EVENT_.* + +CustomJavaCode CLEvent +CustomJavaCode CLEvent /** Interface to C language function: <br> <code> int32_t {@native clSetEventCallback}(cl_event event, cl_int command_exec_callback_type, void (CL_CALLBACK *pfn_event_notify) (cl_event event, cl_int event_command_exec_status, void *user_data), void *user_data); </code> */ +CustomJavaCode CLEvent public int clSetEventCallback(long event, int type, CLEventCallback cb);
\ No newline at end of file diff --git a/resources/cl-if.cfg b/resources/cl-if.cfg index aa7de79..2b08e86 100644 --- a/resources/cl-if.cfg +++ b/resources/cl-if.cfg @@ -2,49 +2,41 @@ Include cl-common.cfg Style InterfaceOnly -#imports for all generated java files -Import java.nio.IntBuffer -Import java.nio.LongBuffer -Import com.jogamp.opencl.impl.CLImageFormatImpl -import com.jogamp.opencl.impl.BuildProgramCallback -import com.jogamp.opencl.impl.CLEventCallback -import com.jogamp.opencl.impl.CLMemObjectDestructorCallback - ClassJavadoc CL /** ClassJavadoc CL * Java bindings to OpenCL, the Open Computing Language. ClassJavadoc CL * @author Michael Bien ClassJavadoc CL */ JavaClass CL -#ignore cl-gl interoperability funcions. Interface 'CL' is pure OpenCL. -Ignore CL_GL_.*|cl.*GL.* +Extends CL CLContext +Extends CL CLProgram +Extends CL CLKernel +Extends CL CLCommandQueue +Extends CL CLDevice +Extends CL CLImage +Extends CL CLBuffer +Extends CL CLSampler +Extends CL CLEvent +Extends CL CLPlatform + +ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLContext.java +ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLProgram.java +ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLKernel.java +ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLCommandQueue.java +ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLDevice.java +ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLMemObj.java +ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLImage.java +ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLBuffer.java +ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLSampler.java +ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLEvent.java +ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLPlatform.java + +#ignore cl-gl interoperability functions. Interface 'CL' is pure OpenCL. +Ignore CL_GL_.*|cl.*GL.*|.*_GL_.* -#custom implementations Ignore clCreateContext -CustomJavaCode CL -CustomJavaCode CL /** Interface to C language function: <br> <code> cl_context {@native clCreateContext}(intptr_t * , uint32_t, cl_device_id * , void (*pfn_notify)(const char *, const void *, size_t, void *), void *, int32_t * ); </code> */ -CustomJavaCode CL public long clCreateContext(NativeSizeBuffer properties, NativeSizeBuffer devices, CLErrorHandler pfn_notify, IntBuffer errcode_ret); - Ignore clCreateContextFromType -CustomJavaCode CL -CustomJavaCode CL /** Interface to C language function: <br> <code> cl_context {@native clCreateContextFromType}(cl_context_properties *properties, cl_device_type device_type, void (*pfn_notify)(const char *errinfo, const void *private_info, size_t cb, void *user_data), void *user_data, cl_int *errcode_ret) ; </code> */ -CustomJavaCode CL public long clCreateContextFromType(NativeSizeBuffer properties, long device_type, CLErrorHandler pfn_notify, IntBuffer errcode_ret); - Ignore clBuildProgram -CustomJavaCode CL -CustomJavaCode CL /** Interface to C language function: <br> <code> int32_t {@native clBuildProgram}(cl_program, uint32_t, cl_device_id * , const char * , void (*pfn_notify)(cl_program, void *user_data), void * ); </code> */ -CustomJavaCode CL public int clBuildProgram(long program, int deviceCount, NativeSizeBuffer devices, String options, BuildProgramCallback cb); - +Ignore clEnqueueNativeKernel Ignore clSetEventCallback -CustomJavaCode CL -CustomJavaCode CL /** Interface to C language function: <br> <code> int32_t {@native clSetEventCallback}(cl_event event, cl_int command_exec_callback_type, void (CL_CALLBACK *pfn_event_notify) (cl_event event, cl_int event_command_exec_status, void *user_data), void *user_data); </code> */ -CustomJavaCode CL public int clSetEventCallback(long event, int type, CLEventCallback cb); - Ignore clSetMemObjectDestructorCallback -CustomJavaCode CL -CustomJavaCode CL /** Interface to C language function: <br> <code> int32_t {@native clSetMemObjectDestructorCallback}(cl_mem memobj, void (CL_CALLBACK *pfn_notify) (cl_mem memobj, void *user_data), void *user_data); </code> */ -CustomJavaCode CL public int clSetMemObjectDestructorCallback(long memObjID, CLMemObjectDestructorCallback cb); - -Ignore clEnqueueNativeKernel -#TODO.. - diff --git a/resources/cl-image-if.cfg b/resources/cl-image-if.cfg new file mode 100644 index 0000000..39814f2 --- /dev/null +++ b/resources/cl-image-if.cfg @@ -0,0 +1,16 @@ +Include cl-common.cfg + +Style InterfaceOnly + +Import com.jogamp.opencl.llb.impl.CLImageFormatImpl + +ClassJavadoc CLImage /** +ClassJavadoc CLImage * Java bindings to OpenCL, the Open Computing Language. +ClassJavadoc CLImage * @author Michael Bien +ClassJavadoc CLImage */ +JavaClass CLImage + +Extends CLImage CLMemObj + +IgnoreNot .*CreateImage.*|.*GetImageInfo.*|CL_IMAGE_.*|CL_R|CL_Rx|CL_A|CL_RG|CL_RGx|CL_RA|CL_RGB|CL_RGBx|CL_RGBA|CL_ARGB|CL_BGRA|CL_INTENSITY|CL_LUMINANCE|CL_SNORM_INT8|CL_SNORM_INT16|CL_UNORM_INT8|CL_UNORM_INT16|CL_UNORM_SHORT_565|CL_UNORM_SHORT_555|CL_UNORM_INT_101010|CL_SIGNED_INT8|CL_SIGNED_INT16|CL_SIGNED_INT32|CL_UNSIGNED_INT8|CL_UNSIGNED_INT16|CL_UNSIGNED_INT32|CL_HALF_FLOAT|CL_FLOAT + diff --git a/resources/cl-impl.cfg b/resources/cl-impl.cfg index 4a34683..1f9240a 100644 --- a/resources/cl-impl.cfg +++ b/resources/cl-impl.cfg @@ -3,8 +3,8 @@ Include cl-common.cfg Style ImplOnly #imports for all generated java files -Import com.jogamp.opencl.* -Import com.jogamp.opencl.gl.CLGLI +Import com.jogamp.opencl.llb.* +Import com.jogamp.opencl.llb.gl.CLGL ClassJavadoc CLAbstractImpl /** ClassJavadoc CLAbstractImpl * Java bindings to OpenCL, the Open Computing Language (generated). @@ -13,7 +13,7 @@ ClassJavadoc CLAbstractImpl */ ImplJavaClass CLAbstractImpl AccessControl CLAbstractImpl PUBLIC_ABSTRACT -Implements CLAbstractImpl CLGLI +Implements CLAbstractImpl CLGL EmitProcAddressTable true ProcAddressTableClassName CLProcAddressTable diff --git a/resources/cl-kernel-if.cfg b/resources/cl-kernel-if.cfg new file mode 100644 index 0000000..930160c --- /dev/null +++ b/resources/cl-kernel-if.cfg @@ -0,0 +1,12 @@ +Include cl-common.cfg + +Style InterfaceOnly + +ClassJavadoc CLKernel /** +ClassJavadoc CLKernel * Java bindings to OpenCL, the Open Computing Language. +ClassJavadoc CLKernel * @author Michael Bien +ClassJavadoc CLKernel */ +JavaClass CLKernel + +IgnoreNot .*CreateKernel.*|.*GetKernel.*Info.*|.*SetKernel.*|.*RetainKernel.*|.*ReleaseKernel.*|CL_KERNEL_.* + diff --git a/resources/cl-mem-if.cfg b/resources/cl-mem-if.cfg new file mode 100644 index 0000000..6efc344 --- /dev/null +++ b/resources/cl-mem-if.cfg @@ -0,0 +1,18 @@ +Include cl-common.cfg + +Style InterfaceOnly + +import com.jogamp.opencl.llb.impl.CLMemObjectDestructorCallback + +ClassJavadoc CLMemObj /** +ClassJavadoc CLMemObj * Java bindings to OpenCL, the Open Computing Language. +ClassJavadoc CLMemObj * @author Michael Bien +ClassJavadoc CLMemObj */ +JavaClass CLMemObj + +IgnoreNot .*GetMemObjectInfo.*|.*RetainMemObject.*|.*ReleaseMemObject.*|CL_MEM_.*|CL_MAP_.* + +CustomJavaCode CLMemObj +CustomJavaCode CLMemObj /** Interface to C language function: <br> <code> int32_t {@native clSetMemObjectDestructorCallback}(cl_mem memobj, void (CL_CALLBACK *pfn_notify) (cl_mem memobj, void *user_data), void *user_data); </code> */ +CustomJavaCode CLMemObj public int clSetMemObjectDestructorCallback(long memObjID, CLMemObjectDestructorCallback cb); + diff --git a/resources/cl-platform-if.cfg b/resources/cl-platform-if.cfg new file mode 100644 index 0000000..a6a3e76 --- /dev/null +++ b/resources/cl-platform-if.cfg @@ -0,0 +1,12 @@ +Include cl-common.cfg + +Style InterfaceOnly + +ClassJavadoc CLPlatform /** +ClassJavadoc CLPlatform * Java bindings to OpenCL, the Open Computing Language. +ClassJavadoc CLPlatform * @author Michael Bien +ClassJavadoc CLPlatform */ +JavaClass CLPlatform + +IgnoreNot .*GetPlatformInfo.*|.*GetDeviceIDs.*|.*GetPlatformIDs.*|CL_PLATFORM_.* + diff --git a/resources/cl-program-if.cfg b/resources/cl-program-if.cfg new file mode 100644 index 0000000..109430c --- /dev/null +++ b/resources/cl-program-if.cfg @@ -0,0 +1,18 @@ +Include cl-common.cfg + +Style InterfaceOnly + +Import com.jogamp.opencl.llb.impl.BuildProgramCallback + +ClassJavadoc CLProgram /** +ClassJavadoc CLProgram * Java bindings to OpenCL, the Open Computing Language. +ClassJavadoc CLProgram * @author Michael Bien +ClassJavadoc CLProgram */ +JavaClass CLProgram + +IgnoreNot .*CreateProgramWith.*|.*Program.*Info.*|.*RetainProgram.*|.*ReleaseProgram.*|CL_PROGRAM_.*|CL_BUILD_.* + +#custom implementations +CustomJavaCode CLProgram +CustomJavaCode CLProgram /** Interface to C language function: <br> <code> int32_t {@native clBuildProgram}(cl_program, uint32_t, cl_device_id * , const char * , void (*pfn_notify)(cl_program, void *user_data), void * ); </code> */ +CustomJavaCode CLProgram public int clBuildProgram(long program, int deviceCount, NativeSizeBuffer devices, String options, BuildProgramCallback cb); diff --git a/resources/cl-queue-if.cfg b/resources/cl-queue-if.cfg new file mode 100644 index 0000000..5576709 --- /dev/null +++ b/resources/cl-queue-if.cfg @@ -0,0 +1,12 @@ +Include cl-common.cfg + +Style InterfaceOnly + +ClassJavadoc CLCommandQueue /** +ClassJavadoc CLCommandQueue * Java bindings to OpenCL, the Open Computing Language. +ClassJavadoc CLCommandQueue * @author Michael Bien +ClassJavadoc CLCommandQueue */ +JavaClass CLCommandQueue + +IgnoreNot .*CreateCommandQueue.*|.*GetCommandQueueInfo.*|.*EnqueueRead.*|.*EnqueueWrite.*|.*EnqueueCopy.*|.*EnqueueMap.*|.*EnqueueUnmap.*|.*EnqueueBarrier.*|.*EnqueueNDRange.*|.*EnqueueTask.*|.*EnqueueMarker.*|.*EnqueueWait.*|.*RetainCommandQueue.*|.*ReleaseCommandQueue.*|clFinish|clFlush|CL_QUEUE_.*|CL_COMMAND_.*|CL_PROFILING_COMMAND_.* + diff --git a/resources/cl-sampler-if.cfg b/resources/cl-sampler-if.cfg new file mode 100644 index 0000000..3b705c5 --- /dev/null +++ b/resources/cl-sampler-if.cfg @@ -0,0 +1,12 @@ +Include cl-common.cfg + +Style InterfaceOnly + +ClassJavadoc CLSampler /** +ClassJavadoc CLSampler * Java bindings to OpenCL, the Open Computing Language. +ClassJavadoc CLSampler * @author Michael Bien +ClassJavadoc CLSampler */ +JavaClass CLSampler + +IgnoreNot .*CreateSampler.*|.*GetSamplerInfo.*|.*RetainSampler.*|.*ReleaseSampler.*|CL_SAMPLER_.*|CL_ADDRESS_.*|CL_FILTER_.* + diff --git a/resources/clImplCustomCode.c b/resources/clImplCustomCode.c index 789491c..fba3cb3 100644 --- a/resources/clImplCustomCode.c +++ b/resources/clImplCustomCode.c @@ -26,10 +26,10 @@ JNI_OnLoad(JavaVM * _jvm, void *reserved) { } // throws ClassNotFoundException (or other reflection stuff) - jclass buildCBClassID = (*env)->FindClass(env, "com/jogamp/opencl/impl/BuildProgramCallback"); + jclass buildCBClassID = (*env)->FindClass(env, "com/jogamp/opencl/llb/impl/BuildProgramCallback"); jclass errorHandlerClassID = (*env)->FindClass(env, "com/jogamp/opencl/CLErrorHandler"); - jclass eventCBClassID = (*env)->FindClass(env, "com/jogamp/opencl/impl/CLEventCallback"); - jclass memObjCBClassID = (*env)->FindClass(env, "com/jogamp/opencl/impl/CLMemObjectDestructorCallback"); + jclass eventCBClassID = (*env)->FindClass(env, "com/jogamp/opencl/llb/impl/CLEventCallback"); + jclass memObjCBClassID = (*env)->FindClass(env, "com/jogamp/opencl/llb/impl/CLMemObjectDestructorCallback"); // throws even more reflection Exceptions // IDs are unique and do not change @@ -123,7 +123,7 @@ CL_CALLBACK void memObjDestructorCallback(cl_mem mem, void * object) { * cl_int * errcode_ret); */ JNIEXPORT jlong JNICALL -Java_com_jogamp_opencl_impl_CLImpl_clCreateContextFromType0(JNIEnv *env, jobject _unused, +Java_com_jogamp_opencl_llb_impl_CLImpl_clCreateContextFromType0(JNIEnv *env, jobject _unused, jobject props, jint props_byte_offset, jlong device_type, jobject cb, jobject global, jobject errcode, jint errcode_byte_offset, jlong procAddress) { cl_context_properties* _props_ptr = NULL; @@ -176,7 +176,7 @@ Java_com_jogamp_opencl_impl_CLImpl_clCreateContextFromType0(JNIEnv *env, jobject * cl_int * errcode_ret ) CL_API_SUFFIX__VERSION_1_0; */ JNIEXPORT jlong JNICALL -Java_com_jogamp_opencl_impl_CLImpl_clCreateContext0(JNIEnv *env, jobject _unused, +Java_com_jogamp_opencl_llb_impl_CLImpl_clCreateContext0(JNIEnv *env, jobject _unused, jobject props, jint props_byte_offset, jint numDevices, jobject deviceList, jint device_type_offset, jobject cb, jobject global, jobject errcode, jint errcode_byte_offset, jlong procAddress) { cl_context_properties* _props_ptr = NULL; @@ -227,7 +227,7 @@ Java_com_jogamp_opencl_impl_CLImpl_clCreateContext0(JNIEnv *env, jobject _unused * C function: int32_t clReleaseContextImpl(cl_context context); */ JNIEXPORT jint JNICALL -Java_com_jogamp_opencl_impl_CLImpl_clReleaseContextImpl(JNIEnv *env, jobject _unused, jlong context, jlong global, jlong procAddress) { +Java_com_jogamp_opencl_llb_impl_CLImpl_clReleaseContextImpl(JNIEnv *env, jobject _unused, jlong context, jlong global, jlong procAddress) { int32_t _res; typedef int32_t (*function)(cl_context); @@ -253,7 +253,7 @@ Java_com_jogamp_opencl_impl_CLImpl_clReleaseContextImpl(JNIEnv *env, jobject _un * void * user_data ) CL_API_SUFFIX__VERSION_1_0; */ JNIEXPORT jint JNICALL -Java_com_jogamp_opencl_impl_CLImpl_clBuildProgram0(JNIEnv *env, jobject _unused, +Java_com_jogamp_opencl_llb_impl_CLImpl_clBuildProgram0(JNIEnv *env, jobject _unused, jlong program, jint deviceCount, jobject deviceList, jint device_type_offset, jstring options, jobject cb, jlong procAddress) { const char* _strchars_options = NULL; @@ -303,7 +303,7 @@ Java_com_jogamp_opencl_impl_CLImpl_clBuildProgram0(JNIEnv *env, jobject _unused, * C function: void * clEnqueueMapImage(cl_command_queue command_queue, cl_mem image, uint32_t blocking_map, uint64_t map_flags, const size_t * , const size_t * , size_t * image_row_pitch, size_t * image_slice_pitch, uint32_t num_events_in_wait_list, cl_event * event_wait_list, cl_event * event, int32_t * errcode_ret); */ JNIEXPORT jobject JNICALL -Java_com_jogamp_opencl_impl_CLImpl_clEnqueueMapImage0__JJIJLjava_lang_Object_2ILjava_lang_Object_2ILjava_lang_Object_2ILjava_lang_Object_2IILjava_lang_Object_2ILjava_lang_Object_2ILjava_lang_Object_2I(JNIEnv *env, jobject _unused, +Java_com_jogamp_opencl_llb_impl_CLImpl_clEnqueueMapImage0__JJIJLjava_lang_Object_2ILjava_lang_Object_2ILjava_lang_Object_2ILjava_lang_Object_2IILjava_lang_Object_2ILjava_lang_Object_2ILjava_lang_Object_2I(JNIEnv *env, jobject _unused, jlong command_queue, jlong image, jint blocking_map, jlong map_flags, jobject origin, jint origin_byte_offset, jobject range, jint range_byte_offset, jobject image_row_pitch, jint image_row_pitch_byte_offset, jobject image_slice_pitch, @@ -380,7 +380,7 @@ Java_com_jogamp_opencl_impl_CLImpl_clEnqueueMapImage0__JJIJLjava_lang_Object_2IL } JNIEXPORT jint JNICALL -Java_com_jogamp_opencl_impl_CLImpl_clSetEventCallback0(JNIEnv *env, jobject _unused, +Java_com_jogamp_opencl_llb_impl_CLImpl_clSetEventCallback0(JNIEnv *env, jobject _unused, jlong event, jint trigger, jobject listener, jlong procAddress) { cl_event _event = event; @@ -396,7 +396,7 @@ Java_com_jogamp_opencl_impl_CLImpl_clSetEventCallback0(JNIEnv *env, jobject _unu } JNIEXPORT jint JNICALL -Java_com_jogamp_opencl_impl_CLImpl_clSetMemObjectDestructorCallback0(JNIEnv *env, jobject _unused, +Java_com_jogamp_opencl_llb_impl_CLImpl_clSetMemObjectDestructorCallback0(JNIEnv *env, jobject _unused, jlong mem, jobject listener, jlong procAddress) { cl_mem _mem = mem; diff --git a/resources/clgl-if.cfg b/resources/clgl-if.cfg index 8e3e529..2f193c7 100644 --- a/resources/clgl-if.cfg +++ b/resources/clgl-if.cfg @@ -1,23 +1,23 @@ Include cl-common.cfg #overwrite package -Package com.jogamp.opencl.gl +Package com.jogamp.opencl.llb.gl -import com.jogamp.opencl.CL +import com.jogamp.opencl.llb.CL Style InterfaceOnly -ClassJavadoc CLGLI /** -ClassJavadoc CLGLI * Java bindings to OpenCL, the Open Computing Language. -ClassJavadoc CLGLI * OpenGL - OpenCL interoperability. -ClassJavadoc CLGLI * @author Michael Bien -ClassJavadoc CLGLI */ -JavaClass CLGLI +ClassJavadoc CLGL /** +ClassJavadoc CLGL * Java bindings to OpenCL, the Open Computing Language. +ClassJavadoc CLGL * OpenGL - OpenCL interoperability. +ClassJavadoc CLGL * @author Michael Bien +ClassJavadoc CLGL */ +JavaClass CLGL -Extends CLGLI CL +Extends CLGL CL #only include token starting with CL_GL_ and methods containing GL -IgnoreNot CL_GL_.*|cl.*GL.* +IgnoreNot CL_GL_.*|cl.*GL.*|.*_GL_.* #append to generated c files #CustomCCode #include <inttypes.h> diff --git a/src/com/jogamp/opencl/CLBuffer.java b/src/com/jogamp/opencl/CLBuffer.java index 6f00247..dfdfd2d 100644 --- a/src/com/jogamp/opencl/CLBuffer.java +++ b/src/com/jogamp/opencl/CLBuffer.java @@ -32,6 +32,7 @@ import com.jogamp.common.nio.Buffers; import java.util.List; import com.jogamp.common.nio.NativeSizeBuffer; import com.jogamp.opencl.CLMemory.Mem; +import com.jogamp.opencl.llb.CL; import java.nio.Buffer; import java.util.ArrayList; import java.util.Collections; diff --git a/src/com/jogamp/opencl/CLCommandQueue.java b/src/com/jogamp/opencl/CLCommandQueue.java index d578738..2f83464 100644 --- a/src/com/jogamp/opencl/CLCommandQueue.java +++ b/src/com/jogamp/opencl/CLCommandQueue.java @@ -29,7 +29,7 @@ package com.jogamp.opencl; import com.jogamp.common.nio.CachedBufferFactory; -import com.jogamp.opencl.gl.CLGLI; +import com.jogamp.opencl.llb.gl.CLGL; import com.jogamp.common.nio.NativeSizeBuffer; import com.jogamp.opencl.gl.CLGLObject; import java.nio.Buffer; @@ -41,7 +41,7 @@ import java.util.EnumSet; import java.util.List; import static com.jogamp.opencl.CLException.*; -import static com.jogamp.opencl.CL.*; +import static com.jogamp.opencl.llb.CL.*; import static com.jogamp.opencl.util.CLUtil.*; /** @@ -1667,7 +1667,7 @@ public class CLCommandQueue extends CLObject implements CLResource { conditions = condition.size; } - CLGLI xl = (CLGLI) cl; + CLGL xl = (CLGL) cl; int ret = xl.clEnqueueAcquireGLObjects(ID, glObjectIDs.remaining(), glObjectIDs, conditions, conditionIDs, @@ -1736,7 +1736,7 @@ public class CLCommandQueue extends CLObject implements CLResource { conditions = condition.size; } - CLGLI xl = (CLGLI) cl; + CLGL xl = (CLGL) cl; int ret = xl.clEnqueueReleaseGLObjects(ID, glObjectIDs.remaining(), glObjectIDs, conditions, conditionIDs, diff --git a/src/com/jogamp/opencl/CLContext.java b/src/com/jogamp/opencl/CLContext.java index 147fc2a..2beea3f 100644 --- a/src/com/jogamp/opencl/CLContext.java +++ b/src/com/jogamp/opencl/CLContext.java @@ -28,12 +28,13 @@ package com.jogamp.opencl; +import com.jogamp.opencl.llb.CL; import com.jogamp.common.nio.Buffers; import com.jogamp.opencl.CLDevice.Type; import com.jogamp.opencl.CLSampler.AddressingMode; import com.jogamp.opencl.CLSampler.FilteringMode; import com.jogamp.common.nio.NativeSizeBuffer; -import com.jogamp.opencl.impl.CLImageFormatImpl; +import com.jogamp.opencl.llb.impl.CLImageFormatImpl; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; @@ -57,7 +58,7 @@ import static java.lang.System.*; import static com.jogamp.opencl.CLException.*; import static com.jogamp.common.nio.Buffers.*; import static com.jogamp.common.os.Platform.*; -import static com.jogamp.opencl.CL.*; +import static com.jogamp.opencl.llb.CL.*; import static com.jogamp.opencl.CLBuffer.*; import static java.util.Collections.*; @@ -121,11 +122,11 @@ public class CLContext extends CLObject implements CLResource { NativeSizeBuffer deviceCount = NativeSizeBuffer.allocateDirect(1); - int ret = cl.clGetContextInfo(ID, CL.CL_CONTEXT_DEVICES, 0, null, deviceCount); + int ret = cl.clGetContextInfo(ID, CL_CONTEXT_DEVICES, 0, null, deviceCount); checkForError(ret, "can not enumerate devices"); ByteBuffer deviceIDs = Buffers.newDirectByteBuffer((int)deviceCount.get()); - ret = cl.clGetContextInfo(ID, CL.CL_CONTEXT_DEVICES, deviceIDs.capacity(), deviceIDs, null); + ret = cl.clGetContextInfo(ID, CL_CONTEXT_DEVICES, deviceIDs.capacity(), deviceIDs, null); checkForError(ret, "can not enumerate devices"); devices = new CLDevice[deviceIDs.capacity() / (is32Bit() ? 4 : 8)]; @@ -236,7 +237,7 @@ public class CLContext extends CLObject implements CLResource { throw new RuntimeException("no OpenCL installation found"); } - return NativeSizeBuffer.allocateDirect(3).put(CL.CL_CONTEXT_PLATFORM) + return NativeSizeBuffer.allocateDirect(3).put(CL_CONTEXT_PLATFORM) .put(platform.ID).put(0) // 0 terminated array .rewind(); } diff --git a/src/com/jogamp/opencl/CLDevice.java b/src/com/jogamp/opencl/CLDevice.java index 6ca4cf3..abfb3a0 100644 --- a/src/com/jogamp/opencl/CLDevice.java +++ b/src/com/jogamp/opencl/CLDevice.java @@ -28,6 +28,7 @@ package com.jogamp.opencl; +import com.jogamp.opencl.llb.CL; import com.jogamp.opencl.util.CLUtil; import com.jogamp.opencl.spi.CLInfoAccessor; import java.nio.ByteOrder; @@ -40,7 +41,7 @@ import java.util.Map; import java.util.Scanner; import java.util.Set; -import static com.jogamp.opencl.CL.*; +import static com.jogamp.opencl.llb.CL.*; /** * This object represents an OpenCL device. diff --git a/src/com/jogamp/opencl/CLEvent.java b/src/com/jogamp/opencl/CLEvent.java index 52b316d..0b2c1eb 100644 --- a/src/com/jogamp/opencl/CLEvent.java +++ b/src/com/jogamp/opencl/CLEvent.java @@ -29,11 +29,11 @@ package com.jogamp.opencl; import com.jogamp.opencl.impl.CLTLInfoAccessor; -import com.jogamp.opencl.impl.CLEventCallback; +import com.jogamp.opencl.llb.impl.CLEventCallback; import com.jogamp.common.nio.NativeSizeBuffer; import java.nio.Buffer; -import static com.jogamp.opencl.CL.*; +import static com.jogamp.opencl.llb.CL.*; import static com.jogamp.opencl.CLException.*; /** diff --git a/src/com/jogamp/opencl/CLEventList.java b/src/com/jogamp/opencl/CLEventList.java index 3642d91..8c09f60 100644 --- a/src/com/jogamp/opencl/CLEventList.java +++ b/src/com/jogamp/opencl/CLEventList.java @@ -102,6 +102,7 @@ public final class CLEventList implements CLResource, AutoCloseable, Iterable<CL /** * Releases all CLEvents in this list. */ + @Override public void release() { for (int i = 0; i < size; i++) { events[i].release(); @@ -115,6 +116,7 @@ public final class CLEventList implements CLResource, AutoCloseable, Iterable<CL * @deprecated use {@link #release()} instead. */ @Deprecated + @Override public final void close() throws Exception { release(); } @@ -139,6 +141,7 @@ public final class CLEventList implements CLResource, AutoCloseable, Iterable<CL return events.length; } + @Override public Iterator<CLEvent> iterator() { return new EventIterator(events, size); } @@ -167,10 +170,12 @@ public final class CLEventList implements CLResource, AutoCloseable, Iterable<CL this.size = size; } + @Override public boolean hasNext() { return index < size; } + @Override public CLEvent next() { if(hasNext()) return events[index++]; @@ -178,6 +183,7 @@ public final class CLEventList implements CLResource, AutoCloseable, Iterable<CL return null; } + @Override public void remove() { throw new UnsupportedOperationException("remove() not supported."); } diff --git a/src/com/jogamp/opencl/CLException.java b/src/com/jogamp/opencl/CLException.java index 59eda19..f776730 100644 --- a/src/com/jogamp/opencl/CLException.java +++ b/src/com/jogamp/opencl/CLException.java @@ -28,7 +28,7 @@ package com.jogamp.opencl; -import static com.jogamp.opencl.CL.*; +import static com.jogamp.opencl.llb.gl.CLGL.*; /** * Main Exception type for runtime OpenCL errors and failed function calls (e.g. returning not CL_SUCCESS). diff --git a/src/com/jogamp/opencl/CLImage.java b/src/com/jogamp/opencl/CLImage.java index 76993d6..82c29f7 100644 --- a/src/com/jogamp/opencl/CLImage.java +++ b/src/com/jogamp/opencl/CLImage.java @@ -30,9 +30,10 @@ package com.jogamp.opencl; import com.jogamp.opencl.impl.CLTLInfoAccessor; import com.jogamp.common.nio.NativeSizeBuffer; +import com.jogamp.opencl.llb.CL; import java.nio.Buffer; -import static com.jogamp.opencl.CL.*; +import static com.jogamp.opencl.llb.CL.*; /** * diff --git a/src/com/jogamp/opencl/CLImage2d.java b/src/com/jogamp/opencl/CLImage2d.java index 9e43e4b..9a5d5ed 100644 --- a/src/com/jogamp/opencl/CLImage2d.java +++ b/src/com/jogamp/opencl/CLImage2d.java @@ -29,6 +29,7 @@ package com.jogamp.opencl; import com.jogamp.common.nio.Buffers; +import com.jogamp.opencl.llb.CL; import java.nio.Buffer; import java.nio.IntBuffer; diff --git a/src/com/jogamp/opencl/CLImage3d.java b/src/com/jogamp/opencl/CLImage3d.java index 4e29e06..718f78e 100644 --- a/src/com/jogamp/opencl/CLImage3d.java +++ b/src/com/jogamp/opencl/CLImage3d.java @@ -28,11 +28,12 @@ package com.jogamp.opencl; +import com.jogamp.opencl.llb.CL; import com.jogamp.common.nio.Buffers; import java.nio.Buffer; import java.nio.IntBuffer; -import static com.jogamp.opencl.CL.*; +import static com.jogamp.opencl.llb.CL.*; import static com.jogamp.opencl.CLException.*; /** diff --git a/src/com/jogamp/opencl/CLImageFormat.java b/src/com/jogamp/opencl/CLImageFormat.java index 5f014e0..08fe7c7 100644 --- a/src/com/jogamp/opencl/CLImageFormat.java +++ b/src/com/jogamp/opencl/CLImageFormat.java @@ -28,9 +28,9 @@ package com.jogamp.opencl; -import com.jogamp.opencl.impl.CLImageFormatImpl; +import com.jogamp.opencl.llb.impl.CLImageFormatImpl; -import static com.jogamp.opencl.CL.*; +import static com.jogamp.opencl.llb.CL.*; /** * Represents the OpenCL image format with its channeltype and order. diff --git a/src/com/jogamp/opencl/CLKernel.java b/src/com/jogamp/opencl/CLKernel.java index 4c898b4..d833eca 100644 --- a/src/com/jogamp/opencl/CLKernel.java +++ b/src/com/jogamp/opencl/CLKernel.java @@ -35,7 +35,7 @@ import java.nio.Buffer; import java.nio.ByteBuffer; import static com.jogamp.opencl.CLException.*; -import static com.jogamp.opencl.CL.*; +import static com.jogamp.opencl.llb.CL.*; import static com.jogamp.common.os.Platform.*; /** @@ -316,10 +316,11 @@ public class CLKernel extends CLObject implements CLResource, Cloneable { /** * Releases all resources of this kernel from its context. */ + @Override public void release() { int ret = cl.clReleaseKernel(ID); program.onKernelReleased(this); - if(ret != CL.CL_SUCCESS) { + if(ret != CL_SUCCESS) { throw newException(ret, "can not release "+this); } } diff --git a/src/com/jogamp/opencl/CLMemory.java b/src/com/jogamp/opencl/CLMemory.java index f299439..ee8a7bf 100644 --- a/src/com/jogamp/opencl/CLMemory.java +++ b/src/com/jogamp/opencl/CLMemory.java @@ -28,10 +28,11 @@ package com.jogamp.opencl; -import com.jogamp.opencl.gl.CLGLI; +import com.jogamp.opencl.llb.CL; +import com.jogamp.opencl.llb.gl.CLGL; import com.jogamp.common.nio.Buffers; import com.jogamp.common.nio.NativeSizeBuffer; -import com.jogamp.opencl.impl.CLMemObjectDestructorCallback; +import com.jogamp.opencl.llb.impl.CLMemObjectDestructorCallback; import java.nio.Buffer; import java.nio.IntBuffer; import java.util.ArrayList; @@ -39,7 +40,7 @@ import java.util.EnumSet; import java.util.List; import static com.jogamp.opencl.CLException.*; -import static com.jogamp.opencl.gl.CLGLI.*; +import static com.jogamp.opencl.llb.gl.CLGL.*; /** * Common superclass for all OpenCL memory types. @@ -231,7 +232,7 @@ public abstract class CLMemory <B extends Buffer> extends CLObject implements CL @Deprecated /*public*/ final GLObjectType _getGLObjectType() { int[] array = new int[1]; - int ret = ((CLGLI)cl).clGetGLObjectInfo(ID, array, 0, null, 0); + int ret = ((CLGL)cl).clGetGLObjectInfo(ID, array, 0, null, 0); CLException.checkForError(ret, "error while asking for gl object info"); return GLObjectType.valueOf(array[0]); } @@ -242,7 +243,7 @@ public abstract class CLMemory <B extends Buffer> extends CLObject implements CL @Deprecated /*public*/ final int _getGLObjectID() { int[] array = new int[1]; - int ret = ((CLGLI)cl).clGetGLObjectInfo(ID, null, 0, array, 0); + int ret = ((CLGL)cl).clGetGLObjectInfo(ID, null, 0, array, 0); CLException.checkForError(ret, "error while asking for gl object info"); return array[0]; } diff --git a/src/com/jogamp/opencl/CLObject.java b/src/com/jogamp/opencl/CLObject.java index 5403188..eb1f0ab 100644 --- a/src/com/jogamp/opencl/CLObject.java +++ b/src/com/jogamp/opencl/CLObject.java @@ -29,6 +29,7 @@ package com.jogamp.opencl; import com.jogamp.common.AutoCloseable; +import com.jogamp.opencl.llb.CL; /** * Common superclass for all OpenCL objects. @@ -64,6 +65,7 @@ abstract class CLObject implements AutoCloseable { * @see java.lang.AutoCloseable */ @Deprecated + @Override public final void close() { if(this instanceof CLResource) { ((CLResource)this).release(); diff --git a/src/com/jogamp/opencl/CLPlatform.java b/src/com/jogamp/opencl/CLPlatform.java index 4a87b43..a494edc 100644 --- a/src/com/jogamp/opencl/CLPlatform.java +++ b/src/com/jogamp/opencl/CLPlatform.java @@ -28,6 +28,7 @@ package com.jogamp.opencl; +import com.jogamp.opencl.llb.CL; import com.jogamp.opencl.impl.CLTLAccessorFactory; import com.jogamp.common.nio.Buffers; import com.jogamp.common.os.DynamicLookupHelper; @@ -37,8 +38,8 @@ import com.jogamp.common.nio.NativeSizeBuffer; import com.jogamp.gluegen.runtime.FunctionAddressResolver; import com.jogamp.opencl.spi.CLPlatformInfoAccessor; import com.jogamp.opencl.util.CLUtil; -import com.jogamp.opencl.impl.CLImpl; -import com.jogamp.opencl.impl.CLProcAddressTable; +import com.jogamp.opencl.llb.impl.CLImpl; +import com.jogamp.opencl.llb.impl.CLProcAddressTable; import com.jogamp.opencl.spi.CLAccessorFactory; import com.jogamp.opencl.util.Filter; import com.jogamp.opencl.util.JOCLVersion; @@ -55,7 +56,7 @@ import java.security.PrivilegedAction; import static java.security.AccessController.*; import static com.jogamp.opencl.CLException.*; -import static com.jogamp.opencl.CL.*; +import static com.jogamp.opencl.llb.CL.*; /** * CLPlatfrorm representing a OpenCL implementation (e.g. graphics driver). diff --git a/src/com/jogamp/opencl/CLProgram.java b/src/com/jogamp/opencl/CLProgram.java index e8706a7..b991c1e 100644 --- a/src/com/jogamp/opencl/CLProgram.java +++ b/src/com/jogamp/opencl/CLProgram.java @@ -34,7 +34,7 @@ import com.jogamp.opencl.util.CLUtil; import com.jogamp.common.os.Platform; import com.jogamp.common.nio.NativeSizeBuffer; import com.jogamp.common.nio.PointerBuffer; -import com.jogamp.opencl.impl.BuildProgramCallback; +import com.jogamp.opencl.llb.impl.BuildProgramCallback; import com.jogamp.opencl.util.CLBuildListener; import java.nio.ByteBuffer; import java.nio.IntBuffer; @@ -48,7 +48,7 @@ import java.util.Map; import java.util.concurrent.locks.ReentrantLock; import static com.jogamp.opencl.CLException.*; -import static com.jogamp.opencl.CL.*; +import static com.jogamp.opencl.llb.CL.*; import static com.jogamp.common.nio.Buffers.*; /** diff --git a/src/com/jogamp/opencl/CLSampler.java b/src/com/jogamp/opencl/CLSampler.java index 015445e..04751be 100644 --- a/src/com/jogamp/opencl/CLSampler.java +++ b/src/com/jogamp/opencl/CLSampler.java @@ -34,7 +34,7 @@ import com.jogamp.common.nio.NativeSizeBuffer; import java.nio.Buffer; import static com.jogamp.opencl.CLException.*; -import static com.jogamp.opencl.CL.*; +import static com.jogamp.opencl.llb.CL.*; import static com.jogamp.opencl.util.CLUtil.*; /** @@ -78,7 +78,7 @@ public class CLSampler extends CLObject implements CLResource { public void release() { int ret = cl.clReleaseSampler(ID); context.onSamplerReleased(this); - if(ret != CL.CL_SUCCESS) { + if(ret != CL_SUCCESS) { throw newException(ret, "can not release "+this); } } diff --git a/src/com/jogamp/opencl/CLUserEvent.java b/src/com/jogamp/opencl/CLUserEvent.java index 4bbbf3b..22839b0 100644 --- a/src/com/jogamp/opencl/CLUserEvent.java +++ b/src/com/jogamp/opencl/CLUserEvent.java @@ -33,7 +33,7 @@ package com.jogamp.opencl; import static com.jogamp.opencl.CLException.*; -import static com.jogamp.opencl.CL.*; +import static com.jogamp.opencl.llb.CL.*; /** * Custom, user controlled event. diff --git a/src/com/jogamp/opencl/gl/CLGLBuffer.java b/src/com/jogamp/opencl/gl/CLGLBuffer.java index 148aa83..55cede8 100644 --- a/src/com/jogamp/opencl/gl/CLGLBuffer.java +++ b/src/com/jogamp/opencl/gl/CLGLBuffer.java @@ -32,6 +32,7 @@ import com.jogamp.opencl.CLBuffer; import com.jogamp.opencl.CLCommandQueue; import com.jogamp.opencl.CLContext; import com.jogamp.opencl.CLException; +import com.jogamp.opencl.llb.gl.CLGL; import java.nio.Buffer; import javax.media.opengl.GLContext; @@ -58,7 +59,7 @@ public final class CLGLBuffer<B extends Buffer> extends CLBuffer<B> implements C static <B extends Buffer> CLGLBuffer<B> create(CLContext context, B directBuffer, long size, int flags, int glObject) { checkBuffer(directBuffer, flags); - CLGLI clgli = (CLGLI)getCL(context); + CLGL clgli = (CLGL)getCL(context); int[] result = new int[1]; long id = clgli.clCreateFromGLBuffer(context.ID, flags, glObject, result, 0); @@ -86,10 +87,12 @@ public final class CLGLBuffer<B extends Buffer> extends CLBuffer<B> implements C initCLCapacity(); } + @Override public int getGLObjectID() { return GLID; } + @Override public GLObjectType getGLObjectType() { return GLObjectType.GL_OBJECT_BUFFER; } @@ -99,6 +102,7 @@ public final class CLGLBuffer<B extends Buffer> extends CLBuffer<B> implements C return (CLGLContext) super.getContext(); } + @Override public GLContext getGLContext() { return getContext().getGLContext(); } diff --git a/src/com/jogamp/opencl/gl/CLGLContext.java b/src/com/jogamp/opencl/gl/CLGLContext.java index ee6c210..e688717 100644 --- a/src/com/jogamp/opencl/gl/CLGLContext.java +++ b/src/com/jogamp/opencl/gl/CLGLContext.java @@ -28,6 +28,7 @@ package com.jogamp.opencl.gl; +import com.jogamp.opencl.llb.gl.CLGL; import com.jogamp.opencl.CLContext; import com.jogamp.opencl.CLDevice; import java.nio.Buffer; @@ -42,7 +43,7 @@ import jogamp.opengl.windows.wgl.WindowsWGLContext; import jogamp.opengl.x11.glx.X11GLXContext; import javax.media.opengl.GLContext; -import static com.jogamp.opencl.gl.CLGLI.*; +import static com.jogamp.opencl.llb.gl.CLGL.*; /** * OpenCL Context supporting JOGL-JOCL interoperablity. @@ -308,8 +309,8 @@ public final class CLGLContext extends CLContext { * Return the low level OpenCL interface with OpenGL interoperability. */ @Override - public CLGLI getCL() { - return (CLGLI)super.getCL(); + public CLGL getCL() { + return (CLGL)super.getCL(); } /** diff --git a/src/com/jogamp/opencl/gl/CLGLImage2d.java b/src/com/jogamp/opencl/gl/CLGLImage2d.java index 94ad7e8..dd6b9d5 100644 --- a/src/com/jogamp/opencl/gl/CLGLImage2d.java +++ b/src/com/jogamp/opencl/gl/CLGLImage2d.java @@ -28,15 +28,16 @@ package com.jogamp.opencl.gl; -import com.jogamp.opencl.CL; +import com.jogamp.opencl.llb.CL; +import com.jogamp.opencl.llb.gl.CLGL; import com.jogamp.opencl.CLContext; import com.jogamp.opencl.CLImage2d; import com.jogamp.opencl.CLImageFormat; -import com.jogamp.opencl.impl.CLImageFormatImpl; +import com.jogamp.opencl.llb.impl.CLImageFormatImpl; import java.nio.Buffer; import javax.media.opengl.GLContext; -import static com.jogamp.opencl.CL.*; +import static com.jogamp.opencl.llb.CL.*; /** * 2D OpenCL image representing an OpenGL renderbuffer. @@ -60,7 +61,7 @@ public class CLGLImage2d<B extends Buffer> extends CLImage2d<B> implements CLGLO CL cl = getCL(context); int[] result = new int[1]; - CLGLI clgli = (CLGLI)cl; + CLGL clgli = (CLGL)cl; long id = clgli.clCreateFromGLRenderbuffer(context.ID, flags, glObject, result, 0); @@ -94,6 +95,7 @@ public class CLGLImage2d<B extends Buffer> extends CLImage2d<B> implements CLGLO return (CLGLContext) super.getContext(); } + @Override public GLContext getGLContext() { return getContext().getGLContext(); } diff --git a/src/com/jogamp/opencl/gl/CLGLTexture2d.java b/src/com/jogamp/opencl/gl/CLGLTexture2d.java index faf1bdc..484d00d 100644 --- a/src/com/jogamp/opencl/gl/CLGLTexture2d.java +++ b/src/com/jogamp/opencl/gl/CLGLTexture2d.java @@ -28,13 +28,15 @@ package com.jogamp.opencl.gl; -import com.jogamp.opencl.CL; +import com.jogamp.opencl.llb.CL; import com.jogamp.opencl.CLContext; import com.jogamp.opencl.CLImageFormat; -import com.jogamp.opencl.impl.CLImageFormatImpl; +import com.jogamp.opencl.llb.impl.CLImageFormatImpl; +import com.jogamp.opencl.llb.gl.CLGL; import java.nio.Buffer; -import static com.jogamp.opencl.CL.*; +import static com.jogamp.opencl.CLException.*; +import static com.jogamp.opencl.llb.CL.*; /** * 2D OpenCL image representing an 2D OpenGL texture. @@ -58,26 +60,29 @@ public class CLGLTexture2d<B extends Buffer> extends CLGLImage2d<B> implements C CL cl = getCL(context); int[] result = new int[1]; - CLGLI clgli = (CLGLI)cl; + CLGL clgli = (CLGL)cl; long id = clgli.clCreateFromGLTexture2D(context.ID, flags, target, mipLevel, texture, result, 0); + checkForError((int)id, "can not share memory with texture #"+texture+"."); CLImageInfoAccessor accessor = new CLImageInfoAccessor(cl, id); CLImageFormat format = createUninitializedImageFormat(); accessor.getInfo(CL_IMAGE_FORMAT, CLImageFormatImpl.size(), format.getFormatImpl().getBuffer(), null); - int width = (int)accessor.getLong(CL_IMAGE_WIDTH); - int height = (int)accessor.getLong(CL_IMAGE_HEIGHT); + int width = 640; //(int)accessor.getLong(CL_IMAGE_WIDTH); + int height = 480; //(int)accessor.getLong(CL_IMAGE_HEIGHT); return new CLGLTexture2d<B>(context, directBuffer, format, accessor, target, mipLevel, width, height, id, texture, flags); } + @Override public int getTextureTarget() { return target; } + @Override public int getMipMapLevel() { return mipMapLevel; } diff --git a/src/com/jogamp/opencl/gl/CLGLTexture3d.java b/src/com/jogamp/opencl/gl/CLGLTexture3d.java index ace779d..8dd2682 100644 --- a/src/com/jogamp/opencl/gl/CLGLTexture3d.java +++ b/src/com/jogamp/opencl/gl/CLGLTexture3d.java @@ -28,15 +28,16 @@ package com.jogamp.opencl.gl; -import com.jogamp.opencl.CL; +import com.jogamp.opencl.llb.gl.CLGL; +import com.jogamp.opencl.llb.CL; import com.jogamp.opencl.CLContext; import com.jogamp.opencl.CLImage3d; import com.jogamp.opencl.CLImageFormat; -import com.jogamp.opencl.impl.CLImageFormatImpl; +import com.jogamp.opencl.llb.impl.CLImageFormatImpl; import java.nio.Buffer; import javax.media.opengl.GLContext; -import static com.jogamp.opencl.CL.*; +import static com.jogamp.opencl.llb.CL.*; /** * 3D OpenCL image representing an 3D OpenGL texture. @@ -66,7 +67,7 @@ public class CLGLTexture3d<B extends Buffer> extends CLImage3d<B> implements CLG CL cl = getCL(context); int[] result = new int[1]; - CLGLI clgli = (CLGLI)cl; + CLGL clgli = (CLGL)cl; long id = clgli.clCreateFromGLTexture3D(context.ID, flags, target, mipLevel, texture, result, 0); @@ -82,18 +83,22 @@ public class CLGLTexture3d<B extends Buffer> extends CLImage3d<B> implements CLG return new CLGLTexture3d<B>(context, directBuffer, format, accessor, target, mipLevel, width, height, depth, id, texture, flags); } + @Override public int getGLObjectID() { return GLID; } + @Override public int getTextureTarget() { return target; } + @Override public int getMipMapLevel() { return mipMapLevel; } + @Override public GLObjectType getGLObjectType() { return GLObjectType.GL_OBJECT_TEXTURE3D; } diff --git a/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java b/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java index 1c7f952..b5ad1d8 100644 --- a/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java +++ b/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java @@ -5,7 +5,7 @@ package com.jogamp.opencl.impl; import java.nio.IntBuffer; import com.jogamp.common.nio.NativeSizeBuffer; -import com.jogamp.opencl.CL; +import com.jogamp.opencl.llb.CL; import com.jogamp.opencl.spi.CLAccessorFactory; import com.jogamp.opencl.spi.CLInfoAccessor; import com.jogamp.opencl.spi.CLPlatformInfoAccessor; diff --git a/src/com/jogamp/opencl/impl/BuildProgramCallback.java b/src/com/jogamp/opencl/llb/impl/BuildProgramCallback.java index cb4b36d..51bde32 100644 --- a/src/com/jogamp/opencl/impl/BuildProgramCallback.java +++ b/src/com/jogamp/opencl/llb/impl/BuildProgramCallback.java @@ -26,15 +26,15 @@ * or implied, of JogAmp Community. */ -package com.jogamp.opencl.impl; +package com.jogamp.opencl.llb.impl; /** * A callback an application can register to be called when the program executable * has been built (successfully or unsuccessfully).<br/> - * Note1: registering a build callback can make {@link com.jogamp.opencl.CL#clBuildProgram} non blocking (OpenCL implementation dependent).<br/> - * Note2: the thread which calls this method is unspecified. The Application should ensure propper synchronization. + * Note1: registering a build callback can make {@link com.jogamp.opencl.llb.CL#clBuildProgram} non blocking (OpenCL implementation dependent).<br/> + * Note2: the thread which calls this method is unspecified. The Application should ensure proper synchronization. * @author Michael Bien - * @see com.jogamp.opencl.CL#clBuildProgram(long, int, com.jogamp.common.nio.PointerBuffer, java.lang.String, com.jogamp.opencl.impl.BuildProgramCallback) + * @see com.jogamp.opencl.llb.CL#clBuildProgram */ public interface BuildProgramCallback { diff --git a/src/com/jogamp/opencl/impl/CLEventCallback.java b/src/com/jogamp/opencl/llb/impl/CLEventCallback.java index d1526a0..1373995 100644 --- a/src/com/jogamp/opencl/impl/CLEventCallback.java +++ b/src/com/jogamp/opencl/llb/impl/CLEventCallback.java @@ -30,7 +30,7 @@ * Created on Tuesday, July 06 2010 00:46 */ -package com.jogamp.opencl.impl; +package com.jogamp.opencl.llb.impl; /** * A callback for a specific command execution status. diff --git a/src/com/jogamp/opencl/impl/CLImpl.java b/src/com/jogamp/opencl/llb/impl/CLImpl.java index 8ea4420..5de3126 100644 --- a/src/com/jogamp/opencl/impl/CLImpl.java +++ b/src/com/jogamp/opencl/llb/impl/CLImpl.java @@ -29,7 +29,7 @@ /* * Created on Monday, June 07 2010 at 04:25 */ -package com.jogamp.opencl.impl; +package com.jogamp.opencl.llb.impl; import com.jogamp.common.nio.NativeSizeBuffer; import com.jogamp.common.os.Platform; @@ -56,6 +56,7 @@ public class CLImpl extends CLAbstractImpl { this.contextCallbackMap.setKeyNotFoundValue(0); } + @Override public long clCreateContext(NativeSizeBuffer properties, NativeSizeBuffer devices, CLErrorHandler pfn_notify, IntBuffer errcode_ret) { if (properties != null && !properties.isDirect()) { @@ -87,6 +88,7 @@ public class CLImpl extends CLAbstractImpl { private native long clCreateContext0(Object cl_context_properties, int props_offset, int numDevices, Object devices, int devices_offset, Object pfn_notify, long[] global, Object errcode_ret, int err_offset, long address); + @Override public long clCreateContextFromType(NativeSizeBuffer properties, long device_type, CLErrorHandler pfn_notify, IntBuffer errcode_ret) { if (properties != null && !properties.isDirect()) { @@ -117,6 +119,7 @@ public class CLImpl extends CLAbstractImpl { private native long clCreateContextFromType0(Object properties, int props_offset, long device_type, Object pfn_notify, long[] global, Object errcode_ret, int err_offset, long address); + @Override public int clReleaseContext(long context) { long global = 0; synchronized (contextCallbackMap) { @@ -134,6 +137,7 @@ public class CLImpl extends CLAbstractImpl { public native int clReleaseContextImpl(long context, long global, long address); /** Interface to C language function: <br> <code> int32_t clBuildProgram(cl_program, uint32_t, cl_device_id * , const char * , void * ); </code> */ + @Override public int clBuildProgram(long program, int deviceCount, NativeSizeBuffer deviceList, String options, BuildProgramCallback cb) { if (deviceList != null && !deviceList.isDirect()) { @@ -152,6 +156,7 @@ public class CLImpl extends CLAbstractImpl { private native int clBuildProgram0(long program, int deviceCount, Object deviceList, int deviceListOffset, String options, BuildProgramCallback cb, long address); + @Override public int clSetEventCallback(long event, int trigger, CLEventCallback callback) { final long address = addressTable._addressof_clSetEventCallback; if (address == 0) { @@ -163,6 +168,7 @@ public class CLImpl extends CLAbstractImpl { private native int clSetEventCallback0(long event, int type, CLEventCallback cb, long address); + @Override public int clSetMemObjectDestructorCallback(long memObjID, CLMemObjectDestructorCallback cb) { final long address = addressTable._addressof_clSetMemObjectDestructorCallback; if (address == 0) { @@ -182,6 +188,7 @@ public class CLImpl extends CLAbstractImpl { @param event_wait_list a direct {@link com.jogamp.gluegen.common.nio.NativeSizeBuffer} @param event a direct {@link com.jogamp.gluegen.common.nio.NativeSizeBuffer} @param errcode_ret a direct {@link java.nio.IntBuffer} */ + @Override public ByteBuffer clEnqueueMapImage(long command_queue, long image, int blocking_map, long map_flags, NativeSizeBuffer origin, NativeSizeBuffer range, NativeSizeBuffer image_row_pitch, NativeSizeBuffer image_slice_pitch, diff --git a/src/com/jogamp/opencl/impl/CLMemObjectDestructorCallback.java b/src/com/jogamp/opencl/llb/impl/CLMemObjectDestructorCallback.java index c040d2c..5ed57cc 100644 --- a/src/com/jogamp/opencl/impl/CLMemObjectDestructorCallback.java +++ b/src/com/jogamp/opencl/llb/impl/CLMemObjectDestructorCallback.java @@ -30,7 +30,7 @@ * Created on Thursday, September 02 2010 23:09 */ -package com.jogamp.opencl.impl; +package com.jogamp.opencl.llb.impl; /** * A callback which is invoked by the OpenCL implementation when the memory diff --git a/src/com/jogamp/opencl/spi/CLAccessorFactory.java b/src/com/jogamp/opencl/spi/CLAccessorFactory.java index 6239bb3..752891b 100644 --- a/src/com/jogamp/opencl/spi/CLAccessorFactory.java +++ b/src/com/jogamp/opencl/spi/CLAccessorFactory.java @@ -3,7 +3,7 @@ */ package com.jogamp.opencl.spi; -import com.jogamp.opencl.CL; +import com.jogamp.opencl.llb.CL; /** * Implementations of this interface are factories responsible for creating CLAccessors. diff --git a/src/com/jogamp/opencl/util/CLBuildListener.java b/src/com/jogamp/opencl/util/CLBuildListener.java index 9a52058..0551785 100644 --- a/src/com/jogamp/opencl/util/CLBuildListener.java +++ b/src/com/jogamp/opencl/util/CLBuildListener.java @@ -37,10 +37,10 @@ import com.jogamp.opencl.CLProgram; /** * A callback an application can register to be called when the program executable * has been built (successfully or unsuccessfully).<br/> - * Note1: registering a build callback can make {@link com.jogamp.opencl.CL#clBuildProgram} non blocking (OpenCL implementation dependent).<br/> + * Note1: registering a build callback can make {@link com.jogamp.opencl.llb.CL#clBuildProgram} non blocking (OpenCL implementation dependent).<br/> * Note2: the thread which calls this method is unspecified. The Application should ensure propper synchronization. * @author Michael Bien - * @see com.jogamp.opencl.CL#clBuildProgram(long, int, com.jogamp.common.nio.NativeSizeBuffer, java.lang.String, com.jogamp.opencl.impl.BuildProgramCallback) + * @see com.jogamp.opencl.llb.CL#clBuildProgram(long, int, com.jogamp.common.nio.NativeSizeBuffer, java.lang.String, com.jogamp.opencl.llb.impl.BuildProgramCallback) */ public interface CLBuildListener { diff --git a/src/com/jogamp/opencl/util/CLInfo.java b/src/com/jogamp/opencl/util/CLInfo.java index 3b483fc..40c4f2f 100644 --- a/src/com/jogamp/opencl/util/CLInfo.java +++ b/src/com/jogamp/opencl/util/CLInfo.java @@ -34,7 +34,7 @@ package com.jogamp.opencl.util; import com.jogamp.common.os.Platform; import com.jogamp.opencl.CLDevice; import com.jogamp.opencl.CLPlatform; -import com.jogamp.opencl.impl.CLImpl; +import com.jogamp.opencl.llb.impl.CLImpl; import java.util.Map; diff --git a/src/com/jogamp/opencl/util/CLUtil.java b/src/com/jogamp/opencl/util/CLUtil.java index 371c493..98a6cd7 100644 --- a/src/com/jogamp/opencl/util/CLUtil.java +++ b/src/com/jogamp/opencl/util/CLUtil.java @@ -29,7 +29,7 @@ package com.jogamp.opencl.util; import com.jogamp.common.JogampRuntimeException; -import com.jogamp.opencl.CL; +import com.jogamp.opencl.llb.CL; import com.jogamp.opencl.CLDevice; import com.jogamp.opencl.CLPlatform; import com.jogamp.opencl.CLProperty; diff --git a/src/com/jogamp/opencl/util/JOCLVersion.java b/src/com/jogamp/opencl/util/JOCLVersion.java index 265233a..48dd2a9 100644 --- a/src/com/jogamp/opencl/util/JOCLVersion.java +++ b/src/com/jogamp/opencl/util/JOCLVersion.java @@ -35,7 +35,7 @@ import com.jogamp.common.GlueGenVersion; import com.jogamp.common.os.Platform; import com.jogamp.common.util.JogampVersion; import com.jogamp.common.util.VersionUtil; -import com.jogamp.opencl.CL; +import com.jogamp.opencl.llb.CL; import java.security.PrivilegedAction; import java.util.jar.Manifest; @@ -56,7 +56,7 @@ public class JOCLVersion extends JogampVersion { private static JOCLVersion createInstance() { return doPrivileged(new PrivilegedAction<JOCLVersion>() { - public JOCLVersion run() { + @Override public JOCLVersion run() { Manifest manifest = VersionUtil.getManifest(CL.class.getClassLoader(), PACKAGE); if(manifest == null) { manifest = new Manifest(); @@ -92,7 +92,7 @@ public class JOCLVersion extends JogampVersion { try{ doPrivileged(new PrivilegedAction<Object>() { - public Object run() { + @Override public Object run() { sb.append(GlueGenVersion.getInstance().toString()); return null; } diff --git a/test/com/jogamp/opencl/CLCommandQueueTest.java b/test/com/jogamp/opencl/CLCommandQueueTest.java index 5636a40..f5438d4 100644 --- a/test/com/jogamp/opencl/CLCommandQueueTest.java +++ b/test/com/jogamp/opencl/CLCommandQueueTest.java @@ -37,6 +37,7 @@ import com.jogamp.opencl.CLCommandQueue.Mode; import com.jogamp.opencl.CLMemory.Mem; import com.jogamp.opencl.util.CLDeviceFilters; import com.jogamp.opencl.util.CLPlatformFilters; +import com.jogamp.opencl.llb.CL; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.IntBuffer; diff --git a/test/com/jogamp/opencl/CLProgramTest.java b/test/com/jogamp/opencl/CLProgramTest.java index a3ee26f..4d3b0cf 100644 --- a/test/com/jogamp/opencl/CLProgramTest.java +++ b/test/com/jogamp/opencl/CLProgramTest.java @@ -32,6 +32,7 @@ import com.jogamp.opencl.util.CLBuildConfiguration; import com.jogamp.opencl.util.CLProgramConfiguration; import com.jogamp.opencl.CLProgram.Status; import com.jogamp.opencl.util.CLBuildListener; +import com.jogamp.opencl.llb.CL; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -221,6 +222,7 @@ public class CLProgramTest { final CLProgram outerProgram = program; CLBuildListener buildCallback = new CLBuildListener() { + @Override public void buildFinished(CLProgram program) { assertEquals(outerProgram, program); countdown.countDown(); diff --git a/test/com/jogamp/opencl/HighLevelBindingTest.java b/test/com/jogamp/opencl/HighLevelBindingTest.java index 749db3a..fe6bef5 100644 --- a/test/com/jogamp/opencl/HighLevelBindingTest.java +++ b/test/com/jogamp/opencl/HighLevelBindingTest.java @@ -39,6 +39,7 @@ import com.jogamp.opencl.CLDevice.GlobalMemCacheType; import com.jogamp.opencl.CLDevice.LocalMemType; import com.jogamp.opencl.CLDevice.Type; import com.jogamp.opencl.CLDevice.Capabilities; +import com.jogamp.opencl.llb.CL; import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; diff --git a/test/com/jogamp/opencl/LowLevelBindingTest.java b/test/com/jogamp/opencl/LowLevelBindingTest.java index 9e60387..655bfc6 100644 --- a/test/com/jogamp/opencl/LowLevelBindingTest.java +++ b/test/com/jogamp/opencl/LowLevelBindingTest.java @@ -29,8 +29,9 @@ package com.jogamp.opencl; import java.util.Random; -import com.jogamp.opencl.impl.BuildProgramCallback; +import com.jogamp.opencl.llb.impl.BuildProgramCallback; import com.jogamp.common.nio.NativeSizeBuffer; +import com.jogamp.opencl.llb.CL; import java.nio.ByteBuffer; import java.nio.IntBuffer; @@ -292,6 +293,7 @@ public class LowLevelBindingTest { // tests if the callback is called final CountDownLatch latch = new CountDownLatch(1); BuildProgramCallback callback = new BuildProgramCallback() { + @Override public void buildFinished(long cl_program) { try{ assertEquals(program, cl_program); @@ -421,6 +423,7 @@ public class LowLevelBindingTest { for(int i = 0; i < 100; i++) { final int n = i; tasks.add(new Callable<Object>() { + @Override public Object call() { try { out.println("###start iteration " + n); |