summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-11-12 13:39:31 +0200
committerTor Lillqvist <tml@collabora.com>2014-11-12 21:50:00 +0200
commited1070949b81814ab6bdb7efcb18b747832247f5 (patch)
tree3cde509af24f1b662d8d26349e4b536d79934d89 /sc
parent559478530b41e60528f2026c2f81872b0096dc94 (diff)
Expand tiny misleadingly named 'registerOpenCLKernel' at its only call site
The function did not register any OpenCL kernel;) Change-Id: Iebba89bc39d3035ff0d39d9cfa8ec72d4ebf217a
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/inc/openclwrapper.hxx1
-rw-r--r--sc/source/core/opencl/openclwrapper.cxx10
2 files changed, 3 insertions, 8 deletions
diff --git a/sc/source/core/inc/openclwrapper.hxx b/sc/source/core/inc/openclwrapper.hxx
index bc3957f6641c..1f11ffcdec7c 100644
--- a/sc/source/core/inc/openclwrapper.hxx
+++ b/sc/source/core/inc/openclwrapper.hxx
@@ -75,7 +75,6 @@ public:
static bool bIsInited;
static OString maCacheFolder;
- static void registerOpenCLKernel();
static bool initOpenCLRunEnv( GPUEnv *gpu );
static void releaseOpenCLEnv( GPUEnv *gpuInfo );
static bool initOpenCLRunEnv( int argc );
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx
index 23db69e7740e..0c01274782d0 100644
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/sc/source/core/opencl/openclwrapper.cxx
@@ -81,12 +81,6 @@ OString getCacheFolder()
OString OpenCLDevice::maCacheFolder = getCacheFolder();
-void OpenCLDevice::registerOpenCLKernel()
-{
- if ( !gpuEnv.mnIsUserCreated )
- memset( &gpuEnv, 0, sizeof(gpuEnv) );
-}
-
void OpenCLDevice::setKernelEnv( KernelEnv *envInfo )
{
envInfo->mpkContext = gpuEnv.mpContext;
@@ -437,7 +431,9 @@ bool OpenCLDevice::initOpenCLRunEnv( int argc )
if ( !bIsInited )
{
- registerOpenCLKernel();
+ if ( !gpuEnv.mnIsUserCreated )
+ memset( &gpuEnv, 0, sizeof(gpuEnv) );
+
//initialize devices, context, command_queue
bool status = initOpenCLRunEnv( &gpuEnv );
if ( status )