coreTlsData -> getCoreTlsData()

This commit is contained in:
Alexander Alekhin
2015-02-04 13:03:27 +03:00
parent 4c52dfc956
commit 2054123890
4 changed files with 22 additions and 14 deletions

View File

@@ -1471,7 +1471,7 @@ bool haveOpenCL()
bool useOpenCL()
{
CoreTLSData* data = coreTlsData.get();
CoreTLSData* data = getCoreTlsData().get();
if( data->useOpenCL < 0 )
{
try
@@ -1490,7 +1490,7 @@ void setUseOpenCL(bool flag)
{
if( haveOpenCL() )
{
CoreTLSData* data = coreTlsData.get();
CoreTLSData* data = getCoreTlsData().get();
data->useOpenCL = (flag && Device::getDefault().ptr() != NULL) ? 1 : 0;
}
}
@@ -2161,7 +2161,7 @@ size_t Device::profilingTimerResolution() const
const Device& Device::getDefault()
{
const Context& ctx = Context::getDefault();
int idx = coreTlsData.get()->device;
int idx = getCoreTlsData().get()->device;
const Device& device = ctx.device(idx);
return device;
}
@@ -3040,7 +3040,7 @@ void* Queue::ptr() const
Queue& Queue::getDefault()
{
Queue& q = coreTlsData.get()->oclQueue;
Queue& q = getCoreTlsData().get()->oclQueue;
if( !q.p && haveOpenCL() )
q.create(Context::getDefault());
return q;