[clinfo] 28/36: Prefix OCL ICD loader properties in raw mode too

Andreas Beckmann anbe at moszumanska.debian.org
Wed Feb 17 18:32:38 UTC 2016


This is an automated email from the git hooks/post-receive script.

anbe pushed a commit to branch master
in repository clinfo.

commit cfbbd8e205ed9e7392141575c788219cc852d75f
Author: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
Date:   Tue Jan 12 10:35:21 2016 +0100

    Prefix OCL ICD loader properties in raw mode too
    
    When in raw mode, explicitly redefine the line prefix before showing
    the OCL ICD loader properties. (Without this, we were actually
    prefixing those lines with the same prefix as the last displayed
    platform/device.
---
 src/clinfo.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/clinfo.c b/src/clinfo.c
index 9ef6cc0..48af922 100644
--- a/src/clinfo.c
+++ b/src/clinfo.c
@@ -2484,6 +2484,8 @@ struct icdl_info_traits {
 	const char *pname; // "ICD loader *"
 };
 
+static const char * const oclicdl_pfx = "OCLICD";
+
 #define LINFO(symbol, name) { symbol, #symbol, "ICD loader " name }
 struct icdl_info_traits linfo_traits[] = {
 	LINFO(CL_ICDL_NAME, "Name"),
@@ -2545,6 +2547,13 @@ void oclIcdProps(void)
 		puts("\nICD loader properties");
 		current_function = __func__;
 
+		if (output_mode == CLINFO_RAW) {
+			line_pfx_len = strlen(oclicdl_pfx) + 5;
+			REALLOC(line_pfx, line_pfx_len, "line prefix OCL ICD");
+			sprintf(strbuf, "[%s/*]", oclicdl_pfx);
+			sprintf(line_pfx, "%*s", -line_pfx_len, strbuf);
+		}
+
 		for (current_line = 0; current_line < ARRAY_SIZE(linfo_traits); ++current_line) {
 			const struct icdl_info_traits *traits = linfo_traits + current_line;
 			current_param = traits->sname;

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