Fix max root device index in Program's ctor

Related-To: NEO-5001
Change-Id: If3b86a51df478222f47a30c9254466dea0710ec4
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-10-20 15:41:32 +02:00
committed by sys_ocldev
parent 52feced02b
commit 4122554b71
2 changed files with 30 additions and 1 deletions

View File

@@ -48,7 +48,13 @@ Program::Program(Context *context, bool isBuiltIn, const ClDeviceVector &clDevic
numDevices = static_cast<uint32_t>(clDevicesIn.size());
bool force32BitAddressess = false;
uint32_t maxRootDeviceIndex = pDevice->getRootDeviceIndex();
uint32_t maxRootDeviceIndex = 0;
for (const auto &device : clDevicesIn) {
if (device->getRootDeviceIndex() > maxRootDeviceIndex) {
maxRootDeviceIndex = device->getRootDeviceIndex();
}
}
buildInfos.resize(maxRootDeviceIndex + 1);