static inline in a header, just like excess sugar in a diet, causes bloat (#1692)
Este commit está contenido en:
@@ -358,21 +358,21 @@ enum hipComputeMode {
|
||||
*/
|
||||
#if defined(__cplusplus) && !defined(__HIP_DISABLE_CPP_FUNCTIONS__)
|
||||
template <class T>
|
||||
static inline hipError_t hipMalloc(T** devPtr, size_t size) {
|
||||
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 hipHostMalloc(T** ptr, size_t size,
|
||||
unsigned int flags = hipHostMallocDefault) {
|
||||
inline hipError_t hipHostMalloc(T** ptr, size_t size,
|
||||
unsigned int flags = hipHostMallocDefault) {
|
||||
return hipHostMalloc((void**)ptr, size, flags);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static inline hipError_t hipMallocManaged(T** devPtr, size_t size,
|
||||
unsigned int flags = hipMemAttachGlobal) {
|
||||
inline hipError_t hipMallocManaged(T** devPtr, size_t size,
|
||||
unsigned int flags = hipMemAttachGlobal) {
|
||||
return hipMallocManaged((void**)devPtr, size, flags);
|
||||
}
|
||||
#endif
|
||||
|
||||
Referencia en una nueva incidencia
Block a user