diff options
author | Wade Walker <[email protected]> | 2015-09-12 14:28:16 -0500 |
---|---|---|
committer | Wade Walker <[email protected]> | 2015-11-08 14:05:29 -0600 |
commit | 9a90181ed1fb596275fee9ebca0f3d1093722ca9 (patch) | |
tree | d9fbcc4fbb6c54bae64e5c0160f3a28a2ca0e934 /make | |
parent | e56a17d6d7780b8597c78ce50808c8da68d094b5 (diff) |
Add explicit version number to original CL impl classes.
This makes all three versions (1.1, 1.2, and 2.0) use the same naming
convention, and sets me up to use the unversioned name to factor out
code common to all three.
Diffstat (limited to 'make')
-rw-r--r-- | make/build.xml | 2 | ||||
-rw-r--r-- | make/config/cl-impl-11.cfg (renamed from make/config/cl-impl.cfg) | 22 | ||||
-rw-r--r-- | make/config/clImplCustomCode11.c (renamed from make/config/clImplCustomCode.c) | 16 | ||||
-rw-r--r-- | make/config/clImplCustomCode11.java (renamed from make/config/clImplCustomCode.java) | 8 |
4 files changed, 24 insertions, 24 deletions
diff --git a/make/build.xml b/make/build.xml index cbe251a..b1bb709 100644 --- a/make/build.xml +++ b/make/build.xml @@ -556,7 +556,7 @@ <echo message="Generating CLAbstractImpl.java, CLAbstractImpl_JNI.c, and CLProcAddressTable.java for OpenCL version 1.1"/> <gluegen src="${stub.includes}/opencl.h" outputRootDir="${build}" - config="${config}/cl-impl.cfg" + config="${config}/cl-impl-11.cfg" includeRefid="stub.includes.fileset.all.11" literalInclude="${stub.includes.gluegen.all}" emitter="com.jogamp.gluegen.procaddress.ProcAddressEmitter" diff --git a/make/config/cl-impl.cfg b/make/config/cl-impl-11.cfg index f785066..9a49ea6 100644 --- a/make/config/cl-impl.cfg +++ b/make/config/cl-impl-11.cfg @@ -8,19 +8,19 @@ Import com.jogamp.opencl.llb.gl.CLGL Import java.security.AccessController Import java.security.PrivilegedAction -ClassJavadoc CLAbstractImpl /** -ClassJavadoc CLAbstractImpl * Java bindings to OpenCL, the Open Computing Language (generated). -ClassJavadoc CLAbstractImpl * @author Michael Bien, GlueGen, et al. -ClassJavadoc CLAbstractImpl */ +ClassJavadoc CLAbstractImpl11 /** +ClassJavadoc CLAbstractImpl11 * Java bindings to OpenCL, the Open Computing Language (generated). +ClassJavadoc CLAbstractImpl11 * @author Michael Bien, GlueGen, et al. +ClassJavadoc CLAbstractImpl11 */ -ImplJavaClass CLAbstractImpl -AccessControl CLAbstractImpl PUBLIC_ABSTRACT -Implements CLAbstractImpl CLGL +ImplJavaClass CLAbstractImpl11 +AccessControl CLAbstractImpl11 PUBLIC_ABSTRACT +Implements CLAbstractImpl11 CLGL LocalProcAddressCallingConvention __ALL__ CL_API_CALL EmitProcAddressTable true -ProcAddressTableClassName CLProcAddressTable +ProcAddressTableClassName CLProcAddressTable11 GetProcAddressTableExpr addressTable ProcAddressNameExpr $UpperCase(arg) ForceProcAddressGen __ALL__ @@ -93,7 +93,7 @@ ManuallyImplement clEnqueueMapImage ForceProcAddressGen clEnqueueMapImage #include custom code -IncludeAs CustomJavaCode CLAbstractImpl clImplCustomCode.java -ManualStaticInitCall CLAbstractImpl -IncludeAs CustomCCode clImplCustomCode.c +IncludeAs CustomJavaCode CLAbstractImpl11 clImplCustomCode11.java +ManualStaticInitCall CLAbstractImpl11 +IncludeAs CustomCCode clImplCustomCode11.c diff --git a/make/config/clImplCustomCode.c b/make/config/clImplCustomCode11.c index 1d64086..1e772d9 100644 --- a/make/config/clImplCustomCode.c +++ b/make/config/clImplCustomCode11.c @@ -115,7 +115,7 @@ CL_CALLBACK void memObjDestructorCallback(cl_mem mem, void * object) { // extern CL_API_ENTRY void * CL_API_CALL clGetExtensionFunctionAddress(const char * /* func_name */) CL_API_SUFFIX__VERSION_1_0; JNIEXPORT jlong JNICALL -Java_com_jogamp_opencl_llb_impl_CLAbstractImpl_dispatch_1clGetExtensionFunctionAddressStatic(JNIEnv *env, jclass _unused, jstring fname, jlong procAddress) { +Java_com_jogamp_opencl_llb_impl_CLAbstractImpl11_dispatch_1clGetExtensionFunctionAddressStatic(JNIEnv *env, jclass _unused, jstring fname, jlong procAddress) { typedef void* (CL_API_CALL * _local_LPCLGETPROCADDRESS)(const char * fname); _local_LPCLGETPROCADDRESS ptr_clGetExtensionFunctionAddress; const char* _strchars_fname = NULL; @@ -147,7 +147,7 @@ Java_com_jogamp_opencl_llb_impl_CLAbstractImpl_dispatch_1clGetExtensionFunctionA * cl_int * errcode_ret); */ JNIEXPORT jlong JNICALL -Java_com_jogamp_opencl_llb_impl_CLImpl_clCreateContextFromType0(JNIEnv *env, jobject _unused, +Java_com_jogamp_opencl_llb_impl_CLImpl11_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; @@ -200,7 +200,7 @@ Java_com_jogamp_opencl_llb_impl_CLImpl_clCreateContextFromType0(JNIEnv *env, job * cl_int * errcode_ret ) CL_API_SUFFIX__VERSION_1_0; */ JNIEXPORT jlong JNICALL -Java_com_jogamp_opencl_llb_impl_CLImpl_clCreateContext0(JNIEnv *env, jobject _unused, +Java_com_jogamp_opencl_llb_impl_CLImpl11_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; @@ -251,7 +251,7 @@ Java_com_jogamp_opencl_llb_impl_CLImpl_clCreateContext0(JNIEnv *env, jobject _un * C function: int32_t clReleaseContextImpl(cl_context context); */ JNIEXPORT jint JNICALL -Java_com_jogamp_opencl_llb_impl_CLImpl_clReleaseContextImpl(JNIEnv *env, jobject _unused, jlong context, jlong global, jlong procAddress) { +Java_com_jogamp_opencl_llb_impl_CLImpl11_clReleaseContextImpl(JNIEnv *env, jobject _unused, jlong context, jlong global, jlong procAddress) { int32_t _res; typedef int32_t (*function)(cl_context); @@ -277,7 +277,7 @@ Java_com_jogamp_opencl_llb_impl_CLImpl_clReleaseContextImpl(JNIEnv *env, jobject * void * user_data ) CL_API_SUFFIX__VERSION_1_0; */ JNIEXPORT jint JNICALL -Java_com_jogamp_opencl_llb_impl_CLImpl_clBuildProgram0(JNIEnv *env, jobject _unused, +Java_com_jogamp_opencl_llb_impl_CLImpl11_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; @@ -327,7 +327,7 @@ Java_com_jogamp_opencl_llb_impl_CLImpl_clBuildProgram0(JNIEnv *env, jobject _unu * 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_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, +Java_com_jogamp_opencl_llb_impl_CLImpl11_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, @@ -404,7 +404,7 @@ Java_com_jogamp_opencl_llb_impl_CLImpl_clEnqueueMapImage0__JJIJLjava_lang_Object } JNIEXPORT jint JNICALL -Java_com_jogamp_opencl_llb_impl_CLImpl_clSetEventCallback0(JNIEnv *env, jobject _unused, +Java_com_jogamp_opencl_llb_impl_CLImpl11_clSetEventCallback0(JNIEnv *env, jobject _unused, jlong event, jint trigger, jobject listener, jlong procAddress) { cl_event _event = (cl_event)event; @@ -420,7 +420,7 @@ Java_com_jogamp_opencl_llb_impl_CLImpl_clSetEventCallback0(JNIEnv *env, jobject } JNIEXPORT jint JNICALL -Java_com_jogamp_opencl_llb_impl_CLImpl_clSetMemObjectDestructorCallback0(JNIEnv *env, jobject _unused, +Java_com_jogamp_opencl_llb_impl_CLImpl11_clSetMemObjectDestructorCallback0(JNIEnv *env, jobject _unused, jlong mem, jobject listener, jlong procAddress) { cl_mem _mem = (cl_mem)mem; diff --git a/make/config/clImplCustomCode.java b/make/config/clImplCustomCode11.java index e4fd2dc..0dcb770 100644 --- a/make/config/clImplCustomCode.java +++ b/make/config/clImplCustomCode11.java @@ -1,10 +1,10 @@ /** If null, OpenCL is not available on this machine. */ static final DynamicLibraryBundle dynamicLookupHelper; - protected static final CLProcAddressTable addressTable; + protected static final CLProcAddressTable11 addressTable; static { - addressTable = new CLProcAddressTable(); + addressTable = new CLProcAddressTable11(); dynamicLookupHelper = AccessController.doPrivileged(new PrivilegedAction<DynamicLibraryBundle>() { public DynamicLibraryBundle run() { final DynamicLibraryBundle bundle = new DynamicLibraryBundle(new CLDynamicLibraryBundleInfo()); @@ -32,7 +32,7 @@ * @returns true if OpenCL is available on this machine. */ public static boolean isAvailable() { return dynamicLookupHelper != null; } - public static CLProcAddressTable getCLProcAddressTable() { return addressTable; } + public static CLProcAddressTable11 getCLProcAddressTable() { return addressTable; } static long clGetExtensionFunctionAddress(long clGetExtensionFunctionAddressHandle, java.lang.String procname) { @@ -42,7 +42,7 @@ return dispatch_clGetExtensionFunctionAddressStatic(procname, clGetExtensionFunctionAddressHandle); } - public CLAbstractImpl() { + public CLAbstractImpl11() { } /** Entry point (through function pointer) to C language function: <br> <code> void* clGetExtensionFunctionAddress(const char * fname); </code> */ |