memory allocation refactoring
Change-Id: Ic63b4f5ea44f2dc5e009e3e58652a661e957b7d6
[ROCm/rocprofiler commit: c9c0ecc976]
이 커밋은 다음에 포함됨:
1 부모
68cfb95f04
커밋
e761eda5fa
14 파일이 변경됨
+194
-175
검색과 일치하는 파일 없음
@@ -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
|
||||
//
|
||||
|
||||
새 이슈에서 참조
사용자 차단