/* automatically generated by rust-bindgen 0.72.1 */

pub const AMDSMI_GPU_UUID_SIZE: u32 = 38;
pub const AMDSMI_LIB_VERSION_MAJOR: u32 = 26;
pub const AMDSMI_LIB_VERSION_MINOR: u32 = 2;
pub const AMDSMI_LIB_VERSION_RELEASE: u32 = 1;
pub const AMDSMI_MAX_FAN_SPEED: u32 = 255;
impl amdsmi_init_flags_t {
    #[doc = "```text\n!< Initialize all processors\n```"]
    pub const AMDSMI_INIT_ALL_PROCESSORS: amdsmi_init_flags_t = amdsmi_init_flags_t(4294967295);
    #[doc = "```text\n!< Initialize AMD CPUS\n```"]
    pub const AMDSMI_INIT_AMD_CPUS: amdsmi_init_flags_t = amdsmi_init_flags_t(1);
    #[doc = "```text\n!< Initialize AMD GPUS\n```"]
    pub const AMDSMI_INIT_AMD_GPUS: amdsmi_init_flags_t = amdsmi_init_flags_t(2);
    #[doc = "```text\n!< Initialize Non-AMD CPUS\n```"]
    pub const AMDSMI_INIT_NON_AMD_CPUS: amdsmi_init_flags_t = amdsmi_init_flags_t(4);
    #[doc = "```text\n!< Initialize Non-AMD GPUS\n```"]
    pub const AMDSMI_INIT_NON_AMD_GPUS: amdsmi_init_flags_t = amdsmi_init_flags_t(8);
    #[doc = "```text\n< Initialize AMD CPUS and GPUS\n(Default option)\n```"]
    pub const AMDSMI_INIT_AMD_APUS: amdsmi_init_flags_t = amdsmi_init_flags_t(3);
}
#[repr(transparent)]
#[doc = "```text\n @brief Initialization flags\n\n Initialization flags may be OR'd together and passed to ::amdsmi_init().\n\n @cond @tag{gpu_bm_linux} @tag{host} @tag{cpu_bm} @tag{guest_windows} @endcond\n```"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct amdsmi_init_flags_t(pub ::std::os::raw::c_uint);
#[doc = "```text\n @brief opaque handler point to underlying implementation\n\n @cond @tag{gpu_bm_linux} @tag{host} @tag{cpu_bm} @tag{guest_windows} @endcond\n```"]
pub type amdsmi_processor_handle = *mut ::std::os::raw::c_void;
pub type amdsmi_socket_handle = *mut ::std::os::raw::c_void;
impl amdsmi_status_t {
    #[doc = "```text\n!< Call succeeded\n```"]
    pub const AMDSMI_STATUS_SUCCESS: amdsmi_status_t = amdsmi_status_t(0);
    #[doc = "```text\n!< Invalid parameters\n```"]
    pub const AMDSMI_STATUS_INVAL: amdsmi_status_t = amdsmi_status_t(1);
    #[doc = "```text\n!< Command not supported\n```"]
    pub const AMDSMI_STATUS_NOT_SUPPORTED: amdsmi_status_t = amdsmi_status_t(2);
    #[doc = "```text\n!< Not implemented yet\n```"]
    pub const AMDSMI_STATUS_NOT_YET_IMPLEMENTED: amdsmi_status_t = amdsmi_status_t(3);
    #[doc = "```text\n!< Fail to load lib\n```"]
    pub const AMDSMI_STATUS_FAIL_LOAD_MODULE: amdsmi_status_t = amdsmi_status_t(4);
    #[doc = "```text\n!< Fail to load symbol\n```"]
    pub const AMDSMI_STATUS_FAIL_LOAD_SYMBOL: amdsmi_status_t = amdsmi_status_t(5);
    #[doc = "```text\n!< Error when call libdrm\n```"]
    pub const AMDSMI_STATUS_DRM_ERROR: amdsmi_status_t = amdsmi_status_t(6);
    #[doc = "```text\n!< API call failed\n```"]
    pub const AMDSMI_STATUS_API_FAILED: amdsmi_status_t = amdsmi_status_t(7);
    #[doc = "```text\n!< Timeout in API call\n```"]
    pub const AMDSMI_STATUS_TIMEOUT: amdsmi_status_t = amdsmi_status_t(8);
    #[doc = "```text\n!< Retry operation\n```"]
    pub const AMDSMI_STATUS_RETRY: amdsmi_status_t = amdsmi_status_t(9);
    #[doc = "```text\n!< Permission Denied\n```"]
    pub const AMDSMI_STATUS_NO_PERM: amdsmi_status_t = amdsmi_status_t(10);
    #[doc = "```text\n!< An interrupt occurred during execution of function\n```"]
    pub const AMDSMI_STATUS_INTERRUPT: amdsmi_status_t = amdsmi_status_t(11);
    #[doc = "```text\n!< I/O Error\n```"]
    pub const AMDSMI_STATUS_IO: amdsmi_status_t = amdsmi_status_t(12);
    #[doc = "```text\n!< Bad address\n```"]
    pub const AMDSMI_STATUS_ADDRESS_FAULT: amdsmi_status_t = amdsmi_status_t(13);
    #[doc = "```text\n!< Problem accessing a file\n```"]
    pub const AMDSMI_STATUS_FILE_ERROR: amdsmi_status_t = amdsmi_status_t(14);
    #[doc = "```text\n!< Not enough memory\n```"]
    pub const AMDSMI_STATUS_OUT_OF_RESOURCES: amdsmi_status_t = amdsmi_status_t(15);
    #[doc = "```text\n!< An internal exception was caught\n```"]
    pub const AMDSMI_STATUS_INTERNAL_EXCEPTION: amdsmi_status_t = amdsmi_status_t(16);
    #[doc = "```text\n!< The provided input is out of allowable or safe range\n```"]
    pub const AMDSMI_STATUS_INPUT_OUT_OF_BOUNDS: amdsmi_status_t = amdsmi_status_t(17);
    #[doc = "```text\n!< An error occurred when initializing internal data structures\n```"]
    pub const AMDSMI_STATUS_INIT_ERROR: amdsmi_status_t = amdsmi_status_t(18);
    #[doc = "```text\n!< An internal reference counter exceeded INT32_MAX\n```"]
    pub const AMDSMI_STATUS_REFCOUNT_OVERFLOW: amdsmi_status_t = amdsmi_status_t(19);
    #[doc = "```text\n!< Error when a directory is not found, maps to ENOTDIR\n```"]
    pub const AMDSMI_STATUS_DIRECTORY_NOT_FOUND: amdsmi_status_t = amdsmi_status_t(20);
    #[doc = "```text\n!< Processor busy\n```"]
    pub const AMDSMI_STATUS_BUSY: amdsmi_status_t = amdsmi_status_t(30);
    #[doc = "```text\n!< Processor Not found\n```"]
    pub const AMDSMI_STATUS_NOT_FOUND: amdsmi_status_t = amdsmi_status_t(31);
    #[doc = "```text\n!< Processor not initialized\n```"]
    pub const AMDSMI_STATUS_NOT_INIT: amdsmi_status_t = amdsmi_status_t(32);
    #[doc = "```text\n!< No more free slot\n```"]
    pub const AMDSMI_STATUS_NO_SLOT: amdsmi_status_t = amdsmi_status_t(33);
    #[doc = "```text\n!< Processor driver not loaded\n```"]
    pub const AMDSMI_STATUS_DRIVER_NOT_LOADED: amdsmi_status_t = amdsmi_status_t(34);
    #[doc = "```text\n!< There is more data than the buffer size the user passed\n```"]
    pub const AMDSMI_STATUS_MORE_DATA: amdsmi_status_t = amdsmi_status_t(39);
    #[doc = "```text\n!< No data was found for a given input\n```"]
    pub const AMDSMI_STATUS_NO_DATA: amdsmi_status_t = amdsmi_status_t(40);
    #[doc = "```text\n!< Not enough resources were available for the operation\n```"]
    pub const AMDSMI_STATUS_INSUFFICIENT_SIZE: amdsmi_status_t = amdsmi_status_t(41);
    #[doc = "```text\n!< An unexpected amount of data was read\n```"]
    pub const AMDSMI_STATUS_UNEXPECTED_SIZE: amdsmi_status_t = amdsmi_status_t(42);
    #[doc = "```text\n!< The data read or provided to function is not what was expected\n```"]
    pub const AMDSMI_STATUS_UNEXPECTED_DATA: amdsmi_status_t = amdsmi_status_t(43);
    #[doc = "```text\n!< System has different cpu than AMD\n```"]
    pub const AMDSMI_STATUS_NON_AMD_CPU: amdsmi_status_t = amdsmi_status_t(44);
    #[doc = "```text\n!< Energy driver not found\n```"]
    pub const AMDSMI_STATUS_NO_ENERGY_DRV: amdsmi_status_t = amdsmi_status_t(45);
    #[doc = "```text\n!< MSR driver not found\n```"]
    pub const AMDSMI_STATUS_NO_MSR_DRV: amdsmi_status_t = amdsmi_status_t(46);
    #[doc = "```text\n!< HSMP driver not found\n```"]
    pub const AMDSMI_STATUS_NO_HSMP_DRV: amdsmi_status_t = amdsmi_status_t(47);
    #[doc = "```text\n!< HSMP not supported\n```"]
    pub const AMDSMI_STATUS_NO_HSMP_SUP: amdsmi_status_t = amdsmi_status_t(48);
    #[doc = "```text\n!< HSMP message/feature not supported\n```"]
    pub const AMDSMI_STATUS_NO_HSMP_MSG_SUP: amdsmi_status_t = amdsmi_status_t(49);
    #[doc = "```text\n!< HSMP message timed out\n```"]
    pub const AMDSMI_STATUS_HSMP_TIMEOUT: amdsmi_status_t = amdsmi_status_t(50);
    #[doc = "```text\n!< No Energy and HSMP driver present\n```"]
    pub const AMDSMI_STATUS_NO_DRV: amdsmi_status_t = amdsmi_status_t(51);
    #[doc = "```text\n!< file or directory not found\n```"]
    pub const AMDSMI_STATUS_FILE_NOT_FOUND: amdsmi_status_t = amdsmi_status_t(52);
    #[doc = "```text\n!< Parsed argument is invalid\n```"]
    pub const AMDSMI_STATUS_ARG_PTR_NULL: amdsmi_status_t = amdsmi_status_t(53);
    #[doc = "```text\n!< AMDGPU restart failed\n```"]
    pub const AMDSMI_STATUS_AMDGPU_RESTART_ERR: amdsmi_status_t = amdsmi_status_t(54);
    #[doc = "```text\n!< Setting is not available\n```"]
    pub const AMDSMI_STATUS_SETTING_UNAVAILABLE: amdsmi_status_t = amdsmi_status_t(55);
    #[doc = "```text\n!< EEPROM is corrupted\n```"]
    pub const AMDSMI_STATUS_CORRUPTED_EEPROM: amdsmi_status_t = amdsmi_status_t(56);
    #[doc = "```text\n!< The internal library error did not map to a status code\n```"]
    pub const AMDSMI_STATUS_MAP_ERROR: amdsmi_status_t = amdsmi_status_t(4294967294);
    #[doc = "```text\n!< An unknown error occurred\n```"]
    pub const AMDSMI_STATUS_UNKNOWN_ERROR: amdsmi_status_t = amdsmi_status_t(4294967295);
}
#[repr(transparent)]
#[doc = "```text\n @brief Error codes returned by amdsmi functions\n\n Please avoid status codes that are multiples of 256 (256, 512, etc..)\n Return values in the shell get modulo 256 applied, meaning any multiple of 256 ends up as 0\n\n @cond @tag{gpu_bm_linux} @tag{host} @tag{cpu_bm} @tag{guest_windows} @endcond\n```"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct amdsmi_status_t(pub ::std::os::raw::c_uint);
impl amdsmi_clk_type_t {
    #[doc = "```text\n!< System clock\n```"]
    pub const AMDSMI_CLK_TYPE_SYS: amdsmi_clk_type_t = amdsmi_clk_type_t(0);
    pub const AMDSMI_CLK_TYPE_FIRST: amdsmi_clk_type_t = amdsmi_clk_type_t(0);
    #[doc = "```text\n!< Graphics clock\n```"]
    pub const AMDSMI_CLK_TYPE_GFX: amdsmi_clk_type_t = amdsmi_clk_type_t(0);
    #[doc = "```text\n< Data Fabric clock (for ASICs\nrunning on a separate clock)\n```"]
    pub const AMDSMI_CLK_TYPE_DF: amdsmi_clk_type_t = amdsmi_clk_type_t(1);
    #[doc = "```text\n< Display Controller Engine Front clock,\ntiming/bandwidth signals to display\n```"]
    pub const AMDSMI_CLK_TYPE_DCEF: amdsmi_clk_type_t = amdsmi_clk_type_t(2);
    #[doc = "```text\n!< System On Chip clock, integrated circuit frequency\n```"]
    pub const AMDSMI_CLK_TYPE_SOC: amdsmi_clk_type_t = amdsmi_clk_type_t(3);
    #[doc = "```text\n!< Memory clock speed, system operating frequency\n```"]
    pub const AMDSMI_CLK_TYPE_MEM: amdsmi_clk_type_t = amdsmi_clk_type_t(4);
    #[doc = "```text\n!< PCI Express clock, high bandwidth peripherals\n```"]
    pub const AMDSMI_CLK_TYPE_PCIE: amdsmi_clk_type_t = amdsmi_clk_type_t(5);
    #[doc = "```text\n!< Video 0 clock, video processing units\n```"]
    pub const AMDSMI_CLK_TYPE_VCLK0: amdsmi_clk_type_t = amdsmi_clk_type_t(6);
    #[doc = "```text\n!< Video 1 clock, video processing units\n```"]
    pub const AMDSMI_CLK_TYPE_VCLK1: amdsmi_clk_type_t = amdsmi_clk_type_t(7);
    #[doc = "```text\n!< Display 1 clock, timing signals for display output\n```"]
    pub const AMDSMI_CLK_TYPE_DCLK0: amdsmi_clk_type_t = amdsmi_clk_type_t(8);
    #[doc = "```text\n!< Display 2 clock, timing signals for display output\n```"]
    pub const AMDSMI_CLK_TYPE_DCLK1: amdsmi_clk_type_t = amdsmi_clk_type_t(9);
    pub const AMDSMI_CLK_TYPE__MAX: amdsmi_clk_type_t = amdsmi_clk_type_t(9);
}
#[repr(transparent)]
#[doc = "```text\n @brief Clock types\n\n @cond @tag{gpu_bm_linux} @tag{host} @tag{guest_windows} @endcond\n```"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct amdsmi_clk_type_t(pub ::std::os::raw::c_uint);
impl amdsmi_temperature_type_t {
    #[doc = "```text\n!< Edge temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_EDGE: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(0);
    pub const AMDSMI_TEMPERATURE_TYPE_FIRST: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(0);
    #[doc = "```text\n!< Hottest temperature reported for entire die\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_HOTSPOT: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(1);
    #[doc = "```text\n!< Synonymous with HOTSPOT\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_JUNCTION: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(1);
    #[doc = "```text\n!< VRAM temperature on graphics card\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_VRAM: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(2);
    #[doc = "```text\n!< High Bandwidth 0 temperature per stack\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_HBM_0: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(3);
    #[doc = "```text\n!< High Bandwidth 1 temperature per stack\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_HBM_1: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(4);
    #[doc = "```text\n!< High Bandwidth 2 temperature per stack\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_HBM_2: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(5);
    #[doc = "```text\n!< High Bandwidth 3 temperature per stack\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_HBM_3: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(6);
    #[doc = "```text\n!< PCIe switch temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_PLX: amdsmi_temperature_type_t = amdsmi_temperature_type_t(7);
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_NODE_FIRST: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(100);
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_NODE_RETIMER_X: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(100);
    #[doc = "```text\n!< OAM X IBC temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_NODE_OAM_X_IBC: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(101);
    #[doc = "```text\n!< OAM X IBC 2 temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_NODE_OAM_X_IBC_2: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(102);
    #[doc = "```text\n!< OAM X VDD 1.8V voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_NODE_OAM_X_VDD18_VR: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(103);
    #[doc = "```text\n!< OAM X 0.4V HBM B voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_NODE_OAM_X_04_HBM_B_VR: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(104);
    #[doc = "```text\n!< OAM X 0.4V HBM D voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_NODE_OAM_X_04_HBM_D_VR: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(105);
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_NODE_LAST: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(149);
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VR_FIRST: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(150);
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_VDD0: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(150);
    #[doc = "```text\n!< VDDCR VDD1 voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_VDD1: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(151);
    #[doc = "```text\n!< VDDCR VDD2 voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_VDD2: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(152);
    #[doc = "```text\n!< VDDCR VDD3 voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_VDD3: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(153);
    #[doc = "```text\n!< VDDCR SOC A voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_SOC_A: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(154);
    #[doc = "```text\n!< VDDCR SOC C voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_SOC_C: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(155);
    #[doc = "```text\n!< VDDCR SOCIO A voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_SOCIO_A: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(156);
    #[doc = "```text\n!< VDDCR SOCIO C voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_SOCIO_C: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(157);
    #[doc = "```text\n!< VDD 0.85V HBM voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDD_085_HBM: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(158);
    #[doc = "```text\n!< VDDCR 1.1V HBM B voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_11_HBM_B: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(159);
    #[doc = "```text\n!< VDDCR 1.1V HBM D voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_11_HBM_D: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(160);
    #[doc = "```text\n!< VDD USR voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDD_USR: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(161);
    #[doc = "```text\n!< VDDIO 1.1V E32 voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDIO_11_E32: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(162);
    pub const AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VR_LAST: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(199);
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_FIRST: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(200);
    #[doc = "```text\n!< UBB FPGA temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_UBB_FPGA: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(200);
    #[doc = "```text\n!< UBB front temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_UBB_FRONT: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(201);
    #[doc = "```text\n!< UBB back temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_UBB_BACK: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(202);
    #[doc = "```text\n!< UBB OAM7 temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_UBB_OAM7: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(203);
    #[doc = "```text\n!< UBB IBC temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_UBB_IBC: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(204);
    #[doc = "```text\n!< UBB UFPGA temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_UBB_UFPGA: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(205);
    #[doc = "```text\n!< UBB OAM1 temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_UBB_OAM1: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(206);
    #[doc = "```text\n!< OAM 0-1 HSC temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_OAM_0_1_HSC: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(207);
    #[doc = "```text\n!< OAM 2-3 HSC temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_OAM_2_3_HSC: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(208);
    #[doc = "```text\n!< OAM 4-5 HSC temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_OAM_4_5_HSC: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(209);
    #[doc = "```text\n!< OAM 6-7 HSC temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_OAM_6_7_HSC: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(210);
    #[doc = "```text\n!< UBB FPGA 0.72V voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_UBB_FPGA_0V72_VR: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(211);
    #[doc = "```text\n!< UBB FPGA 3.3V voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_UBB_FPGA_3V3_VR: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(212);
    #[doc = "```text\n!< Retimer 0-1-2-3 1.2V voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_RETIMER_0_1_2_3_1V2_VR: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(213);
    #[doc = "```text\n!< Retimer 4-5-6-7 1.2V voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_RETIMER_4_5_6_7_1V2_VR: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(214);
    #[doc = "```text\n!< Retimer 0-1 0.9V voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_RETIMER_0_1_0V9_VR: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(215);
    #[doc = "```text\n!< Retimer 4-5 0.9V voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_RETIMER_4_5_0V9_VR: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(216);
    #[doc = "```text\n!< Retimer 2-3 0.9V voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_RETIMER_2_3_0V9_VR: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(217);
    #[doc = "```text\n!< Retimer 6-7 0.9V voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_RETIMER_6_7_0V9_VR: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(218);
    #[doc = "```text\n!< OAM 0-1-2-3 3.3V voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_OAM_0_1_2_3_3V3_VR: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(219);
    #[doc = "```text\n!< OAM 4-5-6-7 3.3V voltage regulator temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_OAM_4_5_6_7_3V3_VR: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(220);
    #[doc = "```text\n!< IBC HSC temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_IBC_HSC: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(221);
    #[doc = "```text\n!< IBC temperature\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_IBC: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(222);
    pub const AMDSMI_TEMPERATURE_TYPE_BASEBOARD_LAST: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(249);
    #[doc = "```text\n!< Maximum per GPU temperature type\n```"]
    pub const AMDSMI_TEMPERATURE_TYPE__MAX: amdsmi_temperature_type_t =
        amdsmi_temperature_type_t(249);
}
#[repr(transparent)]
#[doc = "```text\n @brief This enumeration is used to indicate from which part of the processor a\n temperature reading should be obtained.\n\n @cond @tag{gpu_bm_linux} @tag{host} @tag{guest_windows} @endcond\n```"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct amdsmi_temperature_type_t(pub ::std::os::raw::c_uint);
#[doc = "```text\n @brief ASIC Information\n\n @cond @tag{gpu_bm_linux} @tag{guest_windows} @tag{host} @endcond\n```"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_asic_info_t {
    pub market_name: [::std::os::raw::c_char; 256usize],
    #[doc = "```text\n!< Use 32 bit to be compatible with other platform.\n```"]
    pub vendor_id: u32,
    pub vendor_name: [::std::os::raw::c_char; 256usize],
    #[doc = "```text\n!< The subsystem vendor ID\n```"]
    pub subvendor_id: u32,
    #[doc = "```text\n!< The device ID of a GPU\n```"]
    pub device_id: u64,
    #[doc = "```text\n!< The revision ID of a GPU\n```"]
    pub rev_id: u32,
    pub asic_serial: [::std::os::raw::c_char; 256usize],
    #[doc = "```text\n!< 0xFFFFFFFF if not supported\n```"]
    pub oam_id: u32,
    #[doc = "```text\n!< 0xFFFFFFFF if not supported\n```"]
    pub num_of_compute_units: u32,
    #[doc = "```text\n!< 0xFFFFFFFFFFFFFFFF if not supported\n```"]
    pub target_graphics_version: u64,
    pub subsystem_id: u32,
    #[doc = "```text\n!> The subsystem ID\n```"]
    pub reserved: [u32; 21usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_asic_info_t"][::std::mem::size_of::<amdsmi_asic_info_t>() - 896usize];
    ["Alignment of amdsmi_asic_info_t"][::std::mem::align_of::<amdsmi_asic_info_t>() - 8usize];
    ["Offset of field: amdsmi_asic_info_t::market_name"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, market_name) - 0usize];
    ["Offset of field: amdsmi_asic_info_t::vendor_id"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, vendor_id) - 256usize];
    ["Offset of field: amdsmi_asic_info_t::vendor_name"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, vendor_name) - 260usize];
    ["Offset of field: amdsmi_asic_info_t::subvendor_id"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, subvendor_id) - 516usize];
    ["Offset of field: amdsmi_asic_info_t::device_id"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, device_id) - 520usize];
    ["Offset of field: amdsmi_asic_info_t::rev_id"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, rev_id) - 528usize];
    ["Offset of field: amdsmi_asic_info_t::asic_serial"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, asic_serial) - 532usize];
    ["Offset of field: amdsmi_asic_info_t::oam_id"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, oam_id) - 788usize];
    ["Offset of field: amdsmi_asic_info_t::num_of_compute_units"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, num_of_compute_units) - 792usize];
    ["Offset of field: amdsmi_asic_info_t::target_graphics_version"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, target_graphics_version) - 800usize];
    ["Offset of field: amdsmi_asic_info_t::subsystem_id"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, subsystem_id) - 808usize];
    ["Offset of field: amdsmi_asic_info_t::reserved"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, reserved) - 812usize];
};
#[doc = "```text\n @brief Power Information\n\n Unsupported struct members are set to UINT32_MAX\n\n @cond @tag{gpu_bm_linux} @endcond\n```"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_power_info_t {
    #[doc = "```text\n!< Socket power in W\n```"]
    pub socket_power: u64,
    #[doc = "```text\n!< Current socket power in W, Mi 300+ Series cards\n```"]
    pub current_socket_power: u32,
    #[doc = "```text\n!< Average socket power in W, Navi + Mi 200 and earlier Series cards\n```"]
    pub average_socket_power: u32,
    #[doc = "```text\n!< GFX voltage measurement in mV\n```"]
    pub gfx_voltage: u64,
    #[doc = "```text\n!< SOC voltage measurement in mV\n```"]
    pub soc_voltage: u64,
    #[doc = "```text\n!< MEM voltage measurement in mV\n```"]
    pub mem_voltage: u64,
    #[doc = "```text\n!< The power limit in W\n```"]
    pub power_limit: u32,
    pub reserved: [u64; 18usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_power_info_t"][::std::mem::size_of::<amdsmi_power_info_t>() - 192usize];
    ["Alignment of amdsmi_power_info_t"][::std::mem::align_of::<amdsmi_power_info_t>() - 8usize];
    ["Offset of field: amdsmi_power_info_t::socket_power"]
        [::std::mem::offset_of!(amdsmi_power_info_t, socket_power) - 0usize];
    ["Offset of field: amdsmi_power_info_t::current_socket_power"]
        [::std::mem::offset_of!(amdsmi_power_info_t, current_socket_power) - 8usize];
    ["Offset of field: amdsmi_power_info_t::average_socket_power"]
        [::std::mem::offset_of!(amdsmi_power_info_t, average_socket_power) - 12usize];
    ["Offset of field: amdsmi_power_info_t::gfx_voltage"]
        [::std::mem::offset_of!(amdsmi_power_info_t, gfx_voltage) - 16usize];
    ["Offset of field: amdsmi_power_info_t::soc_voltage"]
        [::std::mem::offset_of!(amdsmi_power_info_t, soc_voltage) - 24usize];
    ["Offset of field: amdsmi_power_info_t::mem_voltage"]
        [::std::mem::offset_of!(amdsmi_power_info_t, mem_voltage) - 32usize];
    ["Offset of field: amdsmi_power_info_t::power_limit"]
        [::std::mem::offset_of!(amdsmi_power_info_t, power_limit) - 40usize];
    ["Offset of field: amdsmi_power_info_t::reserved"]
        [::std::mem::offset_of!(amdsmi_power_info_t, reserved) - 48usize];
};
#[doc = "```text\n @brief Clock Information\n\n @cond @tag{gpu_bm_linux} @tag{guest_windows} @tag{host} @endcond\n```"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_clk_info_t {
    #[doc = "```text\n!< In MHz\n```"]
    pub clk: u32,
    #[doc = "```text\n!< In MHz\n```"]
    pub min_clk: u32,
    #[doc = "```text\n!< In MHz\n```"]
    pub max_clk: u32,
    #[doc = "```text\n!< True/False\n```"]
    pub clk_locked: u8,
    #[doc = "```text\n!< True/False\n```"]
    pub clk_deep_sleep: u8,
    pub reserved: [u32; 4usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_clk_info_t"][::std::mem::size_of::<amdsmi_clk_info_t>() - 32usize];
    ["Alignment of amdsmi_clk_info_t"][::std::mem::align_of::<amdsmi_clk_info_t>() - 4usize];
    ["Offset of field: amdsmi_clk_info_t::clk"]
        [::std::mem::offset_of!(amdsmi_clk_info_t, clk) - 0usize];
    ["Offset of field: amdsmi_clk_info_t::min_clk"]
        [::std::mem::offset_of!(amdsmi_clk_info_t, min_clk) - 4usize];
    ["Offset of field: amdsmi_clk_info_t::max_clk"]
        [::std::mem::offset_of!(amdsmi_clk_info_t, max_clk) - 8usize];
    ["Offset of field: amdsmi_clk_info_t::clk_locked"]
        [::std::mem::offset_of!(amdsmi_clk_info_t, clk_locked) - 12usize];
    ["Offset of field: amdsmi_clk_info_t::clk_deep_sleep"]
        [::std::mem::offset_of!(amdsmi_clk_info_t, clk_deep_sleep) - 13usize];
    ["Offset of field: amdsmi_clk_info_t::reserved"]
        [::std::mem::offset_of!(amdsmi_clk_info_t, reserved) - 16usize];
};
#[doc = "```text\n @brief Engine Usage\n amdsmi_engine_usage_t:\n This structure holds common\n GPU activity values seen in both BM or\n SRIOV\n\n @cond @tag{gpu_bm_linux} @tag{guest_windows} @tag{host} @endcond\n```"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_engine_usage_t {
    #[doc = "```text\n!< In %\n```"]
    pub gfx_activity: u32,
    #[doc = "```text\n!< In %\n```"]
    pub umc_activity: u32,
    #[doc = "```text\n!< In %\n```"]
    pub mm_activity: u32,
    pub reserved: [u32; 13usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_engine_usage_t"][::std::mem::size_of::<amdsmi_engine_usage_t>() - 64usize];
    ["Alignment of amdsmi_engine_usage_t"]
        [::std::mem::align_of::<amdsmi_engine_usage_t>() - 4usize];
    ["Offset of field: amdsmi_engine_usage_t::gfx_activity"]
        [::std::mem::offset_of!(amdsmi_engine_usage_t, gfx_activity) - 0usize];
    ["Offset of field: amdsmi_engine_usage_t::umc_activity"]
        [::std::mem::offset_of!(amdsmi_engine_usage_t, umc_activity) - 4usize];
    ["Offset of field: amdsmi_engine_usage_t::mm_activity"]
        [::std::mem::offset_of!(amdsmi_engine_usage_t, mm_activity) - 8usize];
    ["Offset of field: amdsmi_engine_usage_t::reserved"]
        [::std::mem::offset_of!(amdsmi_engine_usage_t, reserved) - 12usize];
};
#[doc = "```text\n @brief Process Handle\n\n @cond @tag{gpu_bm_linux} @tag{guest_windows} @endcond\n```"]
pub type amdsmi_process_handle_t = u32;
#[doc = "```text\n @brief Process Information\n\n @cond @tag{gpu_bm_linux} @tag{guest_windows} @endcond\n```"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_proc_info_t {
    pub name: [::std::os::raw::c_char; 256usize],
    pub pid: amdsmi_process_handle_t,
    #[doc = "```text\n!< In Bytes\n```"]
    pub mem: u64,
    #[doc = "```text\n!< time the process spends using these engines in ns\n```"]
    pub engine_usage: amdsmi_proc_info_t_engine_usage_,
    #[doc = "```text\n!< In Bytes\n```"]
    pub memory_usage: amdsmi_proc_info_t_memory_usage_,
    pub container_name: [::std::os::raw::c_char; 256usize],
    #[doc = "```text\n!< Num CUs utilized\n```"]
    pub cu_occupancy: u32,
    #[doc = "```text\n!< Time that queues are evicted on a GPU in milliseconds\n```"]
    pub evicted_time: u32,
    pub reserved: [u32; 10usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_proc_info_t_engine_usage_ {
    #[doc = "```text\n!< In nano-secs\n```"]
    pub gfx: u64,
    #[doc = "```text\n!< In nano-secs\n```"]
    pub enc: u64,
    pub reserved: [u32; 12usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_proc_info_t_engine_usage_"]
        [::std::mem::size_of::<amdsmi_proc_info_t_engine_usage_>() - 64usize];
    ["Alignment of amdsmi_proc_info_t_engine_usage_"]
        [::std::mem::align_of::<amdsmi_proc_info_t_engine_usage_>() - 8usize];
    ["Offset of field: amdsmi_proc_info_t_engine_usage_::gfx"]
        [::std::mem::offset_of!(amdsmi_proc_info_t_engine_usage_, gfx) - 0usize];
    ["Offset of field: amdsmi_proc_info_t_engine_usage_::enc"]
        [::std::mem::offset_of!(amdsmi_proc_info_t_engine_usage_, enc) - 8usize];
    ["Offset of field: amdsmi_proc_info_t_engine_usage_::reserved"]
        [::std::mem::offset_of!(amdsmi_proc_info_t_engine_usage_, reserved) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_proc_info_t_memory_usage_ {
    #[doc = "```text\n!< In Bytes\n```"]
    pub gtt_mem: u64,
    #[doc = "```text\n!< In Bytes\n```"]
    pub cpu_mem: u64,
    #[doc = "```text\n!< In Bytes\n```"]
    pub vram_mem: u64,
    pub reserved: [u32; 10usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_proc_info_t_memory_usage_"]
        [::std::mem::size_of::<amdsmi_proc_info_t_memory_usage_>() - 64usize];
    ["Alignment of amdsmi_proc_info_t_memory_usage_"]
        [::std::mem::align_of::<amdsmi_proc_info_t_memory_usage_>() - 8usize];
    ["Offset of field: amdsmi_proc_info_t_memory_usage_::gtt_mem"]
        [::std::mem::offset_of!(amdsmi_proc_info_t_memory_usage_, gtt_mem) - 0usize];
    ["Offset of field: amdsmi_proc_info_t_memory_usage_::cpu_mem"]
        [::std::mem::offset_of!(amdsmi_proc_info_t_memory_usage_, cpu_mem) - 8usize];
    ["Offset of field: amdsmi_proc_info_t_memory_usage_::vram_mem"]
        [::std::mem::offset_of!(amdsmi_proc_info_t_memory_usage_, vram_mem) - 16usize];
    ["Offset of field: amdsmi_proc_info_t_memory_usage_::reserved"]
        [::std::mem::offset_of!(amdsmi_proc_info_t_memory_usage_, reserved) - 24usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_proc_info_t"][::std::mem::size_of::<amdsmi_proc_info_t>() - 704usize];
    ["Alignment of amdsmi_proc_info_t"][::std::mem::align_of::<amdsmi_proc_info_t>() - 8usize];
    ["Offset of field: amdsmi_proc_info_t::name"]
        [::std::mem::offset_of!(amdsmi_proc_info_t, name) - 0usize];
    ["Offset of field: amdsmi_proc_info_t::pid"]
        [::std::mem::offset_of!(amdsmi_proc_info_t, pid) - 256usize];
    ["Offset of field: amdsmi_proc_info_t::mem"]
        [::std::mem::offset_of!(amdsmi_proc_info_t, mem) - 264usize];
    ["Offset of field: amdsmi_proc_info_t::engine_usage"]
        [::std::mem::offset_of!(amdsmi_proc_info_t, engine_usage) - 272usize];
    ["Offset of field: amdsmi_proc_info_t::memory_usage"]
        [::std::mem::offset_of!(amdsmi_proc_info_t, memory_usage) - 336usize];
    ["Offset of field: amdsmi_proc_info_t::container_name"]
        [::std::mem::offset_of!(amdsmi_proc_info_t, container_name) - 400usize];
    ["Offset of field: amdsmi_proc_info_t::cu_occupancy"]
        [::std::mem::offset_of!(amdsmi_proc_info_t, cu_occupancy) - 656usize];
    ["Offset of field: amdsmi_proc_info_t::evicted_time"]
        [::std::mem::offset_of!(amdsmi_proc_info_t, evicted_time) - 660usize];
    ["Offset of field: amdsmi_proc_info_t::reserved"]
        [::std::mem::offset_of!(amdsmi_proc_info_t, reserved) - 664usize];
};
impl amdsmi_temperature_metric_t {
    #[doc = "```text\n!< Current temperature\n```"]
    pub const AMDSMI_TEMP_CURRENT: amdsmi_temperature_metric_t = amdsmi_temperature_metric_t(0);
    pub const AMDSMI_TEMP_FIRST: amdsmi_temperature_metric_t = amdsmi_temperature_metric_t(0);
    #[doc = "```text\n!< Max temperature\n```"]
    pub const AMDSMI_TEMP_MAX: amdsmi_temperature_metric_t = amdsmi_temperature_metric_t(1);
    #[doc = "```text\n!< Min temperature\n```"]
    pub const AMDSMI_TEMP_MIN: amdsmi_temperature_metric_t = amdsmi_temperature_metric_t(2);
    #[doc = "```text\n< Max limit hysteresis temperature\n(Absolute temperature, not a delta)\n```"]
    pub const AMDSMI_TEMP_MAX_HYST: amdsmi_temperature_metric_t = amdsmi_temperature_metric_t(3);
    #[doc = "```text\n< Min limit hysteresis temperature\n(Absolute temperature, not a delta)\n```"]
    pub const AMDSMI_TEMP_MIN_HYST: amdsmi_temperature_metric_t = amdsmi_temperature_metric_t(4);
    #[doc = "```text\n< Critical max limit temperature, typically\ngreater than max temperatures\n```"]
    pub const AMDSMI_TEMP_CRITICAL: amdsmi_temperature_metric_t = amdsmi_temperature_metric_t(5);
    #[doc = "```text\n< Critical hysteresis limit temperature\n(Absolute temperature, not a delta)\n```"]
    pub const AMDSMI_TEMP_CRITICAL_HYST: amdsmi_temperature_metric_t =
        amdsmi_temperature_metric_t(6);
    #[doc = "```text\n< Emergency max temperature, for chips\nsupporting more than two upper temperature\nlimits. Must be equal or greater than\ncorresponding temp_crit values\n```"]
    pub const AMDSMI_TEMP_EMERGENCY: amdsmi_temperature_metric_t = amdsmi_temperature_metric_t(7);
    #[doc = "```text\n< Emergency hysteresis limit temperature\n(Absolute temperature, not a delta)\n```"]
    pub const AMDSMI_TEMP_EMERGENCY_HYST: amdsmi_temperature_metric_t =
        amdsmi_temperature_metric_t(8);
    #[doc = "```text\n< Critical min temperature, typically\nlower than minimum temperatures\n```"]
    pub const AMDSMI_TEMP_CRIT_MIN: amdsmi_temperature_metric_t = amdsmi_temperature_metric_t(9);
    #[doc = "```text\n< Min Hysteresis critical limit temperature\n(Absolute temperature, not a delta)\n```"]
    pub const AMDSMI_TEMP_CRIT_MIN_HYST: amdsmi_temperature_metric_t =
        amdsmi_temperature_metric_t(10);
    #[doc = "```text\n< Temperature offset which is added to the\ntemperature reading by the chip\n```"]
    pub const AMDSMI_TEMP_OFFSET: amdsmi_temperature_metric_t = amdsmi_temperature_metric_t(11);
    #[doc = "```text\n!< Historical min temperature\n```"]
    pub const AMDSMI_TEMP_LOWEST: amdsmi_temperature_metric_t = amdsmi_temperature_metric_t(12);
    #[doc = "```text\n!< Historical max temperature\n```"]
    pub const AMDSMI_TEMP_HIGHEST: amdsmi_temperature_metric_t = amdsmi_temperature_metric_t(13);
    #[doc = "```text\n!< Shutdown temperature\n```"]
    pub const AMDSMI_TEMP_SHUTDOWN: amdsmi_temperature_metric_t = amdsmi_temperature_metric_t(14);
    pub const AMDSMI_TEMP_LAST: amdsmi_temperature_metric_t = amdsmi_temperature_metric_t(14);
}
#[repr(transparent)]
#[doc = "```text\n @brief Temperature Metrics. This enum is used to identify various\n temperature metrics. Corresponding values will be in Celcius\n\n @cond @tag{gpu_bm_linux} @tag{host} @tag{guest_windows} @endcond\n```"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct amdsmi_temperature_metric_t(pub ::std::os::raw::c_uint);
impl amdsmi_voltage_metric_t {
    #[doc = "```text\n!< Voltage current value.\n```"]
    pub const AMDSMI_VOLT_CURRENT: amdsmi_voltage_metric_t = amdsmi_voltage_metric_t(0);
    pub const AMDSMI_VOLT_FIRST: amdsmi_voltage_metric_t = amdsmi_voltage_metric_t(0);
    #[doc = "```text\n!< Voltage max value.\n```"]
    pub const AMDSMI_VOLT_MAX: amdsmi_voltage_metric_t = amdsmi_voltage_metric_t(1);
    #[doc = "```text\n!< Voltage critical min value.\n```"]
    pub const AMDSMI_VOLT_MIN_CRIT: amdsmi_voltage_metric_t = amdsmi_voltage_metric_t(2);
    #[doc = "```text\n!< Voltage min value.\n```"]
    pub const AMDSMI_VOLT_MIN: amdsmi_voltage_metric_t = amdsmi_voltage_metric_t(3);
    #[doc = "```text\n!< Voltage critical max value.\n```"]
    pub const AMDSMI_VOLT_MAX_CRIT: amdsmi_voltage_metric_t = amdsmi_voltage_metric_t(4);
    #[doc = "```text\n!< Average voltage.\n```"]
    pub const AMDSMI_VOLT_AVERAGE: amdsmi_voltage_metric_t = amdsmi_voltage_metric_t(5);
    #[doc = "```text\n!< Historical minimum voltage.\n```"]
    pub const AMDSMI_VOLT_LOWEST: amdsmi_voltage_metric_t = amdsmi_voltage_metric_t(6);
    #[doc = "```text\n!< Historical maximum voltage.\n```"]
    pub const AMDSMI_VOLT_HIGHEST: amdsmi_voltage_metric_t = amdsmi_voltage_metric_t(7);
    pub const AMDSMI_VOLT_LAST: amdsmi_voltage_metric_t = amdsmi_voltage_metric_t(7);
}
#[repr(transparent)]
#[doc = "```text\n @brief Voltage Metrics.  This enum is used to identify various\n Volatge metrics. Corresponding values will be in millivolt.\n\n @cond @tag{gpu_bm_linux} @endcond\n```"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct amdsmi_voltage_metric_t(pub ::std::os::raw::c_uint);
impl amdsmi_voltage_type_t {
    pub const AMDSMI_VOLT_TYPE_FIRST: amdsmi_voltage_type_t = amdsmi_voltage_type_t(0);
    #[doc = "```text\n!< Vddgfx GPU voltage\n```"]
    pub const AMDSMI_VOLT_TYPE_VDDGFX: amdsmi_voltage_type_t = amdsmi_voltage_type_t(0);
    #[doc = "```text\n!< Voltage for VDDBOARD\n```"]
    pub const AMDSMI_VOLT_TYPE_VDDBOARD: amdsmi_voltage_type_t = amdsmi_voltage_type_t(1);
    pub const AMDSMI_VOLT_TYPE_LAST: amdsmi_voltage_type_t = amdsmi_voltage_type_t(1);
    #[doc = "```text\n!< Invalid type\n```"]
    pub const AMDSMI_VOLT_TYPE_INVALID: amdsmi_voltage_type_t = amdsmi_voltage_type_t(4294967295);
}
#[repr(transparent)]
#[doc = "```text\n @brief This ennumeration is used to indicate which type of\n voltage reading should be obtained.\n\n @cond @tag{gpu_bm_linux} @endcond\n```"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct amdsmi_voltage_type_t(pub ::std::os::raw::c_uint);
impl amdsmi_memory_type_t {
    pub const AMDSMI_MEM_TYPE_FIRST: amdsmi_memory_type_t = amdsmi_memory_type_t(0);
    #[doc = "```text\n!< VRAM memory\n```"]
    pub const AMDSMI_MEM_TYPE_VRAM: amdsmi_memory_type_t = amdsmi_memory_type_t(0);
    #[doc = "```text\n!< VRAM memory that is visible\n```"]
    pub const AMDSMI_MEM_TYPE_VIS_VRAM: amdsmi_memory_type_t = amdsmi_memory_type_t(1);
    #[doc = "```text\n!< GTT memory\n```"]
    pub const AMDSMI_MEM_TYPE_GTT: amdsmi_memory_type_t = amdsmi_memory_type_t(2);
    pub const AMDSMI_MEM_TYPE_LAST: amdsmi_memory_type_t = amdsmi_memory_type_t(2);
}
#[repr(transparent)]
#[doc = "```text\n @brief Types of memory\n\n @cond @tag{gpu_bm_linux} @endcond\n```"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct amdsmi_memory_type_t(pub ::std::os::raw::c_uint);
pub struct libamd_smi {
    __library: ::libloading::Library,
    pub amdsmi_init:
        Result<unsafe extern "C" fn(init_flags: u64) -> amdsmi_status_t, ::libloading::Error>,
    pub amdsmi_shut_down: Result<unsafe extern "C" fn() -> amdsmi_status_t, ::libloading::Error>,
    pub amdsmi_get_socket_handles: Result<
        unsafe extern "C" fn(
            socket_count: *mut u32,
            socket_handles: *mut amdsmi_socket_handle,
        ) -> amdsmi_status_t,
        ::libloading::Error,
    >,
    pub amdsmi_get_processor_handles: Result<
        unsafe extern "C" fn(
            socket_handle: amdsmi_socket_handle,
            processor_count: *mut u32,
            processor_handles: *mut amdsmi_processor_handle,
        ) -> amdsmi_status_t,
        ::libloading::Error,
    >,
    pub amdsmi_get_gpu_device_uuid: Result<
        unsafe extern "C" fn(
            processor_handle: amdsmi_processor_handle,
            uuid_length: *mut ::std::os::raw::c_uint,
            uuid: *mut ::std::os::raw::c_char,
        ) -> amdsmi_status_t,
        ::libloading::Error,
    >,
    pub amdsmi_get_gpu_pci_throughput: Result<
        unsafe extern "C" fn(
            processor_handle: amdsmi_processor_handle,
            sent: *mut u64,
            received: *mut u64,
            max_pkt_sz: *mut u64,
        ) -> amdsmi_status_t,
        ::libloading::Error,
    >,
    pub amdsmi_get_energy_count: Result<
        unsafe extern "C" fn(
            processor_handle: amdsmi_processor_handle,
            energy_accumulator: *mut u64,
            counter_resolution: *mut f32,
            timestamp: *mut u64,
        ) -> amdsmi_status_t,
        ::libloading::Error,
    >,
    pub amdsmi_get_gpu_memory_usage: Result<
        unsafe extern "C" fn(
            processor_handle: amdsmi_processor_handle,
            mem_type: amdsmi_memory_type_t,
            used: *mut u64,
        ) -> amdsmi_status_t,
        ::libloading::Error,
    >,
    pub amdsmi_get_gpu_fan_speed: Result<
        unsafe extern "C" fn(
            processor_handle: amdsmi_processor_handle,
            sensor_ind: u32,
            speed: *mut i64,
        ) -> amdsmi_status_t,
        ::libloading::Error,
    >,
    pub amdsmi_get_gpu_volt_metric: Result<
        unsafe extern "C" fn(
            processor_handle: amdsmi_processor_handle,
            sensor_type: amdsmi_voltage_type_t,
            metric: amdsmi_voltage_metric_t,
            voltage: *mut i64,
        ) -> amdsmi_status_t,
        ::libloading::Error,
    >,
    pub amdsmi_status_code_to_string: Result<
        unsafe extern "C" fn(
            status: amdsmi_status_t,
            status_string: *mut *const ::std::os::raw::c_char,
        ) -> amdsmi_status_t,
        ::libloading::Error,
    >,
    pub amdsmi_get_gpu_asic_info: Result<
        unsafe extern "C" fn(
            processor_handle: amdsmi_processor_handle,
            info: *mut amdsmi_asic_info_t,
        ) -> amdsmi_status_t,
        ::libloading::Error,
    >,
    pub amdsmi_get_temp_metric: Result<
        unsafe extern "C" fn(
            processor_handle: amdsmi_processor_handle,
            sensor_type: amdsmi_temperature_type_t,
            metric: amdsmi_temperature_metric_t,
            temperature: *mut i64,
        ) -> amdsmi_status_t,
        ::libloading::Error,
    >,
    pub amdsmi_get_gpu_activity: Result<
        unsafe extern "C" fn(
            processor_handle: amdsmi_processor_handle,
            info: *mut amdsmi_engine_usage_t,
        ) -> amdsmi_status_t,
        ::libloading::Error,
    >,
    pub amdsmi_get_power_info: Result<
        unsafe extern "C" fn(
            processor_handle: amdsmi_processor_handle,
            info: *mut amdsmi_power_info_t,
        ) -> amdsmi_status_t,
        ::libloading::Error,
    >,
    pub amdsmi_is_gpu_power_management_enabled: Result<
        unsafe extern "C" fn(
            processor_handle: amdsmi_processor_handle,
            enabled: *mut bool,
        ) -> amdsmi_status_t,
        ::libloading::Error,
    >,
    pub amdsmi_get_clock_info: Result<
        unsafe extern "C" fn(
            processor_handle: amdsmi_processor_handle,
            clk_type: amdsmi_clk_type_t,
            info: *mut amdsmi_clk_info_t,
        ) -> amdsmi_status_t,
        ::libloading::Error,
    >,
    pub amdsmi_get_gpu_process_list: Result<
        unsafe extern "C" fn(
            processor_handle: amdsmi_processor_handle,
            max_processes: *mut u32,
            list: *mut amdsmi_proc_info_t,
        ) -> amdsmi_status_t,
        ::libloading::Error,
    >,
}
impl libamd_smi {
    pub unsafe fn new<P>(path: P) -> Result<Self, ::libloading::Error>
    where
        P: AsRef<::std::ffi::OsStr>,
    {
        let library = ::libloading::Library::new(path)?;
        Self::from_library(library)
    }
    pub unsafe fn from_library<L>(library: L) -> Result<Self, ::libloading::Error>
    where
        L: Into<::libloading::Library>,
    {
        let __library = library.into();
        let amdsmi_init = __library.get(b"amdsmi_init\0").map(|sym| *sym);
        let amdsmi_shut_down = __library.get(b"amdsmi_shut_down\0").map(|sym| *sym);
        let amdsmi_get_socket_handles = __library
            .get(b"amdsmi_get_socket_handles\0")
            .map(|sym| *sym);
        let amdsmi_get_processor_handles = __library
            .get(b"amdsmi_get_processor_handles\0")
            .map(|sym| *sym);
        let amdsmi_get_gpu_device_uuid = __library
            .get(b"amdsmi_get_gpu_device_uuid\0")
            .map(|sym| *sym);
        let amdsmi_get_gpu_pci_throughput = __library
            .get(b"amdsmi_get_gpu_pci_throughput\0")
            .map(|sym| *sym);
        let amdsmi_get_energy_count = __library.get(b"amdsmi_get_energy_count\0").map(|sym| *sym);
        let amdsmi_get_gpu_memory_usage = __library
            .get(b"amdsmi_get_gpu_memory_usage\0")
            .map(|sym| *sym);
        let amdsmi_get_gpu_fan_speed = __library.get(b"amdsmi_get_gpu_fan_speed\0").map(|sym| *sym);
        let amdsmi_get_gpu_volt_metric = __library
            .get(b"amdsmi_get_gpu_volt_metric\0")
            .map(|sym| *sym);
        let amdsmi_status_code_to_string = __library
            .get(b"amdsmi_status_code_to_string\0")
            .map(|sym| *sym);
        let amdsmi_get_gpu_asic_info = __library.get(b"amdsmi_get_gpu_asic_info\0").map(|sym| *sym);
        let amdsmi_get_temp_metric = __library.get(b"amdsmi_get_temp_metric\0").map(|sym| *sym);
        let amdsmi_get_gpu_activity = __library.get(b"amdsmi_get_gpu_activity\0").map(|sym| *sym);
        let amdsmi_get_power_info = __library.get(b"amdsmi_get_power_info\0").map(|sym| *sym);
        let amdsmi_is_gpu_power_management_enabled = __library
            .get(b"amdsmi_is_gpu_power_management_enabled\0")
            .map(|sym| *sym);
        let amdsmi_get_clock_info = __library.get(b"amdsmi_get_clock_info\0").map(|sym| *sym);
        let amdsmi_get_gpu_process_list = __library
            .get(b"amdsmi_get_gpu_process_list\0")
            .map(|sym| *sym);
        Ok(libamd_smi {
            __library,
            amdsmi_init,
            amdsmi_shut_down,
            amdsmi_get_socket_handles,
            amdsmi_get_processor_handles,
            amdsmi_get_gpu_device_uuid,
            amdsmi_get_gpu_pci_throughput,
            amdsmi_get_energy_count,
            amdsmi_get_gpu_memory_usage,
            amdsmi_get_gpu_fan_speed,
            amdsmi_get_gpu_volt_metric,
            amdsmi_status_code_to_string,
            amdsmi_get_gpu_asic_info,
            amdsmi_get_temp_metric,
            amdsmi_get_gpu_activity,
            amdsmi_get_power_info,
            amdsmi_is_gpu_power_management_enabled,
            amdsmi_get_clock_info,
            amdsmi_get_gpu_process_list,
        })
    }
    #[doc = "```text\n  @brief Initialize the AMD SMI library\n\n  @ingroup tagInitShutdown\n\n  @platform{gpu_bm_linux} @platform{host} @platform{cpu_bm} @platform{guest_1vf}\n  @platform{guest_mvf} @platform{guest_windows}\n\n  @details This function initializes the library and the internal data structures,\n  including those corresponding to sources of information that SMI provides.\n  Singleton Design, requires the same number of inits as shutdowns.\n\n  The @p init_flags decides which type of processor\n  can be discovered by ::amdsmi_get_socket_handles(). AMDSMI_INIT_AMD_GPUS returns\n  sockets with AMD GPUS, and AMDSMI_INIT_AMD_GPUS | AMDSMI_INIT_AMD_CPUS returns\n  sockets with either AMD GPUS or CPUS.\n  Currently, only AMDSMI_INIT_AMD_GPUS is supported.\n\n  @param[in] init_flags Bit flags that tell SMI how to initialze. Values of\n  ::amdsmi_init_flags_t may be OR'd together and passed through @p init_flags\n  to modify how AMDSMI initializes.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail\n```"]
    pub unsafe fn amdsmi_init(&self, init_flags: u64) -> amdsmi_status_t {
        (self
            .amdsmi_init
            .as_ref()
            .expect("Expected function, got error."))(init_flags)
    }
    #[doc = "```text\n  @brief Shutdown the AMD SMI library\n\n  @ingroup tagInitShutdown\n\n  @platform{gpu_bm_linux} @platform{host} @platform{cpu_bm} @platform{guest_1vf}\n  @platform{guest_mvf} @platform{guest_windows}\n\n  @details This function shuts down the library and internal data structures and\n  performs any necessary clean ups. Singleton Design, requires the same number\n  of inits as shutdowns.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail\n```"]
    pub unsafe fn amdsmi_shut_down(&self) -> amdsmi_status_t {
        (self
            .amdsmi_shut_down
            .as_ref()
            .expect("Expected function, got error."))()
    }
    #[doc = "```text\n  @brief Get the list of socket handles in the system.\n\n  @ingroup tagProcDiscovery\n\n  @platform{gpu_bm_linux} @platform{host} @platform{cpu_bm} @platform{guest_1vf}\n  @platform{guest_mvf} @platform{guest_windows}\n\n  @details Depends on what flag is passed to ::amdsmi_init.  AMDSMI_INIT_AMD_GPUS\n  returns sockets with AMD GPUS, and AMDSMI_INIT_AMD_GPUS | AMDSMI_INIT_AMD_CPUS returns\n  sockets with either AMD GPUS or CPUS.\n  The socket handles can be used to query the processor handles in that socket, which\n  will be used in other APIs to get processor detail information or telemtries.\n\n  @param[in,out] socket_count As input, the value passed\n  through this parameter is the number of ::amdsmi_socket_handle that\n  may be safely written to the memory pointed to by @p socket_handles. This is the\n  limit on how many socket handles will be written to @p socket_handles. On return, @p\n  socket_count will contain the number of socket handles written to @p socket_handles,\n  or the number of socket handles that could have been written if enough memory had been\n  provided.\n  If @p socket_handles is NULL, as output, @p socket_count will contain\n  how many sockets are available to read in the system.\n\n  @param[in,out] socket_handles A pointer to a block of memory to which the\n  ::amdsmi_socket_handle values will be written. This value may be NULL.\n  In this case, this function can be used to query how many sockets are\n  available to read in the system.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail\n```"]
    pub unsafe fn amdsmi_get_socket_handles(
        &self,
        socket_count: *mut u32,
        socket_handles: *mut amdsmi_socket_handle,
    ) -> amdsmi_status_t {
        (self
            .amdsmi_get_socket_handles
            .as_ref()
            .expect("Expected function, got error."))(socket_count, socket_handles)
    }
    #[doc = "```text\n  @brief Get the list of the processor handles associated to a socket.\n\n  @ingroup tagProcDiscovery\n\n  @platform{gpu_bm_linux} @platform{host} @platform{guest_1vf}\n  @platform{guest_mvf} @platform{guest_windows}\n\n  @details This function retrieves the processor handles of a socket. The\n  @p socket_handle must be provided for the processor. A socket may have mulitple different\n  type processors: An APU on a socket have both CPUs and GPUs.\n  Currently, only AMD GPUs are supported.\n\n  @note Sockets are not supported on the @platform{host}.\n\n  The number of processor count is returned through @p processor_count\n  if @p processor_handles is NULL. Then the number of @p processor_count can be pass\n  as input to retrieval all processors on the socket to @p processor_handles.\n\n  @param[in] socket_handle The socket to query\n\n  @param[in,out] processor_count As input, the value passed\n  through this parameter is the number of ::amdsmi_processor_handle's that\n  may be safely written to the memory pointed to by @p processor_handles. This is the\n  limit on how many processor handles will be written to @p processor_handles. On return, @p\n  processor_count will contain the number of processor handles written to @p processor_handles,\n  or the number of processor handles that could have been written if enough memory had been\n  provided.\n  If @p processor_handles is NULL, as output, @p processor_count will contain\n  how many processors are available to read for the socket.\n\n  @param[in,out] processor_handles A pointer to a block of memory to which the\n  ::amdsmi_processor_handle values will be written. This value may be NULL.\n  In this case, this function can be used to query how many processors are\n  available to read.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail\n```"]
    pub unsafe fn amdsmi_get_processor_handles(
        &self,
        socket_handle: amdsmi_socket_handle,
        processor_count: *mut u32,
        processor_handles: *mut amdsmi_processor_handle,
    ) -> amdsmi_status_t {
        (self
            .amdsmi_get_processor_handles
            .as_ref()
            .expect("Expected function, got error."))(
            socket_handle,
            processor_count,
            processor_handles,
        )
    }
    #[doc = "```text\n  @brief Returns the UUID of the device\n\n  @ingroup tagProcDiscovery\n\n  @platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf}\n  @platform{guest_windows}\n\n  @param[in] processor_handle Device which to query\n\n  @param[in,out] uuid_length Length of the uuid string. As input, must be\n                 equal or greater than AMDSMI_GPU_UUID_SIZE and be allocated by\n                 user. As output it is the length of the uuid string.\n\n  @param[out] uuid Pointer to string to store the UUID. Must be\n              allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail\n```"]
    pub unsafe fn amdsmi_get_gpu_device_uuid(
        &self,
        processor_handle: amdsmi_processor_handle,
        uuid_length: *mut ::std::os::raw::c_uint,
        uuid: *mut ::std::os::raw::c_char,
    ) -> amdsmi_status_t {
        (self
            .amdsmi_get_gpu_device_uuid
            .as_ref()
            .expect("Expected function, got error."))(processor_handle, uuid_length, uuid)
    }
    #[doc = "```text\n  @brief Get PCIe traffic information. It is not supported on virtual machine guest\n\n  @ingroup tagPCIeQuery\n\n  @platform{gpu_bm_linux}\n\n  @details Give a processor handle @p processor_handle and pointers to a uint64_t's, @p\n  sent, @p received and @p max_pkt_sz, this function will write the number\n  of bytes sent and received in 1 second to @p sent and @p received,\n  respectively. The maximum possible packet size will be written to\n  @p max_pkt_sz.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] sent a pointer to uint64_t to which the number of bytes sent\n  will be written in 1 second. If pointer is NULL, it will be ignored.\n\n  @param[in,out] received a pointer to uint64_t to which the number of bytes\n  received will be written. If pointer is NULL, it will be ignored.\n\n  @param[in,out] max_pkt_sz a pointer to uint64_t to which the maximum packet\n  size will be written. If pointer is NULL, it will be ignored.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail\n```"]
    pub unsafe fn amdsmi_get_gpu_pci_throughput(
        &self,
        processor_handle: amdsmi_processor_handle,
        sent: *mut u64,
        received: *mut u64,
        max_pkt_sz: *mut u64,
    ) -> amdsmi_status_t {
        (self
            .amdsmi_get_gpu_pci_throughput
            .as_ref()
            .expect("Expected function, got error."))(
            processor_handle, sent, received, max_pkt_sz
        )
    }
    #[doc = "```text\n  @brief Get the energy accumulator counter of the processor with provided\n  processor handle. It is not supported on virtual machine guest\n\n  @ingroup tagPowerQuery\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle, a pointer to a uint64_t\n  @p energy_accumulator, and a pointer to a uint64_t @p timestamp, this function\n  will write amount of energy consumed to the uint64_t pointed to by\n  @p energy_accumulator, and the timestamp to the uint64_t pointed to by @p timestamp.\n  This function accumulates all energy consumed.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] energy_accumulator a pointer to uint64_t to which the energy\n  counter will be written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @param[in,out] counter_resolution resolution of the counter @p energy_accumulator in\n  micro Joules\n\n  @param[in,out] timestamp a pointer to uint64_t to which the timestamp\n  will be written. Resolution: 1 ns.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail\n```"]
    pub unsafe fn amdsmi_get_energy_count(
        &self,
        processor_handle: amdsmi_processor_handle,
        energy_accumulator: *mut u64,
        counter_resolution: *mut f32,
        timestamp: *mut u64,
    ) -> amdsmi_status_t {
        (self
            .amdsmi_get_energy_count
            .as_ref()
            .expect("Expected function, got error."))(
            processor_handle,
            energy_accumulator,
            counter_resolution,
            timestamp,
        )
    }
    #[doc = "```text\n  @brief Get the current memory usage\n\n  @ingroup tagMemoryQuery\n\n  @platform{gpu_bm_linux}\n\n  @details This function will write the amount of @p mem_type memory that\n  that is currently being used to the location pointed to by @p used.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] mem_type The type of memory for which the amount being used will\n  be found\n\n  @param[in,out] used a pointer to uint64_t to which the amount of memory\n  currently being used will be written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail\n```"]
    pub unsafe fn amdsmi_get_gpu_memory_usage(
        &self,
        processor_handle: amdsmi_processor_handle,
        mem_type: amdsmi_memory_type_t,
        used: *mut u64,
    ) -> amdsmi_status_t {
        (self
            .amdsmi_get_gpu_memory_usage
            .as_ref()
            .expect("Expected function, got error."))(processor_handle, mem_type, used)
    }
    #[doc = "```text\n  @brief Get the fan speed for the specified device as a value relative to\n  ::AMDSMI_MAX_FAN_SPEED. It is not supported on virtual machine guest\n\n  @ingroup tagPhysicalStateQuery\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle and a pointer to a uint32_t\n  @p speed, this function will write the current fan speed (a value\n  between 0 and the maximum fan speed, ::AMDSMI_MAX_FAN_SPEED) to the uint32_t\n  pointed to by @p speed\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] sensor_ind a 0-based sensor index. Normally, this will be 0.\n  If a device has more than one sensor, it could be greater than 0.\n\n  @param[in,out] speed a pointer to uint32_t to which the speed will be\n  written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail\n```"]
    pub unsafe fn amdsmi_get_gpu_fan_speed(
        &self,
        processor_handle: amdsmi_processor_handle,
        sensor_ind: u32,
        speed: *mut i64,
    ) -> amdsmi_status_t {
        (self
            .amdsmi_get_gpu_fan_speed
            .as_ref()
            .expect("Expected function, got error."))(processor_handle, sensor_ind, speed)
    }
    #[doc = "```text\n  @brief Get the voltage metric value for the specified metric, from the\n  specified voltage sensor on the specified device. It is not supported on\n  virtual machine guest\n\n  @ingroup tagPhysicalStateQuery\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle, a sensor type @p sensor_type, a\n  ::amdsmi_voltage_metric_t @p metric and a pointer to an int64_t @p\n  voltage, this function will write the value of the metric indicated by\n  @p metric and @p sensor_type to the memory location @p voltage.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] sensor_type part of device from which voltage should be\n  obtained. This should come from the enum ::amdsmi_voltage_type_t\n\n  @param[in] metric enum indicated which voltage value should be\n  retrieved\n\n  @param[in,out] voltage a pointer to int64_t to which the voltage\n  will be written, in millivolts.\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail\n```"]
    pub unsafe fn amdsmi_get_gpu_volt_metric(
        &self,
        processor_handle: amdsmi_processor_handle,
        sensor_type: amdsmi_voltage_type_t,
        metric: amdsmi_voltage_metric_t,
        voltage: *mut i64,
    ) -> amdsmi_status_t {
        (self
            .amdsmi_get_gpu_volt_metric
            .as_ref()
            .expect("Expected function, got error."))(
            processor_handle,
            sensor_type,
            metric,
            voltage,
        )
    }
    #[doc = "```text\n  @brief Get a description of a provided AMDSMI error status\n\n  @ingroup tagErrorQuery\n\n  @platform{gpu_bm_linux} @platform{host} @platform{cpu_bm} @platform{guest_1vf} @platform{guest_mvf}\n\n  @details Set the provided pointer to a const char *, @p status_string, to\n  a string containing a description of the provided error code @p status.\n\n  @param[in] status The error status for which a description is desired\n\n  @param[in,out] status_string A pointer to a const char * which will be made\n  to point to a description of the provided error code\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail\n```"]
    pub unsafe fn amdsmi_status_code_to_string(
        &self,
        status: amdsmi_status_t,
        status_string: *mut *const ::std::os::raw::c_char,
    ) -> amdsmi_status_t {
        (self
            .amdsmi_status_code_to_string
            .as_ref()
            .expect("Expected function, got error."))(status, status_string)
    }
    #[doc = "```text\n  @brief Returns the ASIC information for the device\n\n  @ingroup tagAsicBoardInfo\n\n  @platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf}\n  @platform{guest_windows}\n\n  @details This function returns ASIC information such as the product name,\n           the vendor ID, the subvendor ID, the device ID,\n           the revision ID and the serial number.\n\n  @param[in] processor_handle Device which to query\n\n  @param[out] info Reference to static asic information structure.\n              Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail\n```"]
    pub unsafe fn amdsmi_get_gpu_asic_info(
        &self,
        processor_handle: amdsmi_processor_handle,
        info: *mut amdsmi_asic_info_t,
    ) -> amdsmi_status_t {
        (self
            .amdsmi_get_gpu_asic_info
            .as_ref()
            .expect("Expected function, got error."))(processor_handle, info)
    }
    #[doc = "```text\n  @brief Get the temperature metric value for the specified metric, from the\n  specified temperature sensor on the specified device. It is not supported on\n  virtual machine guest\n\n  @ingroup tagGPUMonitor\n\n  @platform{gpu_bm_linux} @platform{host} @platform{guest_windows}\n\n  @details Given a processor handle @p processor_handle, a sensor type @p sensor_type, a\n  ::amdsmi_temperature_metric_t @p metric and a pointer to an int64_t @p\n  temperature, this function will write the value of the metric indicated by\n  @p metric and @p sensor_type to the memory location @p temperature.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] sensor_type part of device from which temperature should be\n  obtained. This should come from the enum ::amdsmi_temperature_type_t\n\n  @param[in] metric enum indicated which temperature value should be\n  retrieved\n\n  @param[in,out] temperature a pointer to int64_t to which the temperature is in Celsius.\n  If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function\n  is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not\n  supported with the provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail\n```"]
    pub unsafe fn amdsmi_get_temp_metric(
        &self,
        processor_handle: amdsmi_processor_handle,
        sensor_type: amdsmi_temperature_type_t,
        metric: amdsmi_temperature_metric_t,
        temperature: *mut i64,
    ) -> amdsmi_status_t {
        (self
            .amdsmi_get_temp_metric
            .as_ref()
            .expect("Expected function, got error."))(
            processor_handle,
            sensor_type,
            metric,
            temperature,
        )
    }
    #[doc = "```text\n  @brief Returns the current usage of the GPU engines (GFX, MM and MEM).\n  Each usage is reported as a percentage from 0-100%.\n\n  @ingroup tagGPUMonitor\n\n  @platform{gpu_bm_linux} @platform{host} @platform{guest_windows}\n\n  @param[in] processor_handle Device which to query\n\n  @param[out] info Reference to the gpu engine usage structure. Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail\n```"]
    pub unsafe fn amdsmi_get_gpu_activity(
        &self,
        processor_handle: amdsmi_processor_handle,
        info: *mut amdsmi_engine_usage_t,
    ) -> amdsmi_status_t {
        (self
            .amdsmi_get_gpu_activity
            .as_ref()
            .expect("Expected function, got error."))(processor_handle, info)
    }
    #[doc = "```text\n  @brief Returns the current power and voltage of the GPU.\n\n  @ingroup tagGPUMonitor\n\n  @platform{gpu_bm_linux} @platform{host} @platform{guest_windows} @platform{guest_1vf}\n\n  @note amdsmi_power_info_t::socket_power metric can rarely spike above the socket power limit in some cases\n  @note unsupported struct members are set to UINT32_MAX\n\n  @param[in] processor_handle PF of a processor for which  to query\n\n  @param[out] info Reference to the gpu power structure. Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail\n```"]
    pub unsafe fn amdsmi_get_power_info(
        &self,
        processor_handle: amdsmi_processor_handle,
        info: *mut amdsmi_power_info_t,
    ) -> amdsmi_status_t {
        (self
            .amdsmi_get_power_info
            .as_ref()
            .expect("Expected function, got error."))(processor_handle, info)
    }
    #[doc = "```text\n  @brief Returns is power management enabled\n\n  @ingroup tagGPUMonitor\n\n  @platform{gpu_bm_linux} @platform{host}\n\n  @param[in] processor_handle PF of a processor for which to query\n\n  @param[out] enabled Reference to bool. Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail\n```"]
    pub unsafe fn amdsmi_is_gpu_power_management_enabled(
        &self,
        processor_handle: amdsmi_processor_handle,
        enabled: *mut bool,
    ) -> amdsmi_status_t {
        (self
            .amdsmi_is_gpu_power_management_enabled
            .as_ref()
            .expect("Expected function, got error."))(processor_handle, enabled)
    }
    #[doc = "```text\n  @brief Returns the measurements of the clocks in the GPU\n         for the GFX and multimedia engines and Memory. This call\n         reports the averages over 1s in MHz. It is not supported\n         on virtual machine guest\n\n  @ingroup tagGPUMonitor\n\n  @platform{gpu_bm_linux} @platform{host} @platform{guest_windows}\n\n  @param[in] processor_handle Device which to query\n\n  @param[in] clk_type Enum representing the clock type to query.\n\n  @param[out] info Reference to the gpu clock structure.\n              Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail\n```"]
    pub unsafe fn amdsmi_get_clock_info(
        &self,
        processor_handle: amdsmi_processor_handle,
        clk_type: amdsmi_clk_type_t,
        info: *mut amdsmi_clk_info_t,
    ) -> amdsmi_status_t {
        (self
            .amdsmi_get_clock_info
            .as_ref()
            .expect("Expected function, got error."))(processor_handle, clk_type, info)
    }
    #[doc = "```text\n  @brief Returns the list of process information running on a given GPU.\n  If pdh.dll is not present on the system, this API returns\n  AMDSMI_STATUS_NOT_SUPPORTED.\n\n  @ingroup tagProcessInfo\n\n  @platform{gpu_bm_linux} @platform{guest_windows}\n\n  @warning IMPORTANT: To get valid return values, at least 1 second needs to pass\n  from starting the program to the first call of this function,\n  and before every following call of this function after that, to get correct values\n\n  @note The user provides a buffer to store the list and the maximum\n        number of processes that can be returned. If the user sets\n        max_processes to 0, the current total number of processes will\n        replace max_processes param. After that, the function needs to be\n        called again, with updated max_processes, to successfully fill the\n        process list, which was previously allocated with max_processes\n\n  @note If the reserved size for processes is smaller than the number of\n        actual processes running. The AMDSMI_STATUS_OUT_OF_RESOURCES is\n        an indication the caller should handle the situation (resize).\n        The max_processes is always changed to reflect the actual size of\n        list of processes running, so the caller knows where it is at.\n\n  @param[in]      processor_handle Device which to query\n\n  @param[in,out]  max_processes Reference to the size of the list buffer in\n                  number of elements. Returns the return number of elements\n                  in list or the number of running processes if equal to 0,\n                  and if given value in param max_processes is less than\n                  number of processes currently running,\n                  AMDSMI_STATUS_OUT_OF_RESOURCES will be returned.\n\n                  For cases where max_process is not zero (0), it specifies the list's size limit.\n                  That is, the maximum size this list will be able to hold. After the list is built\n                  internally, as a return status, we will have AMDSMI_STATUS_OUT_OF_RESOURCES when\n                  the original size limit is smaller than the actual list of processes running.\n                  Hence, the caller is aware the list size needs to be resized, or\n                  AMDSMI_STATUS_SUCCESS otherwise.\n                  Holding a copy of max_process before it is passed in will be helpful for monitoring\n                  the allocations done upon each call since the max_process will permanently be changed\n                  to reflect the actual number of processes running.\n\n  @param[out]     list Reference to a user-provided buffer where the process\n                  list will be returned. This buffer must contain at least\n                  max_processes entries of type amd_proc_info_list_t. Must be allocated\n                  by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success,\n                            | ::AMDSMI_STATUS_OUT_OF_RESOURCES, filled list buffer with data, but number of\n                                actual running processes is larger than the size provided.\n```"]
    pub unsafe fn amdsmi_get_gpu_process_list(
        &self,
        processor_handle: amdsmi_processor_handle,
        max_processes: *mut u32,
        list: *mut amdsmi_proc_info_t,
    ) -> amdsmi_status_t {
        (self
            .amdsmi_get_gpu_process_list
            .as_ref()
            .expect("Expected function, got error."))(processor_handle, max_processes, list)
    }
}
