mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Simplify platform initialize.
- Remove not required parameters - move the logic to ult directories Change-Id: I913f1048489137a61220d96fa9f2798572cd4f56
This commit is contained in:

committed by
sys_ocldev

parent
6540a9c96b
commit
5c0a562a6b
@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user