|
|
@ -71,21 +71,34 @@ template<typename T> hipError_t hipHostAlloc( T **pp, size_t N, unsigned int Fla |
|
|
|
return hipHostMalloc( (void **) pp, N, Flags ); |
|
|
|
return hipHostMalloc( (void **) pp, N, Flags ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<typename T> hipError_t hipHostGetDevicePointer( T **pp, void *p, unsigned int Flags ) { |
|
|
|
|
|
|
|
return hipHostGetDevicePointer( (void **) pp, p, Flags ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
// entry points
|
|
|
|
// entry points
|
|
|
|
#define cudaDeviceMapHost hipDeviceMapHost |
|
|
|
#define cudaDeviceMapHost hipDeviceMapHost |
|
|
|
#define cudaFree hipFree |
|
|
|
#define cudaFree hipFree |
|
|
|
#define cudaHostFree hipHostFree |
|
|
|
#define cudaHostFree hipHostFree |
|
|
|
|
|
|
|
#define cudaHostGetDevicePointer hipHostGetDevicePointer |
|
|
|
|
|
|
|
#define cudaStreamDestroy hipStreamDestroy |
|
|
|
#define cudaEventDestroy hipEventDestroy |
|
|
|
#define cudaEventDestroy hipEventDestroy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// data types
|
|
|
|
|
|
|
|
typedef hipStream_t cudaStream_t; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// defines
|
|
|
|
#define cudaMemcpyHostToDevice hipMemcpyHostToDevice |
|
|
|
#define cudaMemcpyHostToDevice hipMemcpyHostToDevice |
|
|
|
#define cudaMemcpyDeviceToHost hipMemcpyDeviceToHost |
|
|
|
#define cudaMemcpyDeviceToHost hipMemcpyDeviceToHost |
|
|
|
#define cudaMemcpyDeviceToDevice hipMemcpyDeviceToDevice |
|
|
|
#define cudaMemcpyDeviceToDevice hipMemcpyDeviceToDevice |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define cudaHostAllocMapped 0 |
|
|
|
|
|
|
|
|
|
|
|
// error defines
|
|
|
|
// error defines
|
|
|
|
#define cudaSuccess hipSuccess |
|
|
|
#define cudaSuccess hipSuccess |
|
|
|
#define cudaErrorUnknown hipErrorUnknown |
|
|
|
#define cudaErrorUnknown hipErrorUnknown |
|
|
|
|
|
|
|
#define cudaErrorInvalidValue hipErrorInvalidValue |
|
|
|
#define cudaErrorMemoryAllocation hipErrorMemoryAllocation |
|
|
|
#define cudaErrorMemoryAllocation hipErrorMemoryAllocation |
|
|
|
|
|
|
|
|
|
|
|
#else |
|
|
|
#else |
|
|
|