P4 to Git Change 1815146 by cpaquot@cpaquot-ocl-lc-lnx on 2019/06/12 13:43:33

SWDEV-192333 - [HIP] Implemented hipExtMallocWithFlags and hipExtGetLinkTypeAndHopCount

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_device_runtime.cpp#16 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_hcc.def.in#16 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_hcc.map.in#18 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#59 edit
Dieser Commit ist enthalten in:
foreman
2019-06-13 12:47:17 -04:00
Ursprung c2b13cce1d
Commit b15b82ffb9
4 geänderte Dateien mit 34 neuen und 0 gelöschten Zeilen
+11
Datei anzeigen
@@ -202,6 +202,17 @@ hipError_t ihipMemset(void* dst, int value, size_t valueSize, size_t sizeBytes,
return hipSuccess;
}
hipError_t hipExtMallocWithFlags(void** ptr, size_t sizeBytes, unsigned int flags) {
HIP_INIT_API(ptr, sizeBytes, flags);
if (flags != hipDeviceMallocDefault &&
flags != hipDeviceMallocFinegrained) {
HIP_RETURN(hipErrorInvalidValue);
}
HIP_RETURN(ihipMalloc(ptr, sizeBytes, (flags & hipDeviceMallocFinegrained)? CL_MEM_SVM_FINE_GRAIN_BUFFER : 0));
}
hipError_t hipMalloc(void** ptr, size_t sizeBytes) {
HIP_INIT_API(ptr, sizeBytes);