SWDEV-292714 - Add unique id for each allocation to support HIP_POINTER_ATTRIBUTE_BUFFER_ID

Change-Id: Ibb3fcb2d0bbbef03525fc884d5b3e9b5f6c11423
Tá an tiomantas seo le fáil i:
Satyanvesh Dittakavi
2021-09-27 19:12:50 +00:00
tuismitheoir 0ab4ad1310
tiomantas c56317b2e0
D'athraigh 2 comhad le 8 breiseanna agus 2 scriosta
+5
Féach ar an gComhad
@@ -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;
}