src/components/rocm_smi/linux-rocm-smi.c
// rsmi_dev_pci_bandwidth_get(device, *rsmi_pcie_bandwidth_t bandwidth):
// Returns PCI bandwidth rate value from supported_table[subvariant]
// Returns PCI bandwidth rate corresponding lane count from supported_table[subvariant]
rsmi_dev_pci_bandwidth_get(device, *rsmi_pcie_bandwidth_t bandwidth):
Returns PCI bandwidth rate value from supported_table[subvariant]
Returns PCI bandwidth rate corresponding lane count from supported_table[subvariant]
rsmi_dev_pci_bandwidth_get ( device * rsmi_pcie_bandwidth_t bandwidth ) : Returns PCI bandwidth rate value from supported_table [ subvariant ] Returns PCI bandwidth rate corresponding lane count from supported_table [ subvariant ]
static int er_pci_bandwidth_lane_table(int myIdx)
{
    AllEvents[myIdx].value = 0;
    int idx = AllEvents[myIdx].device;
    RSMI(rsmi_dev_pci_bandwidth_get, 
         (AllEvents[myIdx].device, &PCITable[idx]),
         return(PAPI_EMISC));
    int subIdx = AllEvents[myIdx].subvariant;                   
    AllEvents[myIdx].value = PCITable[idx].lanes[subIdx];
    return(PAPI_OK);    
}
static int er_pci_bandwidth_lane_table ( int myIdx ) { AllEvents [ myIdx ] . value = 0 ; int idx = AllEvents [ myIdx ] . device ; RSMI ( rsmi_dev_pci_bandwidth_get , ( AllEvents [ myIdx ] . device , & PCITable [ idx ] ) , return ( PAPI_EMISC ) ) ; int subIdx = AllEvents [ myIdx ] . subvariant ; AllEvents [ myIdx ] . value = PCITable [ idx ] . lanes [ subIdx ] ; return ( PAPI_OK ) ; }
rsmi_dev_pci_bandwidth_get(device, *rsmi_pcie_bandwidth_t bandwidth):
Returns PCI bandwidth rate value from supported_table[subvariant]
Returns PCI bandwidth rate corresponding lane count from supported_table[subvariant]
rsmi_dev_pci_bandwidth_get ( device * rsmi_pcie_bandwidth_t bandwidth ) : Returns PCI bandwidth rate value from supported_table [ subvariant ] Returns PCI bandwidth rate corresponding lane count from supported_table [ subvariant ]
// Get the subvariant for index into table.