summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-11-23 20:02:26 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-11-25 20:44:58 +0100
commitff7ae53efbe9847eb24feaa96d5ca5e4f49ca272 (patch)
tree8b3871dee150f285c43fdd8462377d9c2ba3ad38 /sc/source/core
parent7524119f965c54b863c9a67a19ff0a212c77879f (diff)
add API to retrieve all available OpenCL platforms and devices
Change-Id: I2475961ae315ee7193ca2cedd5943b663bfee7a0
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/opencl/openclwrapper.cxx4
-rw-r--r--sc/source/core/tool/formulagroup.cxx2
2 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx
index 24459c627780..54d997db4cce 100644
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/sc/source/core/opencl/openclwrapper.cxx
@@ -997,6 +997,10 @@ bool switchOpenclDevice(const OUString* pDevice, bool bAutoSelect)
void getOpenCLDeviceInfo(size_t& rDeviceId, size_t& rPlatformId)
{
+ int status = clewInit(OPENCL_DLL_NAME);
+ if (status < 0)
+ return;
+
cl_device_id id = OpenclDevice::gpuEnv.mpDevID;
findDeviceInfoFromDeviceId(id, rDeviceId, rPlatformId);
}
diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx
index 372e8fca1cc3..c2258205fe1c 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -660,7 +660,7 @@ void FormulaGroupInterpreter::getOpenCLDeviceInfo(sal_Int32& rDeviceId, sal_Int3
rDeviceId = -1;
rPlatformId = -1;
bool bOpenCLEnabled = ScInterpreter::GetGlobalConfig().mbOpenCLEnabled;
- if(bOpenCLEnabled)
+ if(!bOpenCLEnabled)
return;
#if HAVE_FEATURE_OPENCL