fix nvcc compiler

- MallocHost and FreeHost deprecation.
- Change tests to call new hipHost* equivs.
- Add missing StreamSynchronize.
This commit is contained in:
Ben Sander
2016-03-19 04:20:10 -05:00
parent 194d02ac5a
commit 9941ba0bc6
5 changed files with 19 additions and 12 deletions
+9 -2
View File
@@ -119,7 +119,9 @@ inline static hipError_t hipFree(void* ptr) {
return hipCUDAErrorTohipError(cudaFree(ptr));
}
inline static hipError_t hipMallocHost(void** ptr, size_t size) __attribute__((deprecated("use hipHostAlloc instead"))) {
inline static hipError_t hipMallocHost(void** ptr, size_t size) __attribute__((deprecated("use hipHostAlloc instead")));
inline static hipError_t hipMallocHost(void** ptr, size_t size) {
return hipCUDAErrorTohipError(cudaMallocHost(ptr, size));
}
@@ -143,7 +145,8 @@ inline static hipError_t hipHostUnregister(void* ptr){
return hipCUDAErrorTohipError(cudaHostUnregister(ptr));
}
inline static hipError_t hipFreeHost(void* ptr) __attribute__((deprecated("use hipHostFree instead"))) {
inline static hipError_t hipFreeHost(void* ptr) __attribute__((deprecated("use hipHostFree instead")));
inline static hipError_t hipFreeHost(void* ptr) {
return hipCUDAErrorTohipError(cudaFreeHost(ptr));
}
@@ -374,6 +377,10 @@ inline static hipError_t hipStreamCreate(hipStream_t *stream)
return hipCUDAErrorTohipError(cudaStreamCreate(stream));
}
inline static hipError_t hipStreamSynchronize(hipStream_t stream)
{
return hipCUDAErrorTohipError(cudaStreamSynchronize(stream));
}
inline static hipError_t hipStreamDestroy(hipStream_t stream)
{