diff --git a/hipamd/include/hip/hcc_detail/hip_runtime_api.h b/hipamd/include/hip/hcc_detail/hip_runtime_api.h index 9745ca43d0..52e59ed17a 100644 --- a/hipamd/include/hip/hcc_detail/hip_runtime_api.h +++ b/hipamd/include/hip/hcc_detail/hip_runtime_api.h @@ -1614,17 +1614,6 @@ hipError_t hipDeviceComputeCapability(int *major,int *minor,hipDevice_t device); */ hipError_t hipDeviceGetName(char *name,int len,hipDevice_t device); -/** - * @brief Returns a PCI Bus Id string for the device. - * @param [out] pciBusId - * @param [in] len - * @param [hipDevice_t] device - * - * @returns #hipSuccess, #hipErrorInavlidDevice - */ -hipError_t hipDeviceGetPCIBusId (char *pciBusId,int len,hipDevice_t device); - - /** * @brief Returns a PCI Bus Id string for the device, overloaded to take int device ID. * @param [out] pciBusId @@ -1915,6 +1904,17 @@ hipError_t hipIpcCloseMemHandle(void *devPtr); } /* extern "c" */ #endif +#ifdef __cplusplus +/** + * @brief Returns a PCI Bus Id string for the device. + * @param [out] pciBusId + * @param [in] len + * @param [hipDevice_t] device + * + * @returns #hipSuccess, #hipErrorInavlidDevice + */ +hipError_t hipDeviceGetPCIBusId (char *pciBusId,int len,hipDevice_t device); +#endif /** *------------------------------------------------------------------------------------------------- diff --git a/hipamd/src/hip_device.cpp b/hipamd/src/hip_device.cpp index 75266efd4a..bf45125b60 100644 --- a/hipamd/src/hip_device.cpp +++ b/hipamd/src/hip_device.cpp @@ -337,6 +337,7 @@ hipError_t hipDeviceGetName(char *name,int len,hipDevice_t device) return ihipLogStatus(e); } +#ifdef __cplusplus hipError_t hipDeviceGetPCIBusId (char *pciBusId,int len,hipDevice_t device) { HIP_INIT_API(pciBusId, len, device); @@ -350,6 +351,7 @@ hipError_t hipDeviceGetPCIBusId (char *pciBusId,int len,hipDevice_t device) } return ihipLogStatus(e); } +#endif hipError_t hipDeviceGetPCIBusId (char *pciBusId,int len, int device) {