@@ -740,6 +740,15 @@ hipError_t hipFree(void* ptr);
|
||||
hipError_t hipFreeHost(void* ptr) __attribute__((deprecated("use hipHostFree instead"))) ;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Free memory allocated by the hcc hip host memory allocation API
|
||||
*
|
||||
* @param[in] ptr Pointer to memory to be freed
|
||||
* @return #hipSuccess, #hipErrorMemoryFree
|
||||
*/
|
||||
hipError_t hipHostFree(void* ptr);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Copy data from src to dst.
|
||||
|
||||
@@ -2607,7 +2607,7 @@ hipError_t hipFree(void* ptr)
|
||||
}
|
||||
|
||||
|
||||
hipError_t hipFreeHost(void* ptr)
|
||||
hipError_t hipHostFree(void* ptr)
|
||||
{
|
||||
// TODO - ensure this pointer was created by hipMallocHost and not hipMalloc
|
||||
std::call_once(hip_initialized, ihipInit);
|
||||
@@ -2621,6 +2621,13 @@ hipError_t hipFreeHost(void* ptr)
|
||||
};
|
||||
|
||||
|
||||
// TODO - deprecated function.
|
||||
hipError_t hipFreeHost(void* ptr)
|
||||
{
|
||||
hipHostFree(ptr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @warning HCC returns 0 in *canAccessPeer ; Need to update this function when RT supports P2P
|
||||
|
||||
Reference in New Issue
Block a user