(SWDEV-228794)

Add hipMallocHost()

Change-Id: Ia3c7c5ca94b39fe30f3a51d1b60782d3472259ff
This commit is contained in:
Vladislav Sytchenko
2020-03-27 14:02:46 -04:00
parent a91b82f00e
commit fd7a8f0367
3 changed files with 13 additions and 0 deletions
+11
View File
@@ -2101,3 +2101,14 @@ hipError_t hipGetMipmappedArrayLevel(hipArray_t *levelArray,
HIP_RETURN(hipErrorNotSupported);
}
hipError_t hipMallocHost(void** ptr,
size_t size) {
HIP_INIT_API(hipMallocHost, ptr, size);
if (ptr == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
HIP_RETURN(ihipMalloc(ptr, size, CL_MEM_SVM_FINE_GRAIN_BUFFER));
}