Simplify platform initialize.

- Remove not required parameters
- move the logic to ult directories

Change-Id: I913f1048489137a61220d96fa9f2798572cd4f56
This commit is contained in:
Mrozek, Michal
2018-06-20 18:25:40 +02:00
committed by sys_ocldev
parent 6540a9c96b
commit 5c0a562a6b
12 changed files with 27 additions and 35 deletions

View File

@ -74,10 +74,9 @@ cl_int CL_API_CALL clGetPlatformIDs(cl_uint numEntries,
break;
}
// if the platforms are non-nullptr, we need to fill in the platform IDs
while (platforms != nullptr) {
auto pPlatform = platform();
bool ret = pPlatform->initialize(numPlatformDevices, platformDevices);
bool ret = pPlatform->initialize();
DEBUG_BREAK_IF(ret != true);
if (!ret) {
retVal = CL_INVALID_VALUE;
@ -158,9 +157,8 @@ cl_int CL_API_CALL clGetDeviceIDs(cl_platform_id platform,
break;
}
} else {
/* If platform is nullptr, we choose our default platform. */
pPlatform = ::platform();
bool ret = pPlatform->initialize(numPlatformDevices, platformDevices);
bool ret = pPlatform->initialize();
DEBUG_BREAK_IF(ret != true);
((void)(ret));
}