memory allocation refactoring
Change-Id: Ic63b4f5ea44f2dc5e009e3e58652a661e957b7d6
[ROCm/rocprofiler commit: c9c0ecc976]
Этот коммит содержится в:
@@ -359,9 +359,13 @@ bool HsaRsrcFactory::CopyToHost(void* dest_buff, const void* src_buff, uint32_t
|
||||
CHECK_STATUS("hsa_memory_copy", status);
|
||||
return (status == HSA_STATUS_SUCCESS);
|
||||
}
|
||||
bool HsaRsrcFactory::Memcpy(hsa_agent_t agent, void* dest_buff, const void* src_buff, uint32_t length) {
|
||||
(void)agent;
|
||||
return CopyToHost(dest_buff, src_buff, length);
|
||||
}
|
||||
|
||||
// Free method
|
||||
bool HsaRsrcFactory::MemoryFree(void* ptr) {
|
||||
bool HsaRsrcFactory::FreeMemory(void* ptr) {
|
||||
const hsa_status_t status = hsa_memory_free(ptr);
|
||||
CHECK_STATUS("hsa_memory_free", status);
|
||||
return (status == HSA_STATUS_SUCCESS);
|
||||
|
||||
@@ -217,9 +217,10 @@ class HsaRsrcFactory {
|
||||
|
||||
// Memcopy method
|
||||
static bool CopyToHost(void* dest_buff, const void* src_buff, uint32_t length);
|
||||
static bool Memcpy(hsa_agent_t agent, void* dest_buff, const void* src_buff, uint32_t length);
|
||||
|
||||
// Free method
|
||||
static bool MemoryFree(void* ptr);
|
||||
static bool FreeMemory(void* ptr);
|
||||
|
||||
// Loads an Assembled Brig file and Finalizes it into Device Isa
|
||||
//
|
||||
|
||||
Ссылка в новой задаче
Block a user