diff --git a/hipamd/include/hip/hip_runtime_api.h b/hipamd/include/hip/hip_runtime_api.h index cd7af65265..34363689e4 100644 --- a/hipamd/include/hip/hip_runtime_api.h +++ b/hipamd/include/hip/hip_runtime_api.h @@ -318,9 +318,13 @@ enum hipComputeMode { * * Perform automatic type conversion to eliminate need for excessive typecasting (ie void**) * + * __HIP_DISABLE_CPP_FUNCTIONS__ macro can be defined to suppress these + * wrappers. It is useful for applications which need to obtain decltypes of + * HIP runtime APIs. + * * @see hipMalloc */ -#ifdef __cplusplus +#if defined(__cplusplus) && !defined(__HIP_DISABLE_CPP_FUNCTIONS__) template static inline hipError_t hipMalloc(T** devPtr, size_t size) { return hipMalloc((void**)devPtr, size);