summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-02-21 00:37:34 +0100
committerMichael Bien <[email protected]>2010-02-21 00:37:34 +0100
commitb014104bc4d2c7b05767bf5364b8b972474850d1 (patch)
tree8f5b7a4a99c7eb4ed6f61d1f50753503dc64b863
parent47ce642729bbc1dc5cee7032d3b3d84cb9b82eca (diff)
added custom cl_vendor_ext.h with a set of NV vendor extensions which are not yet in the official headers.
updated CLException with CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR cause.
-rw-r--r--build.xml1
-rw-r--r--resources/includes/CL_orig/cl_vendor_ext.h9
-rw-r--r--resources/opencl.h1
-rw-r--r--src/com/mbien/opencl/CLException.java3
4 files changed, 14 insertions, 0 deletions
diff --git a/build.xml b/build.xml
index 4d7f0cf7..924c2e58 100644
--- a/build.xml
+++ b/build.xml
@@ -218,6 +218,7 @@
<!--nothing to uncomment in this headers-->
<copy file="${headers.orig}/cl_platform.h" toDir="${headers.dest}" overwrite="true"/>
<copy file="${headers.orig}/cl_ext.h" toDir="${headers.dest}" overwrite="true"/>
+ <copy file="${headers.orig}/cl_vendor_ext.h" toDir="${headers.dest}" overwrite="true"/>
</target>
diff --git a/resources/includes/CL_orig/cl_vendor_ext.h b/resources/includes/CL_orig/cl_vendor_ext.h
new file mode 100644
index 00000000..c7e6d392
--- /dev/null
+++ b/resources/includes/CL_orig/cl_vendor_ext.h
@@ -0,0 +1,9 @@
+/* NVIDIA */
+#define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000
+#define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 0x4001
+#define CL_DEVICE_REGISTERS_PER_BLOCK_NV 0x4002
+#define CL_DEVICE_WARP_SIZE_NV 0x4003
+#define CL_DEVICE_GPU_OVERLAP_NV 0x4004
+#define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 0x4005
+#define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006
+
diff --git a/resources/opencl.h b/resources/opencl.h
index bbb14e38..4e0cced5 100644
--- a/resources/opencl.h
+++ b/resources/opencl.h
@@ -8,6 +8,7 @@
#include <CL/cl_platform.h>
#include <CL/cl.h>
#include <CL/cl_ext.h>
+#include <CL/cl_vendor_ext.h>
//#include <GL/gl.h>
#include <gltypes.h>
diff --git a/src/com/mbien/opencl/CLException.java b/src/com/mbien/opencl/CLException.java
index 922da4a5..81e96789 100644
--- a/src/com/mbien/opencl/CLException.java
+++ b/src/com/mbien/opencl/CLException.java
@@ -178,6 +178,9 @@ public class CLException extends RuntimeException {
case CL_INVALID_GLOBAL_WORK_SIZE:
return "CL_INVALID_GLOBAL_WORK_SIZE";
+ case CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR:
+ return "CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR";
+
case CL_PLATFORM_NOT_FOUND_KHR:
return "CL_PLATFORM_NOT_FOUND_KHR";