From 3d160b1f7844098fc6ef8d717a59b25069e1df91 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 28 Feb 2014 15:41:21 +0200 Subject: convert int flag OpenclDevice::isInited to bool Change-Id: I3283be819e1686b70a85aa05844deaaca17db0db --- sc/source/core/opencl/openclwrapper.cxx | 10 +++++----- sc/source/core/opencl/openclwrapper.hxx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sc') diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx index f9acfd85fe2e..b1a8ecc3aee8 100644 --- a/sc/source/core/opencl/openclwrapper.cxx +++ b/sc/source/core/opencl/openclwrapper.cxx @@ -44,7 +44,7 @@ using namespace std; namespace sc { namespace opencl { GPUEnv OpenclDevice::gpuEnv; -int OpenclDevice::isInited =0; +bool OpenclDevice::bIsInited = false; namespace { @@ -310,7 +310,7 @@ bool OpenclDevice::initOpenclAttr( OpenCLEnv * env ) void OpenclDevice::releaseOpenclEnv( GPUEnv *gpuInfo ) { - if ( !isInited ) + if ( !bIsInited ) { return; } @@ -325,7 +325,7 @@ void OpenclDevice::releaseOpenclEnv( GPUEnv *gpuInfo ) clReleaseContext( gpuEnv.mpContext ); gpuEnv.mpContext = NULL; } - isInited = 0; + bIsInited = false; gpuInfo->mnIsUserCreated = 0; free( gpuInfo->mpArryDevsID ); @@ -479,7 +479,7 @@ bool OpenclDevice::initOpenclRunEnv( int argc ) if ( ( argc > MAX_CLFILE_NUM ) || ( argc < 0 ) ) return true; - if ( !isInited ) + if ( !bIsInited ) { registOpenclKernel(); //initialize devices, context, command_queue @@ -506,7 +506,7 @@ bool OpenclDevice::initOpenclRunEnv( int argc ) { SAL_INFO("sc.opencl", "USE float type"); } - isInited = 1; + bIsInited = true; } return false; } diff --git a/sc/source/core/opencl/openclwrapper.hxx b/sc/source/core/opencl/openclwrapper.hxx index 0f3b11452b5e..1112d088c14a 100644 --- a/sc/source/core/opencl/openclwrapper.hxx +++ b/sc/source/core/opencl/openclwrapper.hxx @@ -151,7 +151,7 @@ class OpenclDevice { public: static GPUEnv gpuEnv; - static int isInited; + static bool bIsInited; static OString maCacheFolder; static void registOpenclKernel(); -- cgit