mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
Do not copy std::vector of OS handles when it is not needed
This change replaces unneeded copying of std::vectors with usage of const references. Furthermore, it adds reserve() call before filling the container via push_back(). Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
40ddeeb3ba
commit
9b26e96b11
@@ -467,7 +467,7 @@ GraphicsAllocation *WddmMemoryManager::createAllocationFromHandle(osHandle handl
|
||||
return allocation.release();
|
||||
}
|
||||
|
||||
GraphicsAllocation *WddmMemoryManager::createGraphicsAllocationFromMultipleSharedHandles(std::vector<osHandle> handles, AllocationProperties &properties, bool requireSpecificBitness, bool isHostIpcAllocation) {
|
||||
GraphicsAllocation *WddmMemoryManager::createGraphicsAllocationFromMultipleSharedHandles(const std::vector<osHandle> &handles, AllocationProperties &properties, bool requireSpecificBitness, bool isHostIpcAllocation) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ class WddmMemoryManager : public MemoryManager {
|
||||
void freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllocation, bool isImportedAllocation) override;
|
||||
void handleFenceCompletion(GraphicsAllocation *allocation) override;
|
||||
|
||||
GraphicsAllocation *createGraphicsAllocationFromMultipleSharedHandles(std::vector<osHandle> handles, AllocationProperties &properties, bool requireSpecificBitness, bool isHostIpcAllocation) override;
|
||||
GraphicsAllocation *createGraphicsAllocationFromMultipleSharedHandles(const std::vector<osHandle> &handles, AllocationProperties &properties, bool requireSpecificBitness, bool isHostIpcAllocation) override;
|
||||
GraphicsAllocation *createGraphicsAllocationFromSharedHandle(osHandle handle, const AllocationProperties &properties, bool requireSpecificBitness, bool isHostIpcAllocation) override;
|
||||
GraphicsAllocation *createGraphicsAllocationFromNTHandle(void *handle, uint32_t rootDeviceIndex, AllocationType allocType) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user