client: Detect OpenCL CPUs with the latest Intel drivers.

client: Display an OpenCL CPU event log item for every OpenCL CPU detected.
This commit is contained in:
Rom Walton 2013-10-10 14:23:30 -04:00
parent 91b2b8e498
commit 8888ba6aa8
4 changed files with 14 additions and 2 deletions

View File

@ -18,7 +18,7 @@
// client-specific GPU code. Mostly GPU detection
#define USE_CHILD_PROCESS_TO_DETECT_GPUS 1
//#define USE_CHILD_PROCESS_TO_DETECT_GPUS 1
#include "cpp.h"
@ -246,6 +246,13 @@ void COPROCS::correlate_gpus(
descs.push_back(string(buf));
}
// Create descriptions for OpenCL CPUs
//
for (i=0; i<cpu_opencls.size(); i++) {
cpu_opencls[i].description(buf, sizeof(buf), proc_type_name(PROC_TYPE_CPU));
descs.push_back(string(buf));
}
ati_gpus.clear();
nvidia_gpus.clear();
intel_gpus.clear();

View File

@ -107,6 +107,8 @@ static bool is_NVIDIA(char* vendor) {
static bool is_intel(char* vendor) {
if (strcasestr(vendor, "intel")) return true;
if (strcasestr(vendor, "GenuineIntel")) return true;
if (strcasestr(vendor, "Intel(R) Corporation")) return true;
return false;
}

View File

@ -312,3 +312,6 @@ int OPENCL_CPU_PROP::parse(XML_PARSER& xp) {
return ERR_XML_PARSE;
}
void OPENCL_CPU_PROP::description(char* buf, int buflen, const char* type) {
opencl_prop.description(buf, buflen, type);
}

View File

@ -84,7 +84,7 @@ struct OPENCL_CPU_PROP {
void clear();
void write_xml(MIOFILE&);
int parse(XML_PARSER&);
void description(char* buf, int buflen, const char* type);
};
#endif