SWDEV-345213 - Use the right accessor
- Use correct accessor to fetch memory objects. This checks the svm map and arena maps Change-Id: I84515330bb530cfe2b39abf30e1e659938f06806
This commit is contained in:
@@ -38,7 +38,10 @@ public:
|
||||
|
||||
const hipMemAllocationProp& GetProperties() const { return properties_; }
|
||||
hipMemGenericAllocationHandle_t asMemGenericAllocationHandle() { return reinterpret_cast<hipMemGenericAllocationHandle_t>(this); }
|
||||
amd::Memory& asAmdMemory() { return *amd::MemObjMap::FindMemObj(genericAddress()); }
|
||||
amd::Memory& asAmdMemory() {
|
||||
size_t discardOffset;
|
||||
return *getMemoryObject(genericAddress(), discardOffset);
|
||||
}
|
||||
void* genericAddress() const { return ptr_; }
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user