Kaydet (Commit) 3be59e38 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

store the platform and device id for later look-up

Change-Id: If95858d3812c913a3695f04bcfac76325171d102
üst 783179c1
......@@ -20,7 +20,7 @@ namespace sc {
struct SC_DLLPUBLIC OpenclDeviceInfo
{
size_t mnId;
void* device;
OUString maName;
OUString maVendor;
size_t mnMemory;
......@@ -30,7 +30,7 @@ struct SC_DLLPUBLIC OpenclDeviceInfo
struct SC_DLLPUBLIC OpenclPlatformInfo
{
void* mnId;
void* platform;
OUString maVendor;
OUString maName;
std::vector<OpenclDeviceInfo> maDevices;
......
......@@ -2640,6 +2640,8 @@ namespace {
void createDeviceInfo(cl_device_id aDeviceId, OpenclPlatformInfo& rPlatformInfo)
{
OpenclDeviceInfo aDeviceInfo;
aDeviceInfo.device = aDeviceId;
char pName[64];
cl_int nState = clGetDeviceInfo(aDeviceId, CL_DEVICE_NAME, 64, pName, NULL);
if(nState != CL_SUCCESS)
......@@ -2680,7 +2682,7 @@ void createDeviceInfo(cl_device_id aDeviceId, OpenclPlatformInfo& rPlatformInfo)
bool createPlatformInfo(cl_platform_id nPlatformId, OpenclPlatformInfo& rPlatformInfo)
{
rPlatformInfo.mnId = nPlatformId;
rPlatformInfo.platform = nPlatformId;
char pName[64];
cl_int nState = clGetPlatformInfo(nPlatformId, CL_PLATFORM_NAME, 64,
pName, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment