mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-13 18:23:03 +08:00
Refactor: use stack vector for root device indices
Stack vector will not cause dynamic allocations in most circumstances ie. number of root device indices not more than 16 Related-To: NEO-6837 Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f7e04b32aa
commit
8d1ad5a4f3
@@ -122,7 +122,7 @@ class MockMemoryManager : public MemoryManagerCreate<OsAgnosticMemoryManager> {
|
||||
return OsAgnosticMemoryManager::reserveCpuAddressRange(size, rootDeviceIndex);
|
||||
}
|
||||
|
||||
void *createMultiGraphicsAllocationInSystemMemoryPool(std::vector<uint32_t> &rootDeviceIndices,
|
||||
void *createMultiGraphicsAllocationInSystemMemoryPool(RootDeviceIndicesContainer &rootDeviceIndices,
|
||||
AllocationProperties &properties,
|
||||
MultiGraphicsAllocation &multiGraphicsAllocation) override {
|
||||
if (isMockEventPoolCreateMemoryManager) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2021 Intel Corporation
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -21,14 +21,14 @@ class MockTagAllocator : public TagAllocator<TagType> {
|
||||
|
||||
MockTagAllocator(uint32_t rootDeviceIndex, MemoryManager *memoryManager, size_t tagCount,
|
||||
size_t tagAlignment, size_t tagSize, bool doNotReleaseNodes, DeviceBitfield deviceBitfield)
|
||||
: BaseClass(std::vector<uint32_t>{rootDeviceIndex}, memoryManager, tagCount, tagAlignment, tagSize, doNotReleaseNodes, deviceBitfield) {
|
||||
: BaseClass(RootDeviceIndicesContainer({rootDeviceIndex}), memoryManager, tagCount, tagAlignment, tagSize, doNotReleaseNodes, deviceBitfield) {
|
||||
}
|
||||
|
||||
MockTagAllocator(uint32_t rootDeviceIndex, MemoryManager *memoryManager, size_t tagCount = 10)
|
||||
: MockTagAllocator(rootDeviceIndex, memoryManager, tagCount, MemoryConstants::cacheLineSize, sizeof(TagType), false, mockDeviceBitfield) {
|
||||
}
|
||||
|
||||
MockTagAllocator(const std::vector<uint32_t> &rootDeviceIndices, MemoryManager *memoryManager, size_t tagCount = 10)
|
||||
MockTagAllocator(const RootDeviceIndicesContainer &rootDeviceIndices, MemoryManager *memoryManager, size_t tagCount = 10)
|
||||
: BaseClass(rootDeviceIndices, memoryManager, tagCount, MemoryConstants::cacheLineSize, sizeof(TagType), false, mockDeviceBitfield) {}
|
||||
|
||||
void returnTag(TagNodeBase *node) override {
|
||||
|
||||
Reference in New Issue
Block a user