Refactor MemoryAllocation memoryPool overriding
Change-Id: I4fc2293fac6bc47a0139fedb81c2a879b610101f
This commit is contained in:
parent
dfd4e767e0
commit
26154ae21a
|
@ -24,12 +24,10 @@ class MemoryAllocation : public GraphicsAllocation {
|
|||
MemoryAllocation(bool cpuPtrAllocated, void *pMem, uint64_t gpuAddress, size_t memSize, uint64_t count, MemoryPool::Type pool) : GraphicsAllocation(pMem, gpuAddress, 0u, memSize),
|
||||
id(count) {
|
||||
this->cpuPtrAllocated = cpuPtrAllocated;
|
||||
this->memoryPool = pool;
|
||||
overrideMemoryPool(pool);
|
||||
}
|
||||
|
||||
void overrideMemoryPool(MemoryPool::Type pool) {
|
||||
memoryPool = pool;
|
||||
}
|
||||
void overrideMemoryPool(MemoryPool::Type pool);
|
||||
};
|
||||
|
||||
typedef std::map<void *, MemoryAllocation *> PointerMap;
|
||||
|
|
|
@ -11,4 +11,8 @@ namespace OCLRT {
|
|||
GraphicsAllocation *OsAgnosticMemoryManager::allocateGraphicsMemoryInDevicePool(const AllocationData &allocationData, AllocationStatus &status) {
|
||||
return MemoryManager::allocateGraphicsMemoryInDevicePool(allocationData, status);
|
||||
}
|
||||
|
||||
void MemoryAllocation::overrideMemoryPool(MemoryPool::Type pool) {
|
||||
this->memoryPool = pool;
|
||||
}
|
||||
} // namespace OCLRT
|
||||
|
|
Loading…
Reference in New Issue