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:
Ben Sander
2016-03-19 22:53:59 -05:00
parent 52cc2bb75a
commit cea37c3e91
4 changed files with 17 additions and 6 deletions
+3 -2
View File
@@ -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