added feature for hipHostGetFlags for CUDA and HIP

Este commit está contenido en:
Aditya Atluri
2016-03-06 12:17:30 -06:00
padre 1f3695b224
commit 75952029d6
Se han modificado 5 ficheros con 103 adiciones y 7 borrados
+9
Ver fichero
@@ -687,6 +687,15 @@ hipError_t hipHostAlloc(void** ptr, size_t size, unsigned int flags) ;
*/
hipError_t hipHostGetDevicePointer(void** devPtr, void* hstPtr, size_t size) ;
/**
* @brief Get flags associated with host pointer
*
* @param[out] flagsPtr Memory location to store flags
* @param[in] hostPtr Host Pointer allocated through hipHostAlloc
* @return Error code
*/
hipError_t hipHostGetFlags(unsigned int* flagsPtr, void* hostPtr) ;
/**
* @brief Free memory allocated by the hcc hip memory allocation API.
* This API performs an implicit hipDeviceSynchronize() call.
+4
Ver fichero
@@ -128,6 +128,10 @@ inline static hipError_t hipHostGetDevicePointer(void** devPtr, void* hostPtr, u
return hipCUDAErrorTohipError(cudaHostGetDevicePointer(devPtr, hostPtr, flags));
}
inline static hipError_ hipHostGetFlags(unsigned int* flagsPtr, void* hostPtr){
return hipCUDAErrorTohipError(cudaHostGetFlags(flagsPtr, hostPtr));
}
inline static hipError_t hipFreeHost(void* ptr) {
return hipCUDAErrorTohipError(cudaFreeHost(ptr));
}