// Code generated by cmd/gen. DO NOT EDIT. /* * * Copyright (C) 2019-2025 Intel Corporation * * SPDX-License-Identifier: MIT * * @file ze_api.h * @version v1.15-r1.15.31 * */ package gozel import ( "unsafe" "github.com/fumiama/gozel/internal/zecall" ) // ZE_PCI_PROPERTIES_EXT_NAME PCI Properties Extension Name const ZE_PCI_PROPERTIES_EXT_NAME = "ZE_extension_pci_properties" // ZePciPropertiesExtVersion (ze_pci_properties_ext_version_t) PCI Properties Extension Version(s) type ZePciPropertiesExtVersion uintptr const ( ZE_PCI_PROPERTIES_EXT_VERSION_1_0 ZePciPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_PCI_PROPERTIES_EXT_VERSION_1_0 version 1.0 ZE_PCI_PROPERTIES_EXT_VERSION_CURRENT ZePciPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_PCI_PROPERTIES_EXT_VERSION_CURRENT latest known version ZE_PCI_PROPERTIES_EXT_VERSION_FORCE_UINT32 ZePciPropertiesExtVersion = 0x7fffffff // ZE_PCI_PROPERTIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_PCI_PROPERTIES_EXT_VERSION_* ENUMs ) // ZePciAddressExt (ze_pci_address_ext_t) Device PCI address // / // / @details // / - This structure may be passed to ::zeDevicePciGetPropertiesExt as an // / attribute of ::ze_pci_ext_properties_t. // / - A PCI BDF address is the bus:device:function address of the device and // / is useful for locating the device in the PCI switch fabric. type ZePciAddressExt struct { Domain uint32 // Domain [out] PCI domain number Bus uint32 // Bus [out] PCI BDF bus number Device uint32 // Device [out] PCI BDF device number Function uint32 // Function [out] PCI BDF function number } // ZePciSpeedExt (ze_pci_speed_ext_t) Device PCI speed type ZePciSpeedExt struct { Genversion int32 // Genversion [out] The link generation. A value of -1 means that this property is unknown. Width int32 // Width [out] The number of lanes. A value of -1 means that this property is unknown. Maxbandwidth int64 // Maxbandwidth [out] The theoretical maximum bandwidth in bytes/sec (sum of all lanes). A value of -1 means that this property is unknown. } // ZePciExtProperties (ze_pci_ext_properties_t) Static PCI properties type ZePciExtProperties struct { Stype ZeStructureType // Stype [in] type of this structure Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). Address ZePciAddressExt // Address [out] The BDF address Maxspeed ZePciSpeedExt // Maxspeed [out] Fastest port configuration supported by the device (sum of all lanes) } // ZeDevicePciGetPropertiesExt Get PCI properties - address, max speed // / // / @details // / - The application may call this function from simultaneous threads. // / - The implementation of this function should be lock-free. // / // / @remarks // / _Analogues_ // / - None // / // / @returns // / - ::ZE_RESULT_SUCCESS // / - ::ZE_RESULT_ERROR_UNINITIALIZED // / - ::ZE_RESULT_ERROR_DEVICE_LOST // / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY // / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY // / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT // / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE // / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE // / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS // / - ::ZE_RESULT_ERROR_NOT_AVAILABLE // / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET // / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE // / - ::ZE_RESULT_ERROR_UNKNOWN // / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE // / + `nullptr == hDevice` // / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER // / + `nullptr == pPciProperties` func ZeDevicePciGetPropertiesExt( hDevice ZeDeviceHandle, // hDevice [in] handle of the device object. pPciProperties *ZePciExtProperties, // pPciProperties [in,out] returns the PCI properties of the device. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDevicePciGetPropertiesExt", uintptr(hDevice), uintptr(unsafe.Pointer(pPciProperties))) }