[Libreoffice-commits] core.git: Branch 'feature/calc-pluggable-opencl' - sc/inc sc/source

Markus Mohrhard markus.mohrhard at googlemail.com
Fri Sep 13 12:53:45 PDT 2013


 sc/inc/platforminfo.hxx                 |    4 ++--
 sc/source/core/opencl/openclwrapper.cxx |    4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit ac52af95d432f29f5af967c69ad758e29e339488
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Fri Sep 13 21:44:58 2013 +0200

    store the platform and device id for later look-up
    
    Change-Id: If95858d3812c913a3695f04bcfac76325171d102

diff --git a/sc/inc/platforminfo.hxx b/sc/inc/platforminfo.hxx
index d848525..21c9aa9 100644
--- a/sc/inc/platforminfo.hxx
+++ b/sc/inc/platforminfo.hxx
@@ -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;
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx
index c2c1e45..f5178c2 100644
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/sc/source/core/opencl/openclwrapper.cxx
@@ -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);


More information about the Libreoffice-commits mailing list