Remove redundant parameter from getDevices functions

Change-Id: I3da50a69adb8ec64fd1d09021142b278e34c4cbe
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-03-20 16:54:09 +01:00
committed by sys_ocldev
parent 819896bca2
commit 0f3730f5d9
16 changed files with 59 additions and 131 deletions

View File

@@ -37,7 +37,7 @@ CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnviro
return nullptr;
}
bool getDevices(size_t &numDevicesReturned, ExecutionEnvironment &executionEnvironment) {
bool getDevices(ExecutionEnvironment &executionEnvironment) {
if (executionEnvironment.rootDeviceEnvironments.size() == 0) {
executionEnvironment.prepareRootDeviceEnvironments(1u);
}
@@ -46,9 +46,9 @@ bool getDevices(size_t &numDevicesReturned, ExecutionEnvironment &executionEnvir
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(platformDevices[0]);
}
if (ultHwConfig.useMockedGetDevicesFunc) {
numDevicesReturned = DebugManager.flags.CreateMultipleRootDevices.get() != 0 ? DebugManager.flags.CreateMultipleRootDevices.get() : 1u;
executionEnvironment.prepareRootDeviceEnvironments(static_cast<uint32_t>(numDevicesReturned));
for (auto i = 0u; i < numDevicesReturned; i++) {
uint32_t numRootDevices = DebugManager.flags.CreateMultipleRootDevices.get() != 0 ? DebugManager.flags.CreateMultipleRootDevices.get() : 1u;
executionEnvironment.prepareRootDeviceEnvironments(numRootDevices);
for (auto i = 0u; i < numRootDevices; i++) {
if (executionEnvironment.rootDeviceEnvironments[i]->getHardwareInfo() == nullptr ||
(executionEnvironment.rootDeviceEnvironments[i]->getHardwareInfo()->platform.eProductFamily == IGFX_UNKNOWN &&
executionEnvironment.rootDeviceEnvironments[i]->getHardwareInfo()->platform.eRenderCoreFamily == IGFX_UNKNOWN_CORE)) {
@@ -60,6 +60,6 @@ bool getDevices(size_t &numDevicesReturned, ExecutionEnvironment &executionEnvir
return ultHwConfig.mockedGetDevicesFuncResult;
}
return getDevicesImpl(numDevicesReturned, executionEnvironment);
return getDevicesImpl(executionEnvironment);
}
} // namespace NEO