Documentation ¶
Overview ¶
Copyright 2024 Shanghai Biren Technology Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
test gen
Copyright 2024 Shanghai Biren Technology Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 Shanghai Biren Technology Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 Shanghai Biren Technology Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func B2S(bs [32]int8) string
- func BRMLVersion() (string, error)
- func BoardPartNumber(device Device) (string, error)
- func ClearEccErrorCounts(device Device, counterType EccCounterType) error
- func ClockInfo(device Device, clockType int) (int, error)
- func CurrentClocksThrottleReasons(device Device) (uint64, error)
- func CurrentPcieLinkGenerattion(device Device) (int, error)
- func CurrentPcieLinkWidth(device Device) (int, error)
- func DecoderUtilization(device Device) (uint32, uint32, error)
- func DeviceBoardPartNumber(device Device) (string, error)
- func DeviceCount() (int, error)
- func DeviceGetIndex(device Device) (int, error)
- func DevicePcieLinkWidth(device Device) (int, error)
- func DevicePhysicalSlotNumber(device Device) (int, error)
- func DeviceResetGPU(device Device) error
- func DeviceUUID(device Device) (string, error)
- func DeviceVendorName(device Device) (string, error)
- func DriverVersion() (string, error)
- func EncoderCapacity(device Device, encoderQueryType EncoderType) (uint32, error)
- func EncoderUtilization(device Device) (uint32, uint32, error)
- func Error2String(result Return) string
- func FirmwareVersion(device Device, firmwareType GPUFirmwareType) (string, error)
- func GetGPUNodeIds(device Device) (int, error)
- func GetSviMode(device Device) (int, error)
- func Init() error
- func MaxClockInfo(device Device, clockType int) (int, error)
- func MaxPcieLinkGeneration(device Device) (int, error)
- func MaxPcieLinkWidth(device Device) (int, error)
- func MemoryErrorCounter(device Device, errorType MemoryErrorType, counterType EccCounterType, ...) (uint64, error)
- func MinorNumber(device Device) (int, error)
- func NumaNode(device Device) (int, error)
- func P2PStatus(device Device, device2 Device) (int, error)
- func PcieReplayCounter(device Device) (int, error)
- func PcieReplayNumberRollovers(device Device) (int, error)
- func PcieThroughput(device Device, counter PcieUtilCounter) (int, error)
- func PowerManagementLimit(device Device) (int, error)
- func PowerManagementLimitConstraints(device Device) (int, int, error)
- func PowerUsage(device Device) (int, error)
- func ProcessName(pid int) (string, error)
- func SetClockFreqs(device Device, clockType ClockType, clockFreq uint32) error
- func Shutdown() error
- func SupaDriverVersion() (int, error)
- func Temperature(device Device, st TemperatureSensors) (int, error)
- func TemperatureThreshold(device Device, tt TemperatureThresholds) (int, error)
- func TotalAerErrors(device Device, errorType AerErrorType) (uint64, error)
- func TotalEccErrors(device Device, errorType MemoryErrorType, counterType EccCounterType) (uint64, error)
- func UmdVersion() (int32, error)
- func ViolationStatus(device Device) (int, error)
- func VirtualizationMode(device Device) (int, error)
- type AerErrorType
- type BrLinkErrorCounter
- type ClockType
- type ComputeMode
- type Device
- type DynamicLibrary
- type EccCounterType
- type EccErrorCounts
- type EnableState
- type EncoderType
- type EventData
- type GPUFirmwareType
- type GPUInfo
- type GpuHealthStatus
- type GpuResetType
- type GpuTopologyLevel
- type GpuUtilization
- type GpuVirtualizationMode
- type Memory
- type MemoryBandwidth
- type MemoryErrorType
- type MemoryLocation
- type P2pLinkType
- type P2pStatus
- type P2pThroughput
- type PciErrorCounter
- type PciInfo
- type PcieUtilCounter
- type PerfPolicyType
- type PowerSamples
- type ProcessInfo
- type ProcessUtilizationSample
- type Pstate
- type RawString
- type Return
- type TemperatureSensors
- type TemperatureThresholds
- type Utilization
- type Value
Constants ¶
const ( // API_VERSION as defined in brml/brml.h:35 API_VERSION = 1 // API_VERSION_STR as defined in brml/brml.h:36 API_VERSION_STR = "1" // VALUE_NOT_AVAILABLE as defined in brml/brml.h:50 VALUE_NOT_AVAILABLE = -1 // DEVICE_PCI_BUS_ID_FMT as defined in brml/brml.h:56 DEVICE_PCI_BUS_ID_FMT = "%08X:%02X:%02X.%01X" // DEVICE_PCI_BUS_ID_BUFFER_SIZE as defined in brml/brml.h:61 DEVICE_PCI_BUS_ID_BUFFER_SIZE = 32 // DEVICE_UUID_BUFFER_SIZE as defined in brml/brml.h:66 DEVICE_UUID_BUFFER_SIZE = 80 // DEVICE_SERIAL_BUFFER_SIZE as defined in brml/brml.h:71 DEVICE_SERIAL_BUFFER_SIZE = 32 // SYSTEM_DRIVER_VERSION_BUFFER_SIZE as defined in brml/brml.h:76 SYSTEM_DRIVER_VERSION_BUFFER_SIZE = 80 // SYSTEM_FIRMWARE_VERSION_BUFFER_SIZE as defined in brml/brml.h:81 SYSTEM_FIRMWARE_VERSION_BUFFER_SIZE = 80 // SYSTEM_BRML_VERSION_BUFFER_SIZE as defined in brml/brml.h:86 SYSTEM_BRML_VERSION_BUFFER_SIZE = 80 // DEVICE_PART_NUMBER_BUFFER_SIZE as defined in brml/brml.h:91 DEVICE_PART_NUMBER_BUFFER_SIZE = 80 // DEVICE_NAME_BUFFER_SIZE as defined in brml/brml.h:96 DEVICE_NAME_BUFFER_SIZE = 64 // DEVICE_SVI_DISABLE as defined in brml/brml.h:111 DEVICE_SVI_DISABLE = 0 // DEVICE_SVI_ENABLE as defined in brml/brml.h:116 DEVICE_SVI_ENABLE = 1 // DEVICE_SVI_MODE0 as defined in brml/brml.h:121 DEVICE_SVI_MODE0 = 1 // DEVICE_SVI_MODE1 as defined in brml/brml.h:126 DEVICE_SVI_MODE1 = 2 // DEVICE_SVI_MODE2 as defined in brml/brml.h:131 DEVICE_SVI_MODE2 = 4 // ClocksThrottleReasonHwSlowdown as defined in brml/brml.h:152 ClocksThrottleReasonHwSlowdown = 1 // ClocksThrottleReasonHwThermalSlowdown as defined in brml/brml.h:163 ClocksThrottleReasonHwThermalSlowdown = 2 // ClocksThrottleReasonHwPowerBrakeSlowdown as defined in brml/brml.h:174 ClocksThrottleReasonHwPowerBrakeSlowdown = 4 // ClocksThrottleReasonAll as defined in brml/brml.h:179 ClocksThrottleReasonAll = 7 // EventTypeTopology as defined in brml/brml.h:192 EventTypeTopology = 2 // EventTypeThermal as defined in brml/brml.h:195 EventTypeThermal = 4 // EventTypeNone as defined in brml/brml.h:198 EventTypeNone = 0 // EventTypeAll as defined in brml/brml.h:201 EventTypeAll = 6 )
const ( RTLD_LAZY = C.RTLD_LAZY RTLD_NOW = C.RTLD_NOW RTLD_GLOBAL = C.RTLD_GLOBAL RTLD_LOCAL = C.RTLD_LOCAL RTLD_NODELETE = C.RTLD_NODELETE RTLD_NOLOAD = C.RTLD_NOLOAD RTLD_DEEPBIND = C.RTLD_DEEPBIND DEFAULT_BUFFER_SIZE = 64 )
const (
SYSTEM_PROCESS_NAME_BUFFER_SIZE = 256
)
Variables ¶
This section is empty.
Functions ¶
func BRMLVersion ¶
func BoardPartNumber ¶
func ClearEccErrorCounts ¶
func ClearEccErrorCounts(device Device, counterType EccCounterType) error
func CurrentPcieLinkWidth ¶
func DeviceBoardPartNumber ¶
func DeviceCount ¶
func DeviceGetIndex ¶
func DevicePcieLinkWidth ¶
func DeviceResetGPU ¶
func DeviceUUID ¶
func DeviceVendorName ¶
func DriverVersion ¶
func EncoderCapacity ¶
func EncoderCapacity(device Device, encoderQueryType EncoderType) (uint32, error)
func Error2String ¶
func FirmwareVersion ¶
func FirmwareVersion(device Device, firmwareType GPUFirmwareType) (string, error)
func GetGPUNodeIds ¶
func GetSviMode ¶
func MaxPcieLinkGeneration ¶
func MaxPcieLinkWidth ¶
func MemoryErrorCounter ¶
func MemoryErrorCounter(device Device, errorType MemoryErrorType, counterType EccCounterType, locationType MemoryLocation) (uint64, error)
func MinorNumber ¶
func PcieReplayCounter ¶
func PcieThroughput ¶
func PcieThroughput(device Device, counter PcieUtilCounter) (int, error)
func PowerManagementLimit ¶
func PowerUsage ¶
func ProcessName ¶
func SupaDriverVersion ¶
func Temperature ¶
func Temperature(device Device, st TemperatureSensors) (int, error)
func TemperatureThreshold ¶
func TemperatureThreshold(device Device, tt TemperatureThresholds) (int, error)
func TotalAerErrors ¶
func TotalAerErrors(device Device, errorType AerErrorType) (uint64, error)
func TotalEccErrors ¶
func TotalEccErrors(device Device, errorType MemoryErrorType, counterType EccCounterType) (uint64, error)
func UmdVersion ¶
func ViolationStatus ¶
func VirtualizationMode ¶
Types ¶
type AerErrorType ¶
type AerErrorType int32
AerErrorType as declared in brml/brml.h:302
const ( AER_ERROR_TYPE_CORRECTED AerErrorType = iota AER_ERROR_TYPE_FATAL AerErrorType = 1 AER_ERROR_TYPE_NONFATAL AerErrorType = 2 AER_ERROR_TYPE_COUNT AerErrorType = 3 )
AerErrorType enumeration from brml/brml.h:302
type BrLinkErrorCounter ¶
type BrLinkErrorCounter int32
BrLinkErrorCounter as declared in brml/brml.h:492
const ( BRLINK_ERROR_DL_REPLAY BrLinkErrorCounter = iota BRLINK_ERROR_DL_RECOVERY BrLinkErrorCounter = 1 BRLINK_ERROR_DL_CRC_FLIT BrLinkErrorCounter = 2 BRLINK_ERROR_DL_CRC_DATA BrLinkErrorCounter = 3 BRLINK_ERROR_COUNT BrLinkErrorCounter = 4 )
BrLinkErrorCounter enumeration from brml/brml.h:492
type ComputeMode ¶
type ComputeMode int32
ComputeMode as declared in brml/brml.h:461
const ( COMPUTEMODE_DEFAULT ComputeMode = iota COMPUTEMODE_EXCLUSIVE_PROCESS ComputeMode = 1 COMPUTEMODE_PROHIBITED ComputeMode = 2 COMPUTEMODE_COUNT ComputeMode = 3 )
ComputeMode enumeration from brml/brml.h:461
type Device ¶
type Device *_Ctype_struct_brmlDevice_st
func HandleByIndex ¶
func HandleByNodeID ¶
func HandleByPciBusID ¶
type DynamicLibrary ¶
func New ¶
func New(name string, flags int) *DynamicLibrary
func (*DynamicLibrary) Close ¶
func (dl *DynamicLibrary) Close() error
func (*DynamicLibrary) Lookup ¶
func (dl *DynamicLibrary) Lookup(symbol string) error
func (*DynamicLibrary) Open ¶
func (dl *DynamicLibrary) Open() error
type EccCounterType ¶
type EccCounterType int32
EccCounterType as declared in brml/brml.h:314
const ( VOLATILE_ECC EccCounterType = iota ECC_COUNTER_TYPE_COUNT EccCounterType = 1 )
EccCounterType enumeration from brml/brml.h:314
type EccErrorCounts ¶
type EccErrorCounts struct {
DeviceMemory uint64
}
func NewEccErrorCounts ¶
func NewEccErrorCounts() *EccErrorCounts
NewEccErrorCounts allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewEccErrorCountsRef ¶
func NewEccErrorCountsRef(ref unsafe.Pointer) *EccErrorCounts
NewEccErrorCountsRef converts the C object reference into a raw struct reference without wrapping.
func (*EccErrorCounts) Free ¶
func (x *EccErrorCounts) Free()
Free cleanups the referenced memory using C free.
func (*EccErrorCounts) PassRef ¶
func (x *EccErrorCounts) PassRef() *C.brmlEccErrorCounts_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*EccErrorCounts) Ref ¶
func (x *EccErrorCounts) Ref() *C.brmlEccErrorCounts_t
Ref returns a reference to C object as it is.
type EnableState ¶
type EnableState int32
EnableState as declared in brml/brml.h:220
const ( FEATURE_DISABLED EnableState = iota FEATURE_ENABLED EnableState = 1 )
EnableState enumeration from brml/brml.h:220
func EccMode ¶
func EccMode(device Device) (EnableState, error)
type EncoderType ¶
type EncoderType int32
EncoderType as declared in brml/brml.h:450
const ( ENCODER_QUERY_H264 EncoderType = iota ENCODER_QUERY_HEVC EncoderType = 1 )
EncoderType enumeration from brml/brml.h:450
type EventData ¶
func NewEventData ¶
func NewEventData() *EventData
NewEventData allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewEventDataRef ¶
NewEventDataRef converts the C object reference into a raw struct reference without wrapping.
func (*EventData) Free ¶
func (x *EventData) Free()
Free cleanups the referenced memory using C free.
func (*EventData) PassRef ¶
func (x *EventData) PassRef() *C.brmlEventData_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*EventData) Ref ¶
func (x *EventData) Ref() *C.brmlEventData_t
Ref returns a reference to C object as it is.
type GPUFirmwareType ¶
type GPUFirmwareType int32
GPUFirmwareType as declared in brml/brml.h:237
const ( GPU_FIRMWARE_TYPE_CP GPUFirmwareType = 1 GPU_FIRMWARE_TYPE_SDMA GPUFirmwareType = 2 GPU_FIRMWARE_TYPE_ENCODE GPUFirmwareType = 3 GPU_FIRMWARE_TYPE_DECODE GPUFirmwareType = 4 GPU_FIRMWARE_TYPE_HBM GPUFirmwareType = 5 GPU_FIRMWARE_TYPE_FLASH GPUFirmwareType = 6 GPU_FIRMWARE_TYPE_MPU GPUFirmwareType = 7 GPU_FIRMWARE_TYPE_PMU GPUFirmwareType = 8 GPU_FIRMWARE_TYPE_COUNT GPUFirmwareType = 9 )
GPUFirmwareType enumeration from brml/brml.h:237
type GPUInfo ¶
func GetGPUInfo ¶
func NewGPUInfo ¶
func NewGPUInfo() *GPUInfo
NewGPUInfo allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewGPUInfoRef ¶
NewGPUInfoRef converts the C object reference into a raw struct reference without wrapping.
func (*GPUInfo) PassRef ¶
func (x *GPUInfo) PassRef() *C.brmlGPUInfo_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*GPUInfo) Ref ¶
func (x *GPUInfo) Ref() *C.brmlGPUInfo_t
Ref returns a reference to C object as it is.
type GpuHealthStatus ¶
type GpuHealthStatus int32
GpuHealthStatus as declared in brml/brml.h:400
const ( HEALTH_STATUS_OK GpuHealthStatus = iota HEALTH_STATUS_WARNING GpuHealthStatus = 1 HEALTH_STATUS_CRITICAL_WARNING GpuHealthStatus = 2 HEALTH_STATUS_ERROR GpuHealthStatus = 3 )
GpuHealthStatus enumeration from brml/brml.h:400
func HealthStatus ¶
func HealthStatus(device Device) (GpuHealthStatus, error)
type GpuResetType ¶
type GpuResetType int32
GpuResetType as declared in brml/brml.h:340
const ( GPU_RESET GpuResetType = iota RESET_COUNT GpuResetType = 1 )
GpuResetType enumeration from brml/brml.h:340
type GpuTopologyLevel ¶
type GpuTopologyLevel int32
GpuTopologyLevel as declared in brml/brml.h:390
const ( TOPOLOGY_INTERNAL GpuTopologyLevel = iota TOPOLOGY_SINGLE GpuTopologyLevel = 10 TOPOLOGY_MULTIPLE GpuTopologyLevel = 20 TOPOLOGY_HOSTBRIDGE GpuTopologyLevel = 30 TOPOLOGY_NODE GpuTopologyLevel = 40 TOPOLOGY_SYSTEM GpuTopologyLevel = 50 )
GpuTopologyLevel enumeration from brml/brml.h:390
func TopologyCommonAncestor ¶
func TopologyCommonAncestor(device Device, device2 Device) (GpuTopologyLevel, error)
type GpuUtilization ¶
type GpuUtilization struct { Spc uint32 Cp uint32 Sdma uint32 Vdcp uint32 Vecp uint32 Vdec uint32 Venc uint32 }
func NewGpuUtilization ¶
func NewGpuUtilization() *GpuUtilization
NewGpuUtilization allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewGpuUtilizationRef ¶
func NewGpuUtilizationRef(ref unsafe.Pointer) *GpuUtilization
NewGpuUtilizationRef converts the C object reference into a raw struct reference without wrapping.
func (*GpuUtilization) Free ¶
func (x *GpuUtilization) Free()
Free cleanups the referenced memory using C free.
func (*GpuUtilization) PassRef ¶
func (x *GpuUtilization) PassRef() *C.brmlGpuUtilization_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*GpuUtilization) Ref ¶
func (x *GpuUtilization) Ref() *C.brmlGpuUtilization_t
Ref returns a reference to C object as it is.
type GpuVirtualizationMode ¶
type GpuVirtualizationMode int32
GpuVirtualizationMode as declared in brml/brml.h:442
const ( GPU_VIRTUALIZATION_MODE_NONE GpuVirtualizationMode = iota GPU_VIRTUALIZATION_MODE_PASSTHROUGH GpuVirtualizationMode = 1 GPU_VIRTUALIZATION_MODE_VGPU GpuVirtualizationMode = 2 GPU_VIRTUALIZATION_MODE_HYPERVISOR_HOST GpuVirtualizationMode = 3 )
GpuVirtualizationMode enumeration from brml/brml.h:442
type Memory ¶
func MemoryInfo ¶
func NewMemory ¶
func NewMemory() *Memory
NewMemory allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewMemoryRef ¶
NewMemoryRef converts the C object reference into a raw struct reference without wrapping.
func (*Memory) PassRef ¶
func (x *Memory) PassRef() *C.brmlMemory_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*Memory) Ref ¶
func (x *Memory) Ref() *C.brmlMemory_t
Ref returns a reference to C object as it is.
type MemoryBandwidth ¶
func NewMemoryBandwidth ¶
func NewMemoryBandwidth() *MemoryBandwidth
NewMemoryBandwidth allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewMemoryBandwidthRef ¶
func NewMemoryBandwidthRef(ref unsafe.Pointer) *MemoryBandwidth
NewMemoryBandwidthRef converts the C object reference into a raw struct reference without wrapping.
func (*MemoryBandwidth) Free ¶
func (x *MemoryBandwidth) Free()
Free cleanups the referenced memory using C free.
func (*MemoryBandwidth) PassRef ¶
func (x *MemoryBandwidth) PassRef() *C.brmlMemoryBandwidth_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*MemoryBandwidth) Ref ¶
func (x *MemoryBandwidth) Ref() *C.brmlMemoryBandwidth_t
Ref returns a reference to C object as it is.
type MemoryErrorType ¶
type MemoryErrorType int32
MemoryErrorType as declared in brml/brml.h:290
const ( MEMORY_ERROR_TYPE_CORRECTED MemoryErrorType = iota MEMORY_ERROR_TYPE_UNCORRECTED MemoryErrorType = 1 MEMORY_ERROR_TYPE_COUNT MemoryErrorType = 2 )
MemoryErrorType enumeration from brml/brml.h:290
type MemoryLocation ¶
type MemoryLocation int32
MemoryLocation as declared in brml/brml.h:376
const ( MEMORY_LOCATION_L1_CACHE MemoryLocation = iota MEMORY_LOCATION_L2_CACHE MemoryLocation = 1 MEMORY_LOCATION_DEVICE_MEMORY MemoryLocation = 2 MEMORY_LOCATION_COUNT MemoryLocation = 3 )
MemoryLocation enumeration from brml/brml.h:376
type P2pLinkType ¶
type P2pLinkType int32
P2pLinkType as declared in brml/brml.h:470
const ( P2P_NO_LINK P2pLinkType = iota P2P_INDIRECT_LINK P2pLinkType = 1 P2P_DIRECT_LINK P2pLinkType = 2 )
P2pLinkType enumeration from brml/brml.h:470
type P2pStatus ¶
func NewP2pStatus ¶
func NewP2pStatus() *P2pStatus
NewP2pStatus allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewP2pStatusRef ¶
NewP2pStatusRef converts the C object reference into a raw struct reference without wrapping.
func (*P2pStatus) Free ¶
func (x *P2pStatus) Free()
Free cleanups the referenced memory using C free.
func (*P2pStatus) PassRef ¶
func (x *P2pStatus) PassRef() *C.brmlP2pStatus_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*P2pStatus) Ref ¶
func (x *P2pStatus) Ref() *C.brmlP2pStatus_t
Ref returns a reference to C object as it is.
type P2pThroughput ¶
func NewP2pThroughput ¶
func NewP2pThroughput() *P2pThroughput
NewP2pThroughput allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewP2pThroughputRef ¶
func NewP2pThroughputRef(ref unsafe.Pointer) *P2pThroughput
NewP2pThroughputRef converts the C object reference into a raw struct reference without wrapping.
func (*P2pThroughput) Free ¶
func (x *P2pThroughput) Free()
Free cleanups the referenced memory using C free.
func (*P2pThroughput) PassRef ¶
func (x *P2pThroughput) PassRef() *C.brmlP2pThroughput_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*P2pThroughput) Ref ¶
func (x *P2pThroughput) Ref() *C.brmlP2pThroughput_t
Ref returns a reference to C object as it is.
type PciErrorCounter ¶
type PciErrorCounter struct { EbufOverflow [16]uint32 EbufUnderrun [16]uint32 DecodeError [16]uint32 RunningDisparity [16]uint32 SkpParity [16]uint32 SyncHeader [16]uint32 RxDeassertion [16]uint32 CtlSkpParity [16]uint32 FirstRetimer [16]uint32 SecondeRetimer [16]uint32 MarginCrcParity [16]uint32 DetectEiInfer uint32 ReceiverError uint32 RxRecoveryReq uint32 NFtsTimeout uint32 FramingError uint32 DeskewError uint32 BadTlp uint32 LcrcError uint32 BadDllp uint32 ReplayNumRollover uint32 ReplayTimeout uint32 RxNakDllp uint32 TxNakDllp uint32 RetryTlp uint32 FcTimeout uint32 PositionedTlp uint32 EcrcError uint32 UnsupportReq uint32 CompleterAbort uint32 CompletionTimeout uint32 TotalError uint32 }
func NewPciErrorCounter ¶
func NewPciErrorCounter() *PciErrorCounter
NewPciErrorCounter allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewPciErrorCounterRef ¶
func NewPciErrorCounterRef(ref unsafe.Pointer) *PciErrorCounter
NewPciErrorCounterRef converts the C object reference into a raw struct reference without wrapping.
func (*PciErrorCounter) Free ¶
func (x *PciErrorCounter) Free()
Free cleanups the referenced memory using C free.
func (*PciErrorCounter) PassRef ¶
func (x *PciErrorCounter) PassRef() *C.brmlPciErrorCounter_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*PciErrorCounter) Ref ¶
func (x *PciErrorCounter) Ref() *C.brmlPciErrorCounter_t
Ref returns a reference to C object as it is.
type PciInfo ¶
type PciInfo struct { Domain uint32 Bus uint32 Device uint32 Function uint32 PciDeviceId uint32 PciSubSystemId uint32 BusId [32]int8 }
func DevicePciInfo ¶
func NewPciInfo ¶
func NewPciInfo() *PciInfo
NewPciInfo allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewPciInfoRef ¶
NewPciInfoRef converts the C object reference into a raw struct reference without wrapping.
func (*PciInfo) PassRef ¶
func (x *PciInfo) PassRef() *C.brmlPciInfo_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*PciInfo) Ref ¶
func (x *PciInfo) Ref() *C.brmlPciInfo_t
Ref returns a reference to C object as it is.
type PcieUtilCounter ¶
type PcieUtilCounter int32
PcieUtilCounter as declared in brml/brml.h:421
const ( PCIE_UTIL_TX_BYTES PcieUtilCounter = iota PCIE_UTIL_RX_BYTES PcieUtilCounter = 1 PCIE_UTIL_COUNT PcieUtilCounter = 2 )
PcieUtilCounter enumeration from brml/brml.h:421
type PerfPolicyType ¶
type PerfPolicyType int32
PerfPolicyType as declared in brml/brml.h:410
const ( PERF_POLICY_POWER PerfPolicyType = iota PERF_POLICY_THERMAL PerfPolicyType = 1 PERF_POLICY_COUNT PerfPolicyType = 2 )
PerfPolicyType enumeration from brml/brml.h:410
type PowerSamples ¶
func GetPowerSamples ¶
func GetPowerSamples(device Device) (PowerSamples, error)
func NewPowerSamples ¶
func NewPowerSamples() *PowerSamples
NewPowerSamples allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewPowerSamplesRef ¶
func NewPowerSamplesRef(ref unsafe.Pointer) *PowerSamples
NewPowerSamplesRef converts the C object reference into a raw struct reference without wrapping.
func (*PowerSamples) Free ¶
func (x *PowerSamples) Free()
Free cleanups the referenced memory using C free.
func (*PowerSamples) PassRef ¶
func (x *PowerSamples) PassRef() *C.brmlPowerSamples_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*PowerSamples) Ref ¶
func (x *PowerSamples) Ref() *C.brmlPowerSamples_t
Ref returns a reference to C object as it is.
type ProcessInfo ¶
func ComputeRunningProcess ¶
func ComputeRunningProcess(device Device) (uint32, ProcessInfo, error)
func NewProcessInfo ¶
func NewProcessInfo() *ProcessInfo
NewProcessInfo allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewProcessInfoRef ¶
func NewProcessInfoRef(ref unsafe.Pointer) *ProcessInfo
NewProcessInfoRef converts the C object reference into a raw struct reference without wrapping.
func (*ProcessInfo) Free ¶
func (x *ProcessInfo) Free()
Free cleanups the referenced memory using C free.
func (*ProcessInfo) PassRef ¶
func (x *ProcessInfo) PassRef() *C.brmlProcessInfo_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*ProcessInfo) Ref ¶
func (x *ProcessInfo) Ref() *C.brmlProcessInfo_t
Ref returns a reference to C object as it is.
type ProcessUtilizationSample ¶
type ProcessUtilizationSample struct { Pid uint32 TimeStamp uint64 MemUtil uint32 Pad_cgo_0 [4]byte }
func NewProcessUtilizationSample ¶
func NewProcessUtilizationSample() *ProcessUtilizationSample
NewProcessUtilizationSample allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewProcessUtilizationSampleRef ¶
func NewProcessUtilizationSampleRef(ref unsafe.Pointer) *ProcessUtilizationSample
NewProcessUtilizationSampleRef converts the C object reference into a raw struct reference without wrapping.
func ProcessUtilization ¶
func ProcessUtilization(device Device, lastSeenTimestamp uint64) (ProcessUtilizationSample, uint32, error)
func (*ProcessUtilizationSample) Free ¶
func (x *ProcessUtilizationSample) Free()
Free cleanups the referenced memory using C free.
func (*ProcessUtilizationSample) PassRef ¶
func (x *ProcessUtilizationSample) PassRef() *C.brmlProcessUtilizationSample_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*ProcessUtilizationSample) Ref ¶
func (x *ProcessUtilizationSample) Ref() *C.brmlProcessUtilizationSample_t
Ref returns a reference to C object as it is.
type Return ¶
type Return int32
Return as declared in brml/brml.h:365
const ( SUCCESS Return = iota ERROR_UNINITIALIZED Return = 1 ERROR_INVALID_ARGUMENT Return = 2 ERROR_NOT_SUPPORTED Return = 3 ERROR_NO_PERMISSION Return = 4 ERROR_NOT_FOUND Return = 5 ERROR_INSUFFICIENT_SIZE Return = 6 ERROR_DRIVER_NOT_LOADED Return = 7 ERROR_TIMEOUT Return = 8 ERROR_UNEXPECTED_DATA Return = 9 ERROR_UNEXPECTED_SIZE Return = 10 ERROR_NO_DATA Return = 11 ERROR_INSUFFICIENT_RESOURCES Return = 12 ERROR_FILE_ERROR Return = 13 ERROR_INTERRUPT Return = 14 ERROR_BUSY Return = 15 ERROR_DRIVER_VERSION_MISMATCH Return = 16 ERROR_IN_USE Return = 17 ERROR_UNKNOWN Return = 255 )
Return enumeration from brml/brml.h:365
type TemperatureSensors ¶
type TemperatureSensors int32
TemperatureSensors as declared in brml/brml.h:267
const ( TEMPERATURE_GPU TemperatureSensors = iota TEMPERATURE_MEMORY TemperatureSensors = 1 TEMPERATURE_SPC TemperatureSensors = 2 TEMPERATURE_BOARD_SENSOR0 TemperatureSensors = 3 TEMPERATURE_BOARD_SENSOR1 TemperatureSensors = 4 TEMPERATURE_BOARD_SENSOR2 TemperatureSensors = 5 TEMPERATURE_BOARD_SENSOR3 TemperatureSensors = 6 TEMPERATURE_DIODE_SENSOR0 TemperatureSensors = 7 TEMPERATURE_DIODE_SENSOR1 TemperatureSensors = 8 TEMPERATURE_DIODE_SENSOR2 TemperatureSensors = 9 TEMPERATURE_DIODE_SENSOR3 TemperatureSensors = 10 TEMPERATURE_COUNT TemperatureSensors = 11 )
TemperatureSensors enumeration from brml/brml.h:267
type TemperatureThresholds ¶
type TemperatureThresholds int32
TemperatureThresholds as declared in brml/brml.h:247
const ( TEMPERATURE_THRESHOLD_SHUTDOWN TemperatureThresholds = iota TEMPERATURE_THRESHOLD_SLOWDOWN TemperatureThresholds = 1 TEMPERATURE_THRESHOLD_COUNT TemperatureThresholds = 2 )
TemperatureThresholds enumeration from brml/brml.h:247
type Utilization ¶
func NewUtilization ¶
func NewUtilization() *Utilization
NewUtilization allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewUtilizationRef ¶
func NewUtilizationRef(ref unsafe.Pointer) *Utilization
NewUtilizationRef converts the C object reference into a raw struct reference without wrapping.
func UtilizationRates ¶
func UtilizationRates(device Device) (Utilization, error)
func (*Utilization) Free ¶
func (x *Utilization) Free()
Free cleanups the referenced memory using C free.
func (*Utilization) PassRef ¶
func (x *Utilization) PassRef() *C.brmlUtilization_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*Utilization) Ref ¶
func (x *Utilization) Ref() *C.brmlUtilization_t
Ref returns a reference to C object as it is.