Deprecate hipMallocHost and hipFreeHost.
These will print compiler warnings if used, so we can weed them out before removing. Also add a default flags args for hipHostAlloc, in the C++ functioin headers. So you can replace hipMallocHost(&ptr, size( with hipHostAlloc(&ptr, size)
This commit is contained in:
@@ -218,9 +218,10 @@ static inline hipError_t hipMalloc ( T** devPtr, size_t size)
|
||||
return hipMalloc((void**)devPtr, size);
|
||||
}
|
||||
|
||||
// Provide an override to automatically typecast the pointer type from void**, and also provide a default for the flags.
|
||||
template<class T>
|
||||
static inline hipError_t hipMallocHost ( T** ptr, size_t size)
|
||||
static inline hipError_t hipHostAlloc( T** ptr, size_t size, unsigned int flags = hipHostAllocDefault)
|
||||
{
|
||||
return hipMallocHost((void**)ptr, size);
|
||||
return hipHostAlloc((void**)ptr, size, flags);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user