Kaydet (Commit) 3d160b1f authored tarafından Noel Grandin's avatar Noel Grandin

convert int flag OpenclDevice::isInited to bool

Change-Id: I3283be819e1686b70a85aa05844deaaca17db0db
üst f9c68a3c
......@@ -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;
}
......
......@@ -151,7 +151,7 @@ class OpenclDevice
{
public:
static GPUEnv gpuEnv;
static int isInited;
static bool bIsInited;
static OString maCacheFolder;
static void registOpenclKernel();
......
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