[clinfo] 50/148: Support cl_altera_device_temperature extension

Andreas Beckmann anbe at moszumanska.debian.org
Mon Nov 17 14:09:44 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 2df301b1a50cf3496c00c322082016036215fe26
Author: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
Date:   Fri Jun 20 11:09:32 2014 +0200

    Support cl_altera_device_temperature extension
---
 man/clinfo.1 | 6 ++++--
 src/clinfo.c | 4 ++++
 src/ext.h    | 3 +++
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/man/clinfo.1 b/man/clinfo.1
index 89239f3..596fd37 100644
--- a/man/clinfo.1
+++ b/man/clinfo.1
@@ -34,10 +34,12 @@ for the atomic counter extension;
 .IP cl_amd_device_attribute_query
 for AMD-specific device attributes;
 .IP cl_nv_device_attribute_query
-for NVIDIA-specific device attributes.
+for NVIDIA-specific device attributes;
 .IP cl_intel_exec_by_local_thread
 for the Intel extension allowing CPU devices to run kernels as part of
-the current host thread.
+the current host thread;
+.IP cl_altera_device_temperature
+for the Altera extension to query the core temperature of the device.
 
 .SH NOTES
 Some information is duplicated when available from multiple sources.
diff --git a/src/clinfo.c b/src/clinfo.c
index f7d278c..614afc1 100644
--- a/src/clinfo.c
+++ b/src/clinfo.c
@@ -212,6 +212,7 @@ printDeviceInfo(cl_uint d)
 	char has_atomic_counters[26] = {0};
 	char has_image2d_buffer[27] = {0};
 	char has_intel_local_thread[30] = {0};
+	char has_altera_dev_temp[29] = {0};
 
 	// device supports OpenCL 1.2
 	cl_bool is_12 = CL_FALSE;
@@ -305,6 +306,7 @@ printDeviceInfo(cl_uint d)
 			CHECK_EXT(atomic_counters, cl_ext_atomic_counters_32);
 		CHECK_EXT(image2d_buffer, cl_khr_image2d_from_buffer);
 		CHECK_EXT(intel_local_thread, cl_intel_exec_by_local_thread);
+		CHECK_EXT(altera_dev_temp, cl_altera_device_temperature);
 	}
 
 
@@ -335,6 +337,8 @@ printDeviceInfo(cl_uint d)
 			"NVIDIA Compute Capability",
 			uintval, uintval2);
 	}
+	if (*has_altera_dev_temp)
+		INT_PARAM(CORE_TEMPERATURE_ALTERA, "Core temperature (Altera)", " C");
 
 	/* device fission, two different ways: core in 1.2, extension previously
 	 * platforms that suppot both might expose different properties (e.g., partition
diff --git a/src/ext.h b/src/ext.h
index 9d7e620..a145c78 100644
--- a/src/ext.h
+++ b/src/ext.h
@@ -39,3 +39,6 @@ typedef union
 
 /* cl_intel_device_partition_by_names */
 #define CL_DEVICE_PARTITION_BY_NAMES_INTEL          0x4052
+
+/* cl_altera_device_temperature */
+#define CL_DEVICE_CORE_TEMPERATURE_ALTERA           0x40F3

-- 
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