[clinfo] 34/148: Define vendor extensions
Andreas Beckmann
anbe at moszumanska.debian.org
Mon Nov 17 14:09:42 UTC 2014
This is an automated email from the git hooks/post-receive script.
anbe pushed a commit to branch clinfo
in repository clinfo.
commit b89c319e4377c4e43e02efb855a0f1df9a3316b2
Author: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
Date: Tue Jun 11 19:47:35 2013 +0200
Define vendor extensions
They might be not defined in the official headers.
---
src/clinfo.c | 7 +------
src/ext.h | 34 ++++++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 6 deletions(-)
diff --git a/src/clinfo.c b/src/clinfo.c
index 14128b1..8ddcc1b 100644
--- a/src/clinfo.c
+++ b/src/clinfo.c
@@ -2,15 +2,10 @@
* on all available OpenCL platforms present in the system
*/
-#ifdef __APPLE__
-#include <OpenCL/cl_ext.h>
-#else
-#include <CL/cl_ext.h>
-#endif
-
#include <time.h>
#include <string.h>
+#include "ext.h"
#include "error.h"
#include "memory.h"
#include "strbuf.h"
diff --git a/src/ext.h b/src/ext.h
new file mode 100644
index 0000000..81179e0
--- /dev/null
+++ b/src/ext.h
@@ -0,0 +1,34 @@
+/* Include OpenCL headers and extensions, and define vendor-specific OpenCL
+ * extensions, since they may not be defined in the official headers.
+ */
+
+#ifdef __APPLE__
+#include <OpenCL/cl_ext.h>
+#else
+#include <CL/cl_ext.h>
+#endif
+
+/*********************************
+* cl_amd_device_attribute_query *
+*********************************/
+#define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036
+#define CL_DEVICE_TOPOLOGY_AMD 0x4037
+#define CL_DEVICE_BOARD_NAME_AMD 0x4038
+#define CL_DEVICE_GLOBAL_FREE_MEMORY_AMD 0x4039
+#define CL_DEVICE_SIMD_PER_COMPUTE_UNIT_AMD 0x4040
+#define CL_DEVICE_SIMD_WIDTH_AMD 0x4041
+#define CL_DEVICE_SIMD_INSTRUCTION_WIDTH_AMD 0x4042
+#define CL_DEVICE_WAVEFRONT_WIDTH_AMD 0x4043
+#define CL_DEVICE_GLOBAL_MEM_CHANNELS_AMD 0x4044
+#define CL_DEVICE_GLOBAL_MEM_CHANNEL_BANKS_AMD 0x4045
+#define CL_DEVICE_GLOBAL_MEM_CHANNEL_BANK_WIDTH_AMD 0x4046
+#define CL_DEVICE_LOCAL_MEM_SIZE_PER_COMPUTE_UNIT_AMD 0x4047
+#define CL_DEVICE_LOCAL_MEM_BANKS_AMD 0x4048
+
+typedef union
+{
+ struct { cl_uint type; cl_uint data[5]; } raw;
+ struct { cl_uint type; cl_char unused[17]; cl_char bus; cl_char device; cl_char function; } pcie;
+} cl_device_topology_amd;
+
+#define CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD 1
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/clinfo.git
More information about the Pkg-opencl-commits
mailing list