aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--make/build.xml132
-rw-r--r--make/config/cl-buffer-if.cfg13
-rw-r--r--make/config/cl-context-if.cfg23
-rw-r--r--make/config/cl-device-if.cfg12
-rw-r--r--make/config/cl-event-if.cfg17
-rw-r--r--make/config/cl-if.cfg54
-rw-r--r--make/config/cl-image-if.cfg16
-rw-r--r--make/config/cl-kernel-if.cfg12
-rw-r--r--make/config/cl-mem-if.cfg18
-rw-r--r--make/config/cl-platform-if.cfg12
-rw-r--r--make/config/cl-program-if.cfg18
-rw-r--r--make/config/cl-queue-if.cfg12
-rw-r--r--make/config/cl-sampler-if.cfg12
-rw-r--r--src/com/jogamp/opencl/CLEvent.java1
-rw-r--r--src/com/jogamp/opencl/CLException.java59
-rw-r--r--src/com/jogamp/opencl/CLPlatform.java11
-rw-r--r--src/com/jogamp/opencl/gl/CLGLContext.java9
-rw-r--r--src/com/jogamp/opencl/gl/CLGLImage2d.java7
-rw-r--r--src/com/jogamp/opencl/gl/CLGLTexture2d.java7
-rw-r--r--src/com/jogamp/opencl/gl/CLGLTexture3d.java9
-rw-r--r--src/com/jogamp/opencl/impl/CLTLAccessorFactory.java9
-rw-r--r--src/com/jogamp/opencl/spi/CLAccessorFactory.java3
-rw-r--r--test/com/jogamp/opencl/CLCommandQueueTest.java3
-rw-r--r--test/com/jogamp/opencl/HighLevelBindingTest.java3
-rw-r--r--test/com/jogamp/opencl/LowLevelBindingTest.java57
25 files changed, 104 insertions, 425 deletions
diff --git a/make/build.xml b/make/build.xml
index d08614a9..24704397 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -398,138 +398,6 @@
<echo message="GlueGen and JOGL stub include path: ${stub.includes.gluegen.all}"/>
<echo message="OpenCL stub include path for OpenCL version 1.1: ${toString:stub.includes.fileset.all.11}"/>
- <echo message="Generating CLContextBinding.java from OpenCL version 1.1"/>
- <gluegen src="${stub.includes}/opencl.h"
- outputRootDir="${build}"
- config="${config}/cl-context-if.cfg"
- includeRefid="stub.includes.fileset.all.11"
- literalInclude="${stub.includes.gluegen.all}"
- emitter="com.jogamp.gluegen.JavaEmitter"
- dumpCPP="false"
- debug="false">
- <classpath refid="gluegen.classpath" />
- </gluegen>
-
- <echo message="Generating CLProgramBinding.java from OpenCL version 1.1"/>
- <gluegen src="${stub.includes}/opencl.h"
- outputRootDir="${build}"
- config="${config}/cl-program-if.cfg"
- includeRefid="stub.includes.fileset.all.11"
- literalInclude="${stub.includes.gluegen.all}"
- emitter="com.jogamp.gluegen.JavaEmitter"
- dumpCPP="false"
- debug="false">
- <classpath refid="gluegen.classpath" />
- </gluegen>
-
- <echo message="Generating CLKernelBinding.java from OpenCL version 1.1"/>
- <gluegen src="${stub.includes}/opencl.h"
- outputRootDir="${build}"
- config="${config}/cl-kernel-if.cfg"
- includeRefid="stub.includes.fileset.all.11"
- literalInclude="${stub.includes.gluegen.all}"
- emitter="com.jogamp.gluegen.JavaEmitter"
- dumpCPP="false"
- debug="false">
- <classpath refid="gluegen.classpath" />
- </gluegen>
-
- <echo message="Generating CLCommandQueueBinding.java from OpenCL version 1.1"/>
- <gluegen src="${stub.includes}/opencl.h"
- outputRootDir="${build}"
- config="${config}/cl-queue-if.cfg"
- includeRefid="stub.includes.fileset.all.11"
- literalInclude="${stub.includes.gluegen.all}"
- emitter="com.jogamp.gluegen.JavaEmitter"
- dumpCPP="false"
- debug="false">
- <classpath refid="gluegen.classpath" />
- </gluegen>
-
- <echo message="Generating CLDeviceBinding.java from OpenCL version 1.1"/>
- <gluegen src="${stub.includes}/opencl.h"
- outputRootDir="${build}"
- config="${config}/cl-device-if.cfg"
- includeRefid="stub.includes.fileset.all.11"
- literalInclude="${stub.includes.gluegen.all}"
- emitter="com.jogamp.gluegen.JavaEmitter"
- dumpCPP="false"
- debug="false">
- <classpath refid="gluegen.classpath" />
- </gluegen>
-
- <echo message="Generating CLMemObjBinding.java from OpenCL version 1.1"/>
- <gluegen src="${stub.includes}/opencl.h"
- outputRootDir="${build}"
- config="${config}/cl-mem-if.cfg"
- includeRefid="stub.includes.fileset.all.11"
- literalInclude="${stub.includes.gluegen.all}"
- emitter="com.jogamp.gluegen.JavaEmitter"
- dumpCPP="false"
- debug="false">
- <classpath refid="gluegen.classpath" />
- </gluegen>
-
- <echo message="Generating CLImageBinding.java from OpenCL version 1.1"/>
- <gluegen src="${stub.includes}/opencl.h"
- outputRootDir="${build}"
- config="${config}/cl-image-if.cfg"
- includeRefid="stub.includes.fileset.all.11"
- literalInclude="${stub.includes.gluegen.all}"
- emitter="com.jogamp.gluegen.JavaEmitter"
- dumpCPP="false"
- debug="false">
- <classpath refid="gluegen.classpath" />
- </gluegen>
-
- <echo message="Generating CLBufferBinding.java from OpenCL version 1.1"/>
- <gluegen src="${stub.includes}/opencl.h"
- outputRootDir="${build}"
- config="${config}/cl-buffer-if.cfg"
- includeRefid="stub.includes.fileset.all.11"
- literalInclude="${stub.includes.gluegen.all}"
- emitter="com.jogamp.gluegen.JavaEmitter"
- dumpCPP="false"
- debug="false">
- <classpath refid="gluegen.classpath" />
- </gluegen>
-
- <echo message="Generating CLSamplerBinding.java from OpenCL version 1.1"/>
- <gluegen src="${stub.includes}/opencl.h"
- outputRootDir="${build}"
- config="${config}/cl-sampler-if.cfg"
- includeRefid="stub.includes.fileset.all.11"
- literalInclude="${stub.includes.gluegen.all}"
- emitter="com.jogamp.gluegen.JavaEmitter"
- dumpCPP="false"
- debug="false">
- <classpath refid="gluegen.classpath" />
- </gluegen>
-
- <echo message="Generating CLEventBinding.java from OpenCL version 1.1"/>
- <gluegen src="${stub.includes}/opencl.h"
- outputRootDir="${build}"
- config="${config}/cl-event-if.cfg"
- includeRefid="stub.includes.fileset.all.11"
- literalInclude="${stub.includes.gluegen.all}"
- emitter="com.jogamp.gluegen.JavaEmitter"
- dumpCPP="false"
- debug="false">
- <classpath refid="gluegen.classpath" />
- </gluegen>
-
- <echo message="Generating CLPlatformBinding.java from OpenCL version 1.1"/>
- <gluegen src="${stub.includes}/opencl.h"
- outputRootDir="${build}"
- config="${config}/cl-platform-if.cfg"
- includeRefid="stub.includes.fileset.all.11"
- literalInclude="${stub.includes.gluegen.all}"
- emitter="com.jogamp.gluegen.JavaEmitter"
- dumpCPP="false"
- debug="false">
- <classpath refid="gluegen.classpath" />
- </gluegen>
-
<echo message="Generating CL.java from OpenCL version 1.1"/>
<gluegen src="${stub.includes}/opencl.h"
outputRootDir="${build}"
diff --git a/make/config/cl-buffer-if.cfg b/make/config/cl-buffer-if.cfg
deleted file mode 100644
index 197ef54d..00000000
--- a/make/config/cl-buffer-if.cfg
+++ /dev/null
@@ -1,13 +0,0 @@
-Include cl-common.cfg
-
-Style InterfaceOnly
-
-ClassJavadoc CLBufferBinding /**
-ClassJavadoc CLBufferBinding * Java bindings to OpenCL buffers.
-ClassJavadoc CLBufferBinding * @author Michael Bien, GlueGen, et al.
-ClassJavadoc CLBufferBinding */
-JavaClass CLBufferBinding
-
-Extends CLBufferBinding CLMemObjBinding
-
-IgnoreNot .*CreateBuffer.*|.*CreateSubBuffer.*
diff --git a/make/config/cl-context-if.cfg b/make/config/cl-context-if.cfg
deleted file mode 100644
index 0e9a5617..00000000
--- a/make/config/cl-context-if.cfg
+++ /dev/null
@@ -1,23 +0,0 @@
-Include cl-common.cfg
-
-Style InterfaceOnly
-
-Import com.jogamp.opencl.llb.impl.CLImageFormatImpl
-Import com.jogamp.opencl.CLErrorHandler
-
-ClassJavadoc CLContextBinding /**
-ClassJavadoc CLContextBinding * Java bindings to OpenCL contexts.
-ClassJavadoc CLContextBinding * @author Michael Bien, GlueGen, et al.
-ClassJavadoc CLContextBinding */
-JavaClass CLContextBinding
-
-IgnoreNot clGetSupportedImageFormats.*|.*GetContextInfo.*|.*RetainContext.*|.*ReleaseContext.*|CL_CONTEXT_.*
-
-#custom implementations
-CustomJavaCode CLContextBinding
-CustomJavaCode CLContextBinding /** 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 CLContextBinding public long clCreateContext(PointerBuffer properties, PointerBuffer devices, CLErrorHandler pfn_notify, IntBuffer errcode_ret);
-
-CustomJavaCode CLContextBinding
-CustomJavaCode CLContextBinding /** 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 CLContextBinding public long clCreateContextFromType(PointerBuffer properties, long device_type, CLErrorHandler pfn_notify, IntBuffer errcode_ret);
diff --git a/make/config/cl-device-if.cfg b/make/config/cl-device-if.cfg
deleted file mode 100644
index a32476ca..00000000
--- a/make/config/cl-device-if.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-Include cl-common.cfg
-
-Style InterfaceOnly
-
-ClassJavadoc CLDeviceBinding /**
-ClassJavadoc CLDeviceBinding * Java bindings to OpenCL devices.
-ClassJavadoc CLDeviceBinding * @author Michael Bien, GlueGen, et al.
-ClassJavadoc CLDeviceBinding */
-JavaClass CLDeviceBinding
-
-IgnoreNot .*CreateSubDevice.*|.*GetDeviceInfo.*|.*RetainDevice.*|.*ReleaseDevice.*|CL_DEVICE_.*|CL_FP_.*|CL_GLOBAL|CL_LOCAL|CL_READ_.*_CACHE
-
diff --git a/make/config/cl-event-if.cfg b/make/config/cl-event-if.cfg
deleted file mode 100644
index 87b55bfd..00000000
--- a/make/config/cl-event-if.cfg
+++ /dev/null
@@ -1,17 +0,0 @@
-Include cl-common.cfg
-
-Style InterfaceOnly
-
-import com.jogamp.opencl.llb.impl.CLEventCallback
-
-ClassJavadoc CLEventBinding /**
-ClassJavadoc CLEventBinding * Java bindings to OpenCL events.
-ClassJavadoc CLEventBinding * @author Michael Bien, GlueGen, et al.
-ClassJavadoc CLEventBinding */
-JavaClass CLEventBinding
-
-IgnoreNot .*CreateUserEvent.*|.*GetEventInfo.*|.*GetEventProfilingInfo.*|.*SetUserEventStatus.*|clWaitForEvents.*|.*RetainEvent.*|.*ReleaseEvent.*|CL_EVENT_.*
-
-CustomJavaCode CLEventBinding
-CustomJavaCode CLEventBinding /** 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 CLEventBinding public int clSetEventCallback(long event, int type, CLEventCallback cb);
diff --git a/make/config/cl-if.cfg b/make/config/cl-if.cfg
index 2078123a..d4d600b1 100644
--- a/make/config/cl-if.cfg
+++ b/make/config/cl-if.cfg
@@ -2,41 +2,45 @@ Include cl-common.cfg
Style InterfaceOnly
+Import com.jogamp.opencl.llb.impl.CLImageFormatImpl
+Import com.jogamp.opencl.CLErrorHandler
+Import com.jogamp.opencl.llb.impl.BuildProgramCallback
+import com.jogamp.opencl.llb.impl.CLMemObjectDestructorCallback
+import com.jogamp.opencl.llb.impl.CLEventCallback
+
ClassJavadoc CL /**
ClassJavadoc CL * Java bindings to OpenCL, the Open Computing Language.
ClassJavadoc CL * @author Michael Bien, GlueGen, et al.
ClassJavadoc CL */
JavaClass CL
-Extends CL CLContextBinding
-Extends CL CLProgramBinding
-Extends CL CLKernelBinding
-Extends CL CLCommandQueueBinding
-Extends CL CLDeviceBinding
-Extends CL CLImageBinding
-Extends CL CLBufferBinding
-Extends CL CLSamplerBinding
-Extends CL CLEventBinding
-Extends CL CLPlatformBinding
-
-ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLContextBinding.java
-ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLProgramBinding.java
-ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLKernelBinding.java
-ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLCommandQueueBinding.java
-ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLDeviceBinding.java
-ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLMemObjBinding.java
-ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLImageBinding.java
-ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLBufferBinding.java
-ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLSamplerBinding.java
-ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLEventBinding.java
-ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLPlatformBinding.java
-
#ignore cl-gl interoperability functions. Interface 'CL' is pure OpenCL.
Ignore CL_GL_.*|cl.*GL.*|.*_GL_.*
Ignore clCreateContext
Ignore clCreateContextFromType
Ignore clBuildProgram
-Ignore clEnqueueNativeKernel
-Ignore clSetEventCallback
Ignore clSetMemObjectDestructorCallback
+Ignore clSetEventCallback
+Ignore clEnqueueNativeKernel
+
+#custom implementations
+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(PointerBuffer properties, PointerBuffer devices, CLErrorHandler pfn_notify, IntBuffer errcode_ret);
+
+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(PointerBuffer properties, long device_type, CLErrorHandler pfn_notify, IntBuffer errcode_ret);
+
+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, PointerBuffer devices, String options, BuildProgramCallback cb);
+
+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);
+
+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);
diff --git a/make/config/cl-image-if.cfg b/make/config/cl-image-if.cfg
deleted file mode 100644
index 611d1bf2..00000000
--- a/make/config/cl-image-if.cfg
+++ /dev/null
@@ -1,16 +0,0 @@
-Include cl-common.cfg
-
-Style InterfaceOnly
-
-Import com.jogamp.opencl.llb.impl.CLImageFormatImpl
-
-ClassJavadoc CLImageBinding /**
-ClassJavadoc CLImageBinding * Java bindings to OpenCL images.
-ClassJavadoc CLImageBinding * @author Michael Bien, GlueGen, et al.
-ClassJavadoc CLImageBinding */
-JavaClass CLImageBinding
-
-Extends CLImageBinding CLMemObjBinding
-
-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/make/config/cl-kernel-if.cfg b/make/config/cl-kernel-if.cfg
deleted file mode 100644
index be9d6aa2..00000000
--- a/make/config/cl-kernel-if.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-Include cl-common.cfg
-
-Style InterfaceOnly
-
-ClassJavadoc CLKernelBinding /**
-ClassJavadoc CLKernelBinding * Java bindings to OpenCL kernels.
-ClassJavadoc CLKernelBinding * @author Michael Bien, GlueGen, et al.
-ClassJavadoc CLKernelBinding */
-JavaClass CLKernelBinding
-
-IgnoreNot .*CreateKernel.*|.*GetKernel.*Info.*|.*SetKernel.*|.*RetainKernel.*|.*ReleaseKernel.*|CL_KERNEL_.*
-
diff --git a/make/config/cl-mem-if.cfg b/make/config/cl-mem-if.cfg
deleted file mode 100644
index 11c51d19..00000000
--- a/make/config/cl-mem-if.cfg
+++ /dev/null
@@ -1,18 +0,0 @@
-Include cl-common.cfg
-
-Style InterfaceOnly
-
-import com.jogamp.opencl.llb.impl.CLMemObjectDestructorCallback
-
-ClassJavadoc CLMemObjBinding /**
-ClassJavadoc CLMemObjBinding * Java bindings to OpenCL memory objects.
-ClassJavadoc CLMemObjBinding * @author Michael Bien, GlueGen, et al.
-ClassJavadoc CLMemObjBinding */
-JavaClass CLMemObjBinding
-
-IgnoreNot .*GetMemObjectInfo.*|.*RetainMemObject.*|.*ReleaseMemObject.*|CL_MEM_.*|CL_MAP_.*
-
-CustomJavaCode CLMemObjBinding
-CustomJavaCode CLMemObjBinding /** 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 CLMemObjBinding public int clSetMemObjectDestructorCallback(long memObjID, CLMemObjectDestructorCallback cb);
-
diff --git a/make/config/cl-platform-if.cfg b/make/config/cl-platform-if.cfg
deleted file mode 100644
index 1a355f34..00000000
--- a/make/config/cl-platform-if.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-Include cl-common.cfg
-
-Style InterfaceOnly
-
-ClassJavadoc CLPlatformBinding /**
-ClassJavadoc CLPlatformBinding * Java bindings to OpenCL platforms.
-ClassJavadoc CLPlatformBinding * @author Michael Bien, GlueGen, et al.
-ClassJavadoc CLPlatformBinding */
-JavaClass CLPlatformBinding
-
-IgnoreNot .*GetPlatformInfo.*|.*GetDeviceIDs.*|.*GetPlatformIDs.*|CL_PLATFORM_.*
-
diff --git a/make/config/cl-program-if.cfg b/make/config/cl-program-if.cfg
deleted file mode 100644
index 7b72272f..00000000
--- a/make/config/cl-program-if.cfg
+++ /dev/null
@@ -1,18 +0,0 @@
-Include cl-common.cfg
-
-Style InterfaceOnly
-
-Import com.jogamp.opencl.llb.impl.BuildProgramCallback
-
-ClassJavadoc CLProgramBinding /**
-ClassJavadoc CLProgramBinding * Java bindings to OpenCL programs.
-ClassJavadoc CLProgramBinding * @author Michael Bien, GlueGen, et al.
-ClassJavadoc CLProgramBinding */
-JavaClass CLProgramBinding
-
-IgnoreNot .*CreateProgramWith.*|.*Program.*Info.*|.*RetainProgram.*|.*ReleaseProgram.*|CL_PROGRAM_.*|CL_BUILD_.*
-
-#custom implementations
-CustomJavaCode CLProgramBinding
-CustomJavaCode CLProgramBinding /** 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 CLProgramBinding public int clBuildProgram(long program, int deviceCount, PointerBuffer devices, String options, BuildProgramCallback cb);
diff --git a/make/config/cl-queue-if.cfg b/make/config/cl-queue-if.cfg
deleted file mode 100644
index 171b9332..00000000
--- a/make/config/cl-queue-if.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-Include cl-common.cfg
-
-Style InterfaceOnly
-
-ClassJavadoc CLCommandQueueBinding /**
-ClassJavadoc CLCommandQueueBinding * Java bindings to OpenCL command queues.
-ClassJavadoc CLCommandQueueBinding * @author Michael Bien, GlueGen, et al.
-ClassJavadoc CLCommandQueueBinding */
-JavaClass CLCommandQueueBinding
-
-IgnoreNot .*CreateCommandQueue.*|.*GetCommandQueueInfo.*|.*EnqueueRead.*|.*EnqueueWrite.*|.*EnqueueCopy.*|.*EnqueueMap.*|.*EnqueueUnmap.*|.*EnqueueBarrier.*|.*EnqueueNDRange.*|.*EnqueueTask.*|.*EnqueueMarker.*|.*EnqueueWait.*|.*EnqueueMigrate.*|.*RetainCommandQueue.*|.*ReleaseCommandQueue.*|clFinish|clFlush|CL_QUEUE_.*|CL_COMMAND_.*|CL_PROFILING_COMMAND_.*
-
diff --git a/make/config/cl-sampler-if.cfg b/make/config/cl-sampler-if.cfg
deleted file mode 100644
index 5329b7f5..00000000
--- a/make/config/cl-sampler-if.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-Include cl-common.cfg
-
-Style InterfaceOnly
-
-ClassJavadoc CLSamplerBinding /**
-ClassJavadoc CLSamplerBinding * Java bindings to OpenCL sampler objects.
-ClassJavadoc CLSamplerBinding * @author Michael Bien, GlueGen, et al.
-ClassJavadoc CLSamplerBinding */
-JavaClass CLSamplerBinding
-
-IgnoreNot .*CreateSampler.*|.*GetSamplerInfo.*|.*RetainSampler.*|.*ReleaseSampler.*|CL_SAMPLER_.*|CL_ADDRESS_.*|CL_FILTER_.*
-
diff --git a/src/com/jogamp/opencl/CLEvent.java b/src/com/jogamp/opencl/CLEvent.java
index af22e24a..2406f4ac 100644
--- a/src/com/jogamp/opencl/CLEvent.java
+++ b/src/com/jogamp/opencl/CLEvent.java
@@ -35,6 +35,7 @@ import com.jogamp.common.nio.PointerBuffer;
import java.nio.Buffer;
import static com.jogamp.opencl.llb.CL.*;
+import static com.jogamp.opencl.llb.gl.CLGL.*;
import static com.jogamp.opencl.CLException.*;
/**
diff --git a/src/com/jogamp/opencl/CLException.java b/src/com/jogamp/opencl/CLException.java
index c74b99bc..c8ad3fde 100644
--- a/src/com/jogamp/opencl/CLException.java
+++ b/src/com/jogamp/opencl/CLException.java
@@ -30,11 +30,6 @@ package com.jogamp.opencl;
import com.jogamp.opencl.llb.gl.CLGL;
import com.jogamp.opencl.llb.CL;
-import com.jogamp.opencl.llb.CLDeviceBinding;
-import com.jogamp.opencl.llb.CLImageBinding;
-import com.jogamp.opencl.llb.CLMemObjBinding;
-import com.jogamp.opencl.llb.CLPlatformBinding;
-import com.jogamp.opencl.llb.CLProgramBinding;
/**
* Main Exception type for runtime OpenCL errors and failed function calls (e.g. returning not CL_SUCCESS).
@@ -102,18 +97,18 @@ public class CLException extends RuntimeException {
*/
public static String resolveErrorCode(final int error) {
switch(error) {
- case CLDeviceBinding.CL_DEVICE_NOT_FOUND: return "CL_DEVICE_NOT_FOUND";
- case CLDeviceBinding.CL_DEVICE_NOT_AVAILABLE: return "CL_DEVICE_NOT_AVAILABLE";
+ case CL.CL_DEVICE_NOT_FOUND: return "CL_DEVICE_NOT_FOUND";
+ case CL.CL_DEVICE_NOT_AVAILABLE: return "CL_DEVICE_NOT_AVAILABLE";
case CL.CL_COMPILER_NOT_AVAILABLE: return "CL_COMPILER_NOT_AVAILABLE";
- case CLMemObjBinding.CL_MEM_OBJECT_ALLOCATION_FAILURE: return "CL_MEM_OBJECT_ALLOCATION_FAILURE";
+ case CL.CL_MEM_OBJECT_ALLOCATION_FAILURE: return "CL_MEM_OBJECT_ALLOCATION_FAILURE";
case CL.CL_OUT_OF_RESOURCES: return "CL_OUT_OF_RESOURCES";
case CL.CL_OUT_OF_HOST_MEMORY: return "CL_OUT_OF_HOST_MEMORY";
case CL.CL_PROFILING_INFO_NOT_AVAILABLE: return "CL_PROFILING_INFO_NOT_AVAILABLE";
- case CLMemObjBinding.CL_MEM_COPY_OVERLAP: return "CL_MEM_COPY_OVERLAP";
- case CLImageBinding.CL_IMAGE_FORMAT_MISMATCH: return "CL_IMAGE_FORMAT_MISMATCH";
- case CLImageBinding.CL_IMAGE_FORMAT_NOT_SUPPORTED: return "CL_IMAGE_FORMAT_NOT_SUPPORTED";
- case CLProgramBinding.CL_BUILD_PROGRAM_FAILURE: return "CL_BUILD_PROGRAM_FAILURE";
- case CLMemObjBinding.CL_MAP_FAILURE: return "CL_MAP_FAILURE";
+ case CL.CL_MEM_COPY_OVERLAP: return "CL_MEM_COPY_OVERLAP";
+ case CL.CL_IMAGE_FORMAT_MISMATCH: return "CL_IMAGE_FORMAT_MISMATCH";
+ case CL.CL_IMAGE_FORMAT_NOT_SUPPORTED: return "CL_IMAGE_FORMAT_NOT_SUPPORTED";
+ case CL.CL_BUILD_PROGRAM_FAILURE: return "CL_BUILD_PROGRAM_FAILURE";
+ case CL.CL_MAP_FAILURE: return "CL_MAP_FAILURE";
case CL.CL_INVALID_VALUE: return "CL_INVALID_VALUE";
case CL.CL_INVALID_DEVICE_TYPE: return "CL_INVALID_DEVICE_TYPE";
case CL.CL_INVALID_PLATFORM: return "CL_INVALID_PLATFORM";
@@ -148,7 +143,7 @@ public class CLException extends RuntimeException {
case CL.CL_INVALID_MIP_LEVEL: return "CL_INVALID_MIP_LEVEL";
case CL.CL_INVALID_GLOBAL_WORK_SIZE: return "CL_INVALID_GLOBAL_WORK_SIZE";
case CL.CL_INVALID_PROPERTY: return "CL_INVALID_PROPERTY";
- case CLPlatformBinding.CL_PLATFORM_NOT_FOUND_KHR: return "CL_PLATFORM_NOT_FOUND_KHR";
+ case CL.CL_PLATFORM_NOT_FOUND_KHR: return "CL_PLATFORM_NOT_FOUND_KHR";
case CL.CL_MISALIGNED_SUB_BUFFER_OFFSET: return "CL_MISALIGNED_SUB_BUFFER_OFFSET";
case CL.CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST: return "CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST";
case CLGL.CL_INVALID_GL_OBJECT: return "CL_INVALID_GL_OBJECT";
@@ -159,18 +154,18 @@ public class CLException extends RuntimeException {
private static CLException createSpecificException(final int error, final String message) {
switch(error) {
- case CLDeviceBinding.CL_DEVICE_NOT_FOUND: return new CLDeviceNotFoundException(message);
- case CLDeviceBinding.CL_DEVICE_NOT_AVAILABLE: return new CLDeviceNotAvailableException(message);
+ case CL.CL_DEVICE_NOT_FOUND: return new CLDeviceNotFoundException(message);
+ case CL.CL_DEVICE_NOT_AVAILABLE: return new CLDeviceNotAvailableException(message);
case CL.CL_COMPILER_NOT_AVAILABLE: return new CLCompilerNotAvailableException(message);
- case CLMemObjBinding.CL_MEM_OBJECT_ALLOCATION_FAILURE: return new CLMemObjectAllocationFailureException(message);
+ case CL.CL_MEM_OBJECT_ALLOCATION_FAILURE: return new CLMemObjectAllocationFailureException(message);
case CL.CL_OUT_OF_RESOURCES: return new CLOutOfResourcesException(message);
case CL.CL_OUT_OF_HOST_MEMORY: return new CLOutOfHostMemoryException(message);
case CL.CL_PROFILING_INFO_NOT_AVAILABLE: return new CLProfilingInfoNotAvailableException(message);
- case CLMemObjBinding.CL_MEM_COPY_OVERLAP: return new CLMemCopyOverlapException(message);
- case CLImageBinding.CL_IMAGE_FORMAT_MISMATCH: return new CLImageFormatMismatchException(message);
- case CLImageBinding.CL_IMAGE_FORMAT_NOT_SUPPORTED: return new CLImageFormatNotSupportedException(message);
- case CLProgramBinding.CL_BUILD_PROGRAM_FAILURE: return new CLBuildProgramFailureException(message);
- case CLMemObjBinding.CL_MAP_FAILURE: return new CLMapFailureException(message);
+ case CL.CL_MEM_COPY_OVERLAP: return new CLMemCopyOverlapException(message);
+ case CL.CL_IMAGE_FORMAT_MISMATCH: return new CLImageFormatMismatchException(message);
+ case CL.CL_IMAGE_FORMAT_NOT_SUPPORTED: return new CLImageFormatNotSupportedException(message);
+ case CL.CL_BUILD_PROGRAM_FAILURE: return new CLBuildProgramFailureException(message);
+ case CL.CL_MAP_FAILURE: return new CLMapFailureException(message);
case CL.CL_INVALID_VALUE: return new CLInvalidValueException(message);
case CL.CL_INVALID_DEVICE_TYPE: return new CLInvalidDeviceTypeException(message);
case CL.CL_INVALID_PLATFORM: return new CLInvalidPlatformException(message);
@@ -205,7 +200,7 @@ public class CLException extends RuntimeException {
case CL.CL_INVALID_MIP_LEVEL: return new CLInvalidMipLevelException(message);
case CL.CL_INVALID_GLOBAL_WORK_SIZE: return new CLInvalidGlobalWorkSizeException(message);
case CL.CL_INVALID_PROPERTY: return new CLInvalidPropertyException(message);
- case CLPlatformBinding.CL_PLATFORM_NOT_FOUND_KHR: return new CLPlatformNotFoundKhrException(message);
+ case CL.CL_PLATFORM_NOT_FOUND_KHR: return new CLPlatformNotFoundKhrException(message);
case CL.CL_MISALIGNED_SUB_BUFFER_OFFSET: return new CLMisalignedSubBufferOffsetException(message);
case CL.CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST: return new CLExecStatusErrorForEventsInWaitListException(message);
case CLGL.CL_INVALID_GL_OBJECT: return new CLInvalidGLObjectException(message);
@@ -220,7 +215,7 @@ public class CLException extends RuntimeException {
public final static class CLDeviceNotFoundException extends CLException {
private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_DEVICE_NOT_FOUND;
public CLDeviceNotFoundException(final String message) {
- super(CLDeviceBinding.CL_DEVICE_NOT_FOUND, "CL_DEVICE_NOT_FOUND", message);
+ super(CL.CL_DEVICE_NOT_FOUND, "CL_DEVICE_NOT_FOUND", message);
}
}
@@ -230,7 +225,7 @@ public class CLException extends RuntimeException {
public final static class CLDeviceNotAvailableException extends CLException {
private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_DEVICE_NOT_AVAILABLE;
public CLDeviceNotAvailableException(final String message) {
- super(CLDeviceBinding.CL_DEVICE_NOT_AVAILABLE, "CL_DEVICE_NOT_AVAILABLE", message);
+ super(CL.CL_DEVICE_NOT_AVAILABLE, "CL_DEVICE_NOT_AVAILABLE", message);
}
}
@@ -250,7 +245,7 @@ public class CLException extends RuntimeException {
public final static class CLMemObjectAllocationFailureException extends CLException {
private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_MEM_OBJECT_ALLOCATION_FAILURE;
public CLMemObjectAllocationFailureException(final String message) {
- super(CLMemObjBinding.CL_MEM_OBJECT_ALLOCATION_FAILURE, "CL_MEM_OBJECT_ALLOCATION_FAILURE", message);
+ super(CL.CL_MEM_OBJECT_ALLOCATION_FAILURE, "CL_MEM_OBJECT_ALLOCATION_FAILURE", message);
}
}
@@ -290,7 +285,7 @@ public class CLException extends RuntimeException {
public final static class CLMemCopyOverlapException extends CLException {
private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_MEM_COPY_OVERLAP;
public CLMemCopyOverlapException(final String message) {
- super(CLMemObjBinding.CL_MEM_COPY_OVERLAP, "CL_MEM_COPY_OVERLAP", message);
+ super(CL.CL_MEM_COPY_OVERLAP, "CL_MEM_COPY_OVERLAP", message);
}
}
@@ -300,7 +295,7 @@ public class CLException extends RuntimeException {
public final static class CLImageFormatMismatchException extends CLException {
private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_IMAGE_FORMAT_MISMATCH;
public CLImageFormatMismatchException(final String message) {
- super(CLImageBinding.CL_IMAGE_FORMAT_MISMATCH, "CL_IMAGE_FORMAT_MISMATCH", message);
+ super(CL.CL_IMAGE_FORMAT_MISMATCH, "CL_IMAGE_FORMAT_MISMATCH", message);
}
}
@@ -310,7 +305,7 @@ public class CLException extends RuntimeException {
public final static class CLImageFormatNotSupportedException extends CLException {
private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_IMAGE_FORMAT_NOT_SUPPORTED;
public CLImageFormatNotSupportedException(final String message) {
- super(CLImageBinding.CL_IMAGE_FORMAT_NOT_SUPPORTED, "CL_IMAGE_FORMAT_NOT_SUPPORTED", message);
+ super(CL.CL_IMAGE_FORMAT_NOT_SUPPORTED, "CL_IMAGE_FORMAT_NOT_SUPPORTED", message);
}
}
@@ -320,7 +315,7 @@ public class CLException extends RuntimeException {
public final static class CLBuildProgramFailureException extends CLException {
private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_BUILD_PROGRAM_FAILURE;
public CLBuildProgramFailureException(final String message) {
- super(CLProgramBinding.CL_BUILD_PROGRAM_FAILURE, "CL_BUILD_PROGRAM_FAILURE", message);
+ super(CL.CL_BUILD_PROGRAM_FAILURE, "CL_BUILD_PROGRAM_FAILURE", message);
}
}
@@ -330,7 +325,7 @@ public class CLException extends RuntimeException {
public final static class CLMapFailureException extends CLException {
private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_MAP_FAILURE;
public CLMapFailureException(final String message) {
- super(CLMemObjBinding.CL_MAP_FAILURE, "CL_MAP_FAILURE", message);
+ super(CL.CL_MAP_FAILURE, "CL_MAP_FAILURE", message);
}
}
@@ -737,7 +732,7 @@ public class CLException extends RuntimeException {
public final static class CLPlatformNotFoundKhrException extends CLException {
private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_PLATFORM_NOT_FOUND_KHR;
public CLPlatformNotFoundKhrException(final String message) {
- super(CLPlatformBinding.CL_PLATFORM_NOT_FOUND_KHR, "CL_PLATFORM_NOT_FOUND_KHR", message);
+ super(CL.CL_PLATFORM_NOT_FOUND_KHR, "CL_PLATFORM_NOT_FOUND_KHR", message);
}
}
diff --git a/src/com/jogamp/opencl/CLPlatform.java b/src/com/jogamp/opencl/CLPlatform.java
index dfb7dafa..77da10b4 100644
--- a/src/com/jogamp/opencl/CLPlatform.java
+++ b/src/com/jogamp/opencl/CLPlatform.java
@@ -28,22 +28,11 @@
package com.jogamp.opencl;
-import com.jogamp.opencl.llb.CLPlatformBinding;
-import com.jogamp.opencl.llb.CLProgramBinding;
-import com.jogamp.opencl.llb.CLSamplerBinding;
-import com.jogamp.opencl.llb.CLKernelBinding;
-import com.jogamp.opencl.llb.CLImageBinding;
import com.jogamp.opencl.llb.CL;
import com.jogamp.opencl.impl.CLTLAccessorFactory;
import com.jogamp.common.nio.Buffers;
import com.jogamp.common.JogampRuntimeException;
import com.jogamp.common.nio.PointerBuffer;
-import com.jogamp.opencl.llb.CLBufferBinding;
-import com.jogamp.opencl.llb.CLCommandQueueBinding;
-import com.jogamp.opencl.llb.CLContextBinding;
-import com.jogamp.opencl.llb.CLDeviceBinding;
-import com.jogamp.opencl.llb.CLEventBinding;
-import com.jogamp.opencl.llb.CLMemObjBinding;
import com.jogamp.opencl.spi.CLPlatformInfoAccessor;
import com.jogamp.opencl.util.CLUtil;
import com.jogamp.opencl.llb.impl.CLImpl11;
diff --git a/src/com/jogamp/opencl/gl/CLGLContext.java b/src/com/jogamp/opencl/gl/CLGLContext.java
index befa9158..e1d7d0ce 100644
--- a/src/com/jogamp/opencl/gl/CLGLContext.java
+++ b/src/com/jogamp/opencl/gl/CLGLContext.java
@@ -45,7 +45,6 @@ import com.jogamp.opencl.CLDevice;
import com.jogamp.opencl.CLMemory.Mem;
import com.jogamp.opencl.CLPlatform;
import com.jogamp.opencl.llb.CL;
-import com.jogamp.opencl.llb.CLContextBinding;
import com.jogamp.opencl.llb.gl.CLGL;
/**
@@ -167,7 +166,7 @@ public final class CLGLContext extends CLContext {
final long displayHandle = ctxImpl.getDrawableImpl().getNativeSurface().getDisplayHandle();
properties.put(CLGL.CL_GL_CONTEXT_KHR).put(glID[0])
.put(CL.CL_GLX_DISPLAY_KHR).put(displayHandle)
- .put(CLContextBinding.CL_CONTEXT_PLATFORM).put(platform.ID);
+ .put(CL.CL_CONTEXT_PLATFORM).put(platform.ID);
}else if(glContext instanceof WindowsWGLContext) {
// spec: "When the WGL binding API is supported, the attribute
// CL_GL_CONTEXT_KHR should be set to an HGLRC handle to an OpenGL
@@ -177,7 +176,7 @@ public final class CLGLContext extends CLContext {
final long surfaceHandle = ctxImpl.getDrawableImpl().getNativeSurface().getSurfaceHandle();
properties.put(CLGL.CL_GL_CONTEXT_KHR).put(glID[0])
.put(CL.CL_WGL_HDC_KHR).put(surfaceHandle)
- .put(CLContextBinding.CL_CONTEXT_PLATFORM).put(platform.ID);
+ .put(CL.CL_CONTEXT_PLATFORM).put(platform.ID);
}else if(glContext instanceof MacOSXCGLContext) {
// spec: "When the CGL binding API is supported, the attribute
// CL_CGL_SHAREGROUP_KHR should be set to a CGLShareGroup handle to
@@ -193,7 +192,7 @@ public final class CLGLContext extends CLContext {
final long group = CGL.CGLGetShareGroup(cgl);
properties = PointerBuffer.allocateDirect(5);
properties.put(CLGL.CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE).put(group)
- .put(CLContextBinding.CL_CONTEXT_PLATFORM).put(platform.ID);
+ .put(CL.CL_CONTEXT_PLATFORM).put(platform.ID);
}else if(glContext instanceof EGLContext) {
// TODO test EGL
// spec: "When the EGL binding API is supported, the attribute
@@ -205,7 +204,7 @@ public final class CLGLContext extends CLContext {
final long displayHandle = ctxImpl.getDrawableImpl().getNativeSurface().getDisplayHandle();
properties.put(CLGL.CL_GL_CONTEXT_KHR).put(glID[0])
.put(CL.CL_EGL_DISPLAY_KHR).put(displayHandle)
- .put(CLContextBinding.CL_CONTEXT_PLATFORM).put(platform.ID);
+ .put(CL.CL_CONTEXT_PLATFORM).put(platform.ID);
}else{
throw new RuntimeException("unsupported GLContext: "+glContext);
}
diff --git a/src/com/jogamp/opencl/gl/CLGLImage2d.java b/src/com/jogamp/opencl/gl/CLGLImage2d.java
index 93c0bc3a..67616542 100644
--- a/src/com/jogamp/opencl/gl/CLGLImage2d.java
+++ b/src/com/jogamp/opencl/gl/CLGLImage2d.java
@@ -29,7 +29,6 @@
package com.jogamp.opencl.gl;
import com.jogamp.opencl.llb.CL;
-import com.jogamp.opencl.llb.CLImageBinding;
import com.jogamp.opencl.llb.gl.CLGL;
import com.jogamp.opencl.CLContext;
import com.jogamp.opencl.CLException;
@@ -75,10 +74,10 @@ public class CLGLImage2d<B extends Buffer> extends CLImage2d<B> implements CLGLO
final CLImageInfoAccessor accessor = new CLImageInfoAccessor(getCL(context), id);
final CLImageFormat format = createUninitializedImageFormat();
- accessor.getInfo(CLImageBinding.CL_IMAGE_FORMAT, CLImageFormatImpl.size(), format.getFormatImpl().getBuffer(), null);
+ accessor.getInfo(CL.CL_IMAGE_FORMAT, CLImageFormatImpl.size(), format.getFormatImpl().getBuffer(), null);
- final int width = (int)accessor.getLong(CLImageBinding.CL_IMAGE_WIDTH);
- final int height = (int)accessor.getLong(CLImageBinding.CL_IMAGE_HEIGHT);
+ final int width = (int)accessor.getLong(CL.CL_IMAGE_WIDTH);
+ final int height = (int)accessor.getLong(CL.CL_IMAGE_HEIGHT);
return new CLGLImage2d<B>(context, directBuffer, format, accessor, width, height, id, glObject, flags);
}
diff --git a/src/com/jogamp/opencl/gl/CLGLTexture2d.java b/src/com/jogamp/opencl/gl/CLGLTexture2d.java
index 30b8164e..9b68e524 100644
--- a/src/com/jogamp/opencl/gl/CLGLTexture2d.java
+++ b/src/com/jogamp/opencl/gl/CLGLTexture2d.java
@@ -29,7 +29,6 @@
package com.jogamp.opencl.gl;
import com.jogamp.opencl.llb.CL;
-import com.jogamp.opencl.llb.CLImageBinding;
import com.jogamp.opencl.CLContext;
import com.jogamp.opencl.CLException;
import com.jogamp.opencl.CLImageFormat;
@@ -68,10 +67,10 @@ public class CLGLTexture2d<B extends Buffer> extends CLGLImage2d<B> implements C
final CLImageInfoAccessor accessor = new CLImageInfoAccessor(cl, id);
final CLImageFormat format = createUninitializedImageFormat();
- accessor.getInfo(CLImageBinding.CL_IMAGE_FORMAT, CLImageFormatImpl.size(), format.getFormatImpl().getBuffer(), null);
+ accessor.getInfo(CL.CL_IMAGE_FORMAT, CLImageFormatImpl.size(), format.getFormatImpl().getBuffer(), null);
- final int width = (int)accessor.getLong(CLImageBinding.CL_IMAGE_WIDTH);
- final int height = (int)accessor.getLong(CLImageBinding.CL_IMAGE_HEIGHT);
+ final int width = (int)accessor.getLong(CL.CL_IMAGE_WIDTH);
+ final int height = (int)accessor.getLong(CL.CL_IMAGE_HEIGHT);
return new CLGLTexture2d<B>(context, directBuffer, format, accessor, target, mipLevel, width, height, id, texture, flags);
diff --git a/src/com/jogamp/opencl/gl/CLGLTexture3d.java b/src/com/jogamp/opencl/gl/CLGLTexture3d.java
index 2b389252..24893dd1 100644
--- a/src/com/jogamp/opencl/gl/CLGLTexture3d.java
+++ b/src/com/jogamp/opencl/gl/CLGLTexture3d.java
@@ -30,7 +30,6 @@ package com.jogamp.opencl.gl;
import com.jogamp.opencl.llb.gl.CLGL;
import com.jogamp.opencl.llb.CL;
-import com.jogamp.opencl.llb.CLImageBinding;
import com.jogamp.opencl.CLContext;
import com.jogamp.opencl.CLException;
import com.jogamp.opencl.CLImage3d;
@@ -77,11 +76,11 @@ public class CLGLTexture3d<B extends Buffer> extends CLImage3d<B> implements CLG
final CLImageInfoAccessor accessor = new CLImageInfoAccessor(cl, id);
final CLImageFormat format = createUninitializedImageFormat();
- accessor.getInfo(CLImageBinding.CL_IMAGE_FORMAT, CLImageFormatImpl.size(), format.getFormatImpl().getBuffer(), null);
+ accessor.getInfo(CL.CL_IMAGE_FORMAT, CLImageFormatImpl.size(), format.getFormatImpl().getBuffer(), null);
- final int width = (int)accessor.getLong(CLImageBinding.CL_IMAGE_WIDTH);
- final int height = (int)accessor.getLong(CLImageBinding.CL_IMAGE_HEIGHT);
- final int depth = (int)accessor.getLong(CLImageBinding.CL_IMAGE_DEPTH);
+ final int width = (int)accessor.getLong(CL.CL_IMAGE_WIDTH);
+ final int height = (int)accessor.getLong(CL.CL_IMAGE_HEIGHT);
+ final int depth = (int)accessor.getLong(CL.CL_IMAGE_DEPTH);
return new CLGLTexture3d<B>(context, directBuffer, format, accessor, target, mipLevel, width, height, depth, id, texture, flags);
}
diff --git a/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java b/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java
index 8422c4ad..7195d592 100644
--- a/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java
+++ b/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java
@@ -35,7 +35,6 @@ package com.jogamp.opencl.impl;
import java.nio.IntBuffer;
import com.jogamp.common.nio.PointerBuffer;
import com.jogamp.opencl.llb.CL;
-import com.jogamp.opencl.llb.CLDeviceBinding;
import com.jogamp.opencl.spi.CLAccessorFactory;
import com.jogamp.opencl.spi.CLInfoAccessor;
import com.jogamp.opencl.spi.CLPlatformInfoAccessor;
@@ -50,7 +49,7 @@ import static com.jogamp.opencl.CLException.*;
public class CLTLAccessorFactory implements CLAccessorFactory {
@Override
- public CLInfoAccessor createDeviceInfoAccessor(final CLDeviceBinding cl, final long id) {
+ public CLInfoAccessor createDeviceInfoAccessor(final CL cl, final long id) {
return new CLDeviceInfoAccessor(cl, id);
}
@@ -61,10 +60,10 @@ public class CLTLAccessorFactory implements CLAccessorFactory {
private final static class CLDeviceInfoAccessor extends CLTLInfoAccessor {
- private final CLDeviceBinding cl;
+ private final CL cl;
private final long ID;
- private CLDeviceInfoAccessor(final CLDeviceBinding cl, final long id) {
+ private CLDeviceInfoAccessor(final CL cl, final long id) {
this.cl = cl;
this.ID = id;
}
@@ -99,7 +98,7 @@ public class CLTLAccessorFactory implements CLAccessorFactory {
final int count = buffer.get(0);
// return an empty buffer rather than throwing an exception
- if(ret == CLDeviceBinding.CL_DEVICE_NOT_FOUND || count == 0) {
+ if(ret == CL.CL_DEVICE_NOT_FOUND || count == 0) {
return new long[0];
}else{
checkForError(ret, "error while enumerating devices");
diff --git a/src/com/jogamp/opencl/spi/CLAccessorFactory.java b/src/com/jogamp/opencl/spi/CLAccessorFactory.java
index 4bafe933..752891b4 100644
--- a/src/com/jogamp/opencl/spi/CLAccessorFactory.java
+++ b/src/com/jogamp/opencl/spi/CLAccessorFactory.java
@@ -4,7 +4,6 @@
package com.jogamp.opencl.spi;
import com.jogamp.opencl.llb.CL;
-import com.jogamp.opencl.llb.CLDeviceBinding;
/**
* Implementations of this interface are factories responsible for creating CLAccessors.
@@ -12,7 +11,7 @@ import com.jogamp.opencl.llb.CLDeviceBinding;
*/
public interface CLAccessorFactory {
- CLInfoAccessor createDeviceInfoAccessor(CLDeviceBinding cl, long id);
+ CLInfoAccessor createDeviceInfoAccessor(CL cl, long id);
CLPlatformInfoAccessor createPlatformInfoAccessor(CL cl, long id);
diff --git a/test/com/jogamp/opencl/CLCommandQueueTest.java b/test/com/jogamp/opencl/CLCommandQueueTest.java
index c5c3f94c..ef5622a2 100644
--- a/test/com/jogamp/opencl/CLCommandQueueTest.java
+++ b/test/com/jogamp/opencl/CLCommandQueueTest.java
@@ -43,7 +43,6 @@ 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 com.jogamp.opencl.llb.CLCommandQueueBinding;
import java.io.IOException;
import java.nio.ByteBuffer;
@@ -74,7 +73,7 @@ public class CLCommandQueueTest extends UITestCase {
public void enumsTest() {
//CLCommandQueueEnums
- final EnumSet<Mode> queueMode = Mode.valuesOf(CLCommandQueueBinding.CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CLCommandQueueBinding.CL_QUEUE_PROFILING_ENABLE);
+ final EnumSet<Mode> queueMode = Mode.valuesOf(CL.CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL.CL_QUEUE_PROFILING_ENABLE);
assertTrue(queueMode.contains(OUT_OF_ORDER_MODE));
assertTrue(queueMode.contains(PROFILING_MODE));
diff --git a/test/com/jogamp/opencl/HighLevelBindingTest.java b/test/com/jogamp/opencl/HighLevelBindingTest.java
index aee6321c..1c08d806 100644
--- a/test/com/jogamp/opencl/HighLevelBindingTest.java
+++ b/test/com/jogamp/opencl/HighLevelBindingTest.java
@@ -40,7 +40,6 @@ 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 com.jogamp.opencl.llb.CLDeviceBinding;
import com.jogamp.opencl.test.util.MiscUtils;
import com.jogamp.opencl.test.util.UITestCase;
@@ -83,7 +82,7 @@ public class HighLevelBindingTest extends UITestCase {
public void enumsTest() {
// enum tests
- final EnumSet<FPConfig> singleFPConfig = FPConfig.valuesOf(CLDeviceBinding.CL_FP_DENORM | CLDeviceBinding.CL_FP_ROUND_TO_INF);
+ final EnumSet<FPConfig> singleFPConfig = FPConfig.valuesOf(CL.CL_FP_DENORM | CL.CL_FP_ROUND_TO_INF);
assertEquals(0, FPConfig.valuesOf(0).size());
assertTrue(singleFPConfig.contains(FPConfig.DENORM));
assertTrue(singleFPConfig.contains(FPConfig.ROUND_TO_INF));
diff --git a/test/com/jogamp/opencl/LowLevelBindingTest.java b/test/com/jogamp/opencl/LowLevelBindingTest.java
index 39482aa2..6b871d81 100644
--- a/test/com/jogamp/opencl/LowLevelBindingTest.java
+++ b/test/com/jogamp/opencl/LowLevelBindingTest.java
@@ -35,11 +35,6 @@ import com.jogamp.opencl.llb.impl.BuildProgramCallback;
import com.jogamp.opencl.llb.impl.CLImpl12;
import com.jogamp.opencl.llb.impl.CLImpl20;
import com.jogamp.opencl.llb.CL;
-import com.jogamp.opencl.llb.CLContextBinding;
-import com.jogamp.opencl.llb.CLDeviceBinding;
-import com.jogamp.opencl.llb.CLMemObjBinding;
-import com.jogamp.opencl.llb.CLPlatformBinding;
-import com.jogamp.opencl.llb.CLProgramBinding;
import com.jogamp.opencl.test.util.MiscUtils;
import com.jogamp.opencl.test.util.UITestCase;
@@ -137,34 +132,34 @@ public class LowLevelBindingTest extends UITestCase {
final long platform = platformId.get(i);
out.println("platform id: "+platform);
- ret = cl.clGetPlatformInfo(platform, CLPlatformBinding.CL_PLATFORM_PROFILE, bb.capacity(), bb, longBuffer);
+ ret = cl.clGetPlatformInfo(platform, CL.CL_PLATFORM_PROFILE, bb.capacity(), bb, longBuffer);
checkForError(ret);
out.println(" profile: " + clString2JavaString(bb, (int)longBuffer.get(0)));
- ret = cl.clGetPlatformInfo(platform, CLPlatformBinding.CL_PLATFORM_VERSION, bb.capacity(), bb, longBuffer);
+ ret = cl.clGetPlatformInfo(platform, CL.CL_PLATFORM_VERSION, bb.capacity(), bb, longBuffer);
checkForError(ret);
out.println(" version: " + clString2JavaString(bb, (int)longBuffer.get(0)));
- ret = cl.clGetPlatformInfo(platform, CLPlatformBinding.CL_PLATFORM_NAME, bb.capacity(), bb, longBuffer);
+ ret = cl.clGetPlatformInfo(platform, CL.CL_PLATFORM_NAME, bb.capacity(), bb, longBuffer);
checkForError(ret);
out.println(" name: " + clString2JavaString(bb, (int)longBuffer.get(0)));
- ret = cl.clGetPlatformInfo(platform, CLPlatformBinding.CL_PLATFORM_VENDOR, bb.capacity(), bb, longBuffer);
+ ret = cl.clGetPlatformInfo(platform, CL.CL_PLATFORM_VENDOR, bb.capacity(), bb, longBuffer);
checkForError(ret);
out.println(" vendor: " + clString2JavaString(bb, (int)longBuffer.get(0)));
//find all devices
- ret = cl.clGetDeviceIDs(platform, CLDeviceBinding.CL_DEVICE_TYPE_ALL, 0, null, intBuffer);
+ ret = cl.clGetDeviceIDs(platform, CL.CL_DEVICE_TYPE_ALL, 0, null, intBuffer);
checkForError(ret);
out.println("#devices: "+intBuffer.get(0));
final PointerBuffer devices = PointerBuffer.allocateDirect(intBuffer.get(0));
- ret = cl.clGetDeviceIDs(platform, CLDeviceBinding.CL_DEVICE_TYPE_ALL, devices.capacity(), devices, null);
+ ret = cl.clGetDeviceIDs(platform, CL.CL_DEVICE_TYPE_ALL, devices.capacity(), devices, null);
//print device info
for (int j = 0; j < devices.capacity(); j++) {
final long device = devices.get(j);
- ret = cl.clGetDeviceInfo(device, CLDeviceBinding.CL_DEVICE_NAME, bb.capacity(), bb, longBuffer);
+ ret = cl.clGetDeviceInfo(device, CL.CL_DEVICE_NAME, bb.capacity(), bb, longBuffer);
checkForError(ret);
out.println(" device: " + clString2JavaString(bb, (int)longBuffer.get(0)));
@@ -177,7 +172,7 @@ public class LowLevelBindingTest extends UITestCase {
else
out.println(" CL impl: 1.1");
- ret = deviceInterface.clGetDeviceInfo(device, CLDeviceBinding.CL_DEVICE_TYPE, bb.capacity(), bb, longBuffer);
+ ret = deviceInterface.clGetDeviceInfo(device, CL.CL_DEVICE_TYPE, bb.capacity(), bb, longBuffer);
checkForError(ret);
out.println(" type: " + CLDevice.Type.valueOf(bb.get()));
bb.rewind();
@@ -207,19 +202,19 @@ public class LowLevelBindingTest extends UITestCase {
final long platform = pb.get(0);
//find all devices
- ret = cl.clGetDeviceIDs(platform, CLDeviceBinding.CL_DEVICE_TYPE_ALL, 0, null, intBuffer);
+ ret = cl.clGetDeviceIDs(platform, CL.CL_DEVICE_TYPE_ALL, 0, null, intBuffer);
checkForError(ret);
out.println("#devices: "+intBuffer.get(0));
final PointerBuffer devices = PointerBuffer.allocateDirect(intBuffer.get(0));
- ret = cl.clGetDeviceIDs(platform, CLDeviceBinding.CL_DEVICE_TYPE_ALL, devices.capacity(), devices, null);
+ ret = cl.clGetDeviceIDs(platform, CL.CL_DEVICE_TYPE_ALL, devices.capacity(), devices, null);
final long context = cl.clCreateContext(null, devices, null, intBuffer);
checkError("on clCreateContext", intBuffer.get());
//get number of devices
final PointerBuffer longBuffer = PointerBuffer.allocateDirect(1);
- ret = cl.clGetContextInfo(context, CLContextBinding.CL_CONTEXT_DEVICES, 0, null, longBuffer);
+ ret = cl.clGetContextInfo(context, CL.CL_CONTEXT_DEVICES, 0, null, longBuffer);
checkError("on clGetContextInfo", ret);
final long contextDevices = longBuffer.get(0)/(is32Bit()?4:8);
@@ -252,15 +247,15 @@ public class LowLevelBindingTest extends UITestCase {
checkForError(ret);
final long platform = pb.get(0);
- final PointerBuffer properties = PointerBuffer.allocateDirect(3).put(CLContextBinding.CL_CONTEXT_PLATFORM)
+ final PointerBuffer properties = PointerBuffer.allocateDirect(3).put(CL.CL_CONTEXT_PLATFORM)
.put(platform).put(0) // 0 terminated array
.rewind();
- final long context = cl.clCreateContextFromType(properties, CLDeviceBinding.CL_DEVICE_TYPE_ALL, null, null);
+ final long context = cl.clCreateContextFromType(properties, CL.CL_DEVICE_TYPE_ALL, null, null);
out.println("context handle: "+context);
checkError("on clCreateContextFromType", ret);
final PointerBuffer longBuffer = PointerBuffer.allocateDirect(1);
- ret = cl.clGetContextInfo(context, CLContextBinding.CL_CONTEXT_DEVICES, 0, null, longBuffer);
+ ret = cl.clGetContextInfo(context, CL.CL_CONTEXT_DEVICES, 0, null, longBuffer);
checkError("on clGetContextInfo", ret);
final int deviceCount = (int) (longBuffer.get(0) / (is32Bit() ? 4 : 8));
@@ -270,7 +265,7 @@ public class LowLevelBindingTest extends UITestCase {
// without even dumping a stack when using AMD drivers. Presumably the drivers would write past the end
// of the block and mess up GC info somehow.
final ByteBuffer bb = newDirectByteBuffer(32768);
- ret = cl.clGetContextInfo(context, CLContextBinding.CL_CONTEXT_DEVICES, bb.capacity(), bb, null);
+ ret = cl.clGetContextInfo(context, CL.CL_CONTEXT_DEVICES, bb.capacity(), bb, null);
checkError("on clGetContextInfo", ret);
for (int i = 0; i < deviceCount; i++) {
@@ -284,7 +279,7 @@ public class LowLevelBindingTest extends UITestCase {
final long device = is32Bit()?bb.getInt(offset):bb.getLong(offset);
bb.rewind();
- ret = cl.clGetDeviceInfo(device, CLDeviceBinding.CL_DEVICE_MAX_WORK_GROUP_SIZE, bb.capacity(), bb, null);
+ ret = cl.clGetDeviceInfo(device, CL.CL_DEVICE_MAX_WORK_GROUP_SIZE, bb.capacity(), bb, null);
checkError("on clGetDeviceInfo", ret);
final int maxWGS = bb.getInt();
out.println("max WGS: " + maxWGS);
@@ -320,11 +315,11 @@ public class LowLevelBindingTest extends UITestCase {
}
// Allocate the OpenCL buffer memory objects for source and result on the device GMEM
- final long devSrcA = cl.clCreateBuffer(context, CLMemObjBinding.CL_MEM_READ_ONLY, srcA.capacity(), null, intBuffer);
+ final long devSrcA = cl.clCreateBuffer(context, CL.CL_MEM_READ_ONLY, srcA.capacity(), null, intBuffer);
checkError("on clCreateBuffer", intBuffer.get(0));
- final long devSrcB = cl.clCreateBuffer(context, CLMemObjBinding.CL_MEM_READ_ONLY, srcB.capacity(), null, intBuffer);
+ final long devSrcB = cl.clCreateBuffer(context, CL.CL_MEM_READ_ONLY, srcB.capacity(), null, intBuffer);
checkError("on clCreateBuffer", intBuffer.get(0));
- final long devDst = cl.clCreateBuffer(context, CLMemObjBinding.CL_MEM_WRITE_ONLY, dest.capacity(), null, intBuffer);
+ final long devDst = cl.clCreateBuffer(context, CL.CL_MEM_WRITE_ONLY, dest.capacity(), null, intBuffer);
checkError("on clCreateBuffer", intBuffer.get(0));
@@ -360,35 +355,35 @@ public class LowLevelBindingTest extends UITestCase {
// Read program infos
bb.rewind();
- ret = cl.clGetProgramInfo(program, CLProgramBinding.CL_PROGRAM_NUM_DEVICES, bb.capacity(), bb, null);
+ ret = cl.clGetProgramInfo(program, CL.CL_PROGRAM_NUM_DEVICES, bb.capacity(), bb, null);
checkError("on clGetProgramInfo1", ret);
out.println("program associated with "+bb.getInt(0)+" device(s)");
- ret = cl.clGetProgramInfo(program, CLProgramBinding.CL_PROGRAM_SOURCE, 0, null, longBuffer);
+ ret = cl.clGetProgramInfo(program, CL.CL_PROGRAM_SOURCE, 0, null, longBuffer);
checkError("on clGetProgramInfo CL_PROGRAM_SOURCE", ret);
out.println("program source length (cl): "+longBuffer.get(0));
out.println("program source length (java): "+programSource.length());
bb.rewind();
- ret = cl.clGetProgramInfo(program, CLProgramBinding.CL_PROGRAM_SOURCE, bb.capacity(), bb, null);
+ ret = cl.clGetProgramInfo(program, CL.CL_PROGRAM_SOURCE, bb.capacity(), bb, null);
checkError("on clGetProgramInfo CL_PROGRAM_SOURCE", ret);
out.println("program source:\n" + clString2JavaString(bb, (int)longBuffer.get(0)));
// Check program status
bb.rewind();
- ret = cl.clGetProgramBuildInfo(program, device, CLProgramBinding.CL_PROGRAM_BUILD_STATUS, bb.capacity(), bb, null);
+ ret = cl.clGetProgramBuildInfo(program, device, CL.CL_PROGRAM_BUILD_STATUS, bb.capacity(), bb, null);
checkError("on clGetProgramBuildInfo1", ret);
out.println("program build status: " + CLProgram.Status.valueOf(bb.getInt(0)));
- assertEquals("build status", CLProgramBinding.CL_BUILD_SUCCESS, bb.getInt(0));
+ assertEquals("build status", CL.CL_BUILD_SUCCESS, bb.getInt(0));
// Read build log
- ret = cl.clGetProgramBuildInfo(program, device, CLProgramBinding.CL_PROGRAM_BUILD_LOG, 0, null, longBuffer);
+ ret = cl.clGetProgramBuildInfo(program, device, CL.CL_PROGRAM_BUILD_LOG, 0, null, longBuffer);
checkError("on clGetProgramBuildInfo2", ret);
out.println("program log length: " + longBuffer.get(0));
bb.rewind();
- ret = cl.clGetProgramBuildInfo(program, device, CLProgramBinding.CL_PROGRAM_BUILD_LOG, bb.capacity(), bb, null);
+ ret = cl.clGetProgramBuildInfo(program, device, CL.CL_PROGRAM_BUILD_LOG, bb.capacity(), bb, null);
checkError("on clGetProgramBuildInfo3", ret);
out.println("log:\n" + clString2JavaString(bb, (int)longBuffer.get(0)));