static inline in a header, just like excess sugar in a diet, causes bloat (#1692)

Este commit está contenido en:
Alex Voicu
2019-12-23 15:39:38 +02:00
cometido por Maneesh Gupta
padre 9c91632194
commit be70b9f7e7
Se han modificado 11 ficheros con 1411 adiciones y 1418 borrados
+5 -5
Ver fichero
@@ -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