mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 00:10:58 +08:00
fix: accept more than 16 root devices
Related-To: GSD-5892 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
73682494bc
commit
3845eb3b90
@@ -10,7 +10,6 @@
|
||||
#include "shared/source/helpers/debug_helpers.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <bitset>
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
#include <tuple>
|
||||
@@ -476,13 +475,16 @@ class RootDeviceIndicesContainer : protected StackVec<uint32_t, MaxRootDeviceInd
|
||||
using StackVec<uint32_t, MaxRootDeviceIndices>::operator[];
|
||||
|
||||
inline void pushUnique(uint32_t rootDeviceIndex) {
|
||||
if (!indexPresent.test(rootDeviceIndex)) {
|
||||
if (indexPresent.size() <= rootDeviceIndex) {
|
||||
indexPresent.resize(rootDeviceIndex + 1);
|
||||
}
|
||||
if (!indexPresent[rootDeviceIndex]) {
|
||||
push_back(rootDeviceIndex);
|
||||
indexPresent.set(rootDeviceIndex);
|
||||
indexPresent[rootDeviceIndex] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
std::bitset<MaxRootDeviceIndices> indexPresent{};
|
||||
StackVec<int8_t, MaxRootDeviceIndices> indexPresent;
|
||||
};
|
||||
using RootDeviceIndicesMap = StackVec<std::tuple<uint32_t, uint32_t>, MaxRootDeviceIndices>;
|
||||
|
||||
Reference in New Issue
Block a user