memory allocation refactoring

Change-Id: Ic63b4f5ea44f2dc5e009e3e58652a661e957b7d6
This commit is contained in:
Evgeny
2018-04-27 20:00:20 -05:00
parent 0d286e5efa
commit c9c0ecc976
14 changed files with 194 additions and 175 deletions
+5 -1
View File
@@ -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);
+2 -1
View File
@@ -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
//