SWDEV-292714 - Add unique id for each allocation to support HIP_POINTER_ATTRIBUTE_BUFFER_ID
Change-Id: Ibb3fcb2d0bbbef03525fc884d5b3e9b5f6c11423
This commit is contained in:
@@ -28,6 +28,9 @@
|
||||
|
||||
#include <atomic>
|
||||
|
||||
// Stores the no. of memory allocations
|
||||
std::atomic<uint32_t> numAllocs = 0;
|
||||
|
||||
namespace amd {
|
||||
|
||||
bool BufferRect::create(const size_t* bufferOrigin, const size_t* region, size_t bufferRowPitch,
|
||||
@@ -309,6 +312,8 @@ bool Memory::create(void* initFrom, bool sysMemAlloc, bool skipAlloc, bool force
|
||||
}
|
||||
}
|
||||
|
||||
// Store the unique id for each memory allocation
|
||||
uniqueId_ = ++numAllocs;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
مرجع در شماره جدید
Block a user