xpuml

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package XPUML bindings

Index

Constants

View Source
const (
	// NO_UNVERSIONED_FUNC_DEFS as defined in go-xpuml/<predefine>:24
	NO_UNVERSIONED_FUNC_DEFS = 1
	// API_VERSION as defined in xpuml/xpuml.h:29
	API_VERSION = 1
	// API_VERSION_STR as defined in xpuml/xpuml.h:30
	API_VERSION_STR = "1"
	// VALUE_NOT_AVAILABLE as defined in xpuml/xpuml.h:52
	VALUE_NOT_AVAILABLE = -1
	// DEVICE_PCI_BUS_ID_BUFFER_SIZE as defined in xpuml/xpuml.h:59
	DEVICE_PCI_BUS_ID_BUFFER_SIZE = 32
	// DEVICE_PCI_BUS_ID_FMT as defined in xpuml/xpuml.h:82
	DEVICE_PCI_BUS_ID_FMT = "%08X:%02X:%02X.%01X"
	// TOPOLOGY_CPU as defined in xpuml/xpuml.h:182
	TOPOLOGY_CPU = 0
	// FlagDefault as defined in xpuml/xpuml.h:320
	FlagDefault = 0
	// FlagForce as defined in xpuml/xpuml.h:322
	FlagForce = 1
	// VXPU_NAME_BUFFER_SIZE as defined in xpuml/xpuml.h:545
	VXPU_NAME_BUFFER_SIZE = 64
	// BUS_TYPE_UNKNOWN as defined in xpuml/xpuml.h:584
	BUS_TYPE_UNKNOWN = 0
	// BUS_TYPE_PCI as defined in xpuml/xpuml.h:585
	BUS_TYPE_PCI = 1
	// BUS_TYPE_PCIE as defined in xpuml/xpuml.h:586
	BUS_TYPE_PCIE = 2
	// BUS_TYPE_FPCI as defined in xpuml/xpuml.h:587
	BUS_TYPE_FPCI = 3
	// BUS_TYPE_AGP as defined in xpuml/xpuml.h:588
	BUS_TYPE_AGP = 4
	// FI_DEV_ECC_CURRENT as defined in xpuml/xpuml.h:606
	FI_DEV_ECC_CURRENT = 1
	// FI_MAX as defined in xpuml/xpuml.h:607
	FI_MAX = 161
	// INIT_FLAG_NO_XPUS as defined in xpuml/xpuml.h:660
	INIT_FLAG_NO_XPUS = 1
	// INIT_FLAG_NO_ATTACH as defined in xpuml/xpuml.h:661
	INIT_FLAG_NO_ATTACH = 2
	// DEVICE_UUID_BUFFER_SIZE as defined in xpuml/xpuml.h:758
	DEVICE_UUID_BUFFER_SIZE = 96
	// DEVICE_PART_NUMBER_BUFFER_SIZE as defined in xpuml/xpuml.h:763
	DEVICE_PART_NUMBER_BUFFER_SIZE = 80
	// SYSTEM_DRIVER_VERSION_BUFFER_SIZE as defined in xpuml/xpuml.h:768
	SYSTEM_DRIVER_VERSION_BUFFER_SIZE = 80
	// SYSTEM_XPUML_VERSION_BUFFER_SIZE as defined in xpuml/xpuml.h:773
	SYSTEM_XPUML_VERSION_BUFFER_SIZE = 80
	// DEVICE_NAME_BUFFER_SIZE as defined in xpuml/xpuml.h:778
	DEVICE_NAME_BUFFER_SIZE = 96
	// DEVICE_SERIAL_BUFFER_SIZE as defined in xpuml/xpuml.h:783
	DEVICE_SERIAL_BUFFER_SIZE = 30
)

Variables

This section is empty.

Functions

func DeviceGetAttributes

func DeviceGetAttributes(Device Device) (DeviceAttributes, Return)

xpuml.DeviceGetAttributes()

func DeviceGetComputeRunningProcesses

func DeviceGetComputeRunningProcesses(Device Device) ([]ProcessInfo, Return)

xpuml.DeviceGetComputeRunningProcesses()

func DeviceGetHandleByIndex

func DeviceGetHandleByIndex(Index int) (Device, Return)

xpuml.DeviceGetHandleByIndex()

func DeviceGetHostVxpuMode

func DeviceGetHostVxpuMode(Device Device) (HostVxpuMode, Return)

xpuml.DeviceGetHostVxpuMode()

func DeviceGetMemoryInfo

func DeviceGetMemoryInfo(Device Device) (Memory, Return)

xpuml.DeviceGetMemoryInfo()

func DeviceGetState

func DeviceGetState(Device Device) (DeviceState, Return)

xpuml.DeviceGetState()

func ErrorString

func ErrorString(Result Return) string

xpuml.ErrorString()

Types

type BAR4Memory

type BAR4Memory struct {
	Bar4Total uint64
	Bar4Free  uint64
	Bar4Used  uint64
	Reserved  [13]uint64
}

func NewBAR4Memory

func NewBAR4Memory() *BAR4Memory

NewBAR4Memory allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.

func NewBAR4MemoryRef

func NewBAR4MemoryRef(ref unsafe.Pointer) *BAR4Memory

NewBAR4MemoryRef converts the C object reference into a raw struct reference without wrapping.

func (*BAR4Memory) Free

func (x *BAR4Memory) Free()

Free cleanups the referenced memory using C free.

func (*BAR4Memory) PassRef

func (x *BAR4Memory) PassRef() *C.xpumlBAR4Memory_t

PassRef returns a reference to C object as it is or allocates a new C object of this type.

func (*BAR4Memory) Ref

func (x *BAR4Memory) Ref() *C.xpumlBAR4Memory_t

Ref returns a reference to C object as it is.

type BusType

type BusType uint32

type ClockType added in v0.0.2

type ClockType int32

ClockType as declared in xpuml/xpuml.h:368

const (
	CLOCK_XPU   ClockType = iota
	CLOCK_COUNT ClockType = 1
)

ClockType enumeration from xpuml/xpuml.h:368

type DetachXPUState

type DetachXPUState int32

DetachXPUState as declared in xpuml/xpuml.h:638

const (
	DETACH_XPU_KEEP   DetachXPUState = iota
	DETACH_XPU_REMOVE DetachXPUState = 1
)

DetachXPUState enumeration from xpuml/xpuml.h:638

type Device

type Device struct {
	Handle *_Ctype_struct_xpumlDevice_st
}

func (Device) GetAttributes

func (Device Device) GetAttributes() (DeviceAttributes, Return)

func (Device) GetBoardId

func (Device Device) GetBoardId() (uint32, Return)

func (Device) GetComputeRunningProcesses

func (Device Device) GetComputeRunningProcesses() ([]ProcessInfo, Return)

func (Device) GetMemoryInfo

func (Device Device) GetMemoryInfo() (Memory, Return)

type DeviceArch

type DeviceArch int32

DeviceArch as declared in xpuml/xpuml.h:337

const (
	DEVICE_ARCH_UNKNOWN DeviceArch = iota
	DEVICE_ARCH_KL1     DeviceArch = 1
	DEVICE_ARCH_KL2     DeviceArch = 2
	DEVICE_ARCH_KL3     DeviceArch = 3
	DEVICE_ARCH_COUNT   DeviceArch = 4
)

DeviceArch enumeration from xpuml/xpuml.h:337

type DeviceArchitecture

type DeviceArchitecture uint32

type DeviceAttributes

type DeviceAttributes struct {
	ArchId             int32
	BoardId            int32
	ModelId            int32
	ClusterCount       uint32
	SdnnCount          uint32
	DmaEngineCount     uint32
	DecoderCount       uint32
	EncoderCount       uint32
	ImgProcCount       uint32
	MaxVFCount         uint32
	GlobalMemorySizeMB uint64
	L3MemorySizeMB     uint64
	Reserved           [9]uint64
}

func NewDeviceAttributes

func NewDeviceAttributes() *DeviceAttributes

NewDeviceAttributes allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.

func NewDeviceAttributesRef

func NewDeviceAttributesRef(ref unsafe.Pointer) *DeviceAttributes

NewDeviceAttributesRef converts the C object reference into a raw struct reference without wrapping.

func (*DeviceAttributes) Free

func (x *DeviceAttributes) Free()

Free cleanups the referenced memory using C free.

func (*DeviceAttributes) PassRef

PassRef returns a reference to C object as it is or allocates a new C object of this type.

func (*DeviceAttributes) Ref

Ref returns a reference to C object as it is.

type DeviceBoard

type DeviceBoard int32

DeviceBoard as declared in xpuml/xpuml.h:355

const (
	DEVICE_BOARD_UNKNOWN     DeviceBoard = iota
	DEVICE_BOARD_KL1_K100    DeviceBoard = 1
	DEVICE_BOARD_KL1_K200    DeviceBoard = 2
	DEVICE_BOARD_KL2_R200    DeviceBoard = 100
	DEVICE_BOARD_KL2_R300    DeviceBoard = 101
	DEVICE_BOARD_KL2_R200_8F DeviceBoard = 102
	DEVICE_BOARD_COUNT       DeviceBoard = 103
)

DeviceBoard enumeration from xpuml/xpuml.h:355

type DeviceModel

type DeviceModel int32

DeviceModel as declared in xpuml/xpuml.h:392

const (
	DEVICE_MODEL_UNKNOWN                        DeviceModel = 9999
	DEVICE_MODEL_KL1_K200                       DeviceModel = 0
	DEVICE_MODEL_KL1_K100                       DeviceModel = 1
	DEVICE_MODEL_KL2_R200                       DeviceModel = 2
	DEVICE_MODEL_KL2_R300                       DeviceModel = 3
	DEVICE_MODEL_KL2_R200_8F                    DeviceModel = 4
	DEVICE_MODEL_KL2_R200_SRIOV_PF              DeviceModel = 200
	DEVICE_MODEL_KL2_R200_SRIOV_VF_ONE_OF_ONE   DeviceModel = 201
	DEVICE_MODEL_KL2_R200_SRIOV_VF_ONE_OF_TWO   DeviceModel = 202
	DEVICE_MODEL_KL2_R200_SRIOV_VF_ONE_OF_THREE DeviceModel = 203
	DEVICE_MODEL_COUNT                          DeviceModel = 204
)

DeviceModel enumeration from xpuml/xpuml.h:392

type DeviceState

type DeviceState int32

DeviceState as declared in xpuml/xpuml.h:534

const (
	DEVICE_STATE_UNUSED       DeviceState = iota
	DEVICE_STATE_RUNNING      DeviceState = 201
	DEVICE_STATE_IN_RESET     DeviceState = 205
	DEVICE_STATE_ERROR        DeviceState = 207
	DEVICE_STATE_IN_EXCEPTION DeviceState = 208
)

DeviceState enumeration from xpuml/xpuml.h:534

type EnableState

type EnableState int32

EnableState as declared in xpuml/xpuml.h:317

const (
	FEATURE_DISABLED EnableState = iota
	FEATURE_ENABLED  EnableState = 1
)

EnableState enumeration from xpuml/xpuml.h:317

type FieldValue

type FieldValue struct {
	FieldId     uint32
	ScopeId     uint32
	Timestamp   int64
	LatencyUsec int64
	ValueType   uint32
	XpumlReturn uint32
	Value       [8]byte
}

func NewFieldValue

func NewFieldValue() *FieldValue

NewFieldValue allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.

func NewFieldValueRef

func NewFieldValueRef(ref unsafe.Pointer) *FieldValue

NewFieldValueRef converts the C object reference into a raw struct reference without wrapping.

func (*FieldValue) Free

func (x *FieldValue) Free()

Free cleanups the referenced memory using C free.

func (*FieldValue) PassRef

func (x *FieldValue) PassRef() *C.xpumlFieldValue_t

PassRef returns a reference to C object as it is or allocates a new C object of this type.

func (*FieldValue) Ref

func (x *FieldValue) Ref() *C.xpumlFieldValue_t

Ref returns a reference to C object as it is.

type HostVxpuMode

type HostVxpuMode int32

HostVxpuMode as declared in xpuml/xpuml.h:505

const (
	HOST_VXPU_MODE_NON_SRIOV HostVxpuMode = iota
	HOST_VXPU_MODE_SRIOV_OFF HostVxpuMode = 1
	HOST_VXPU_MODE_SRIOV_ON  HostVxpuMode = 2
)

HostVxpuMode enumeration from xpuml/xpuml.h:505

type Memory

type Memory struct {
	PageSizeGlobalMemory uint64
	TotalGlobalMemory    uint64
	FreeGlobalMemory     uint64
	UsedGlobalMemory     uint64
	PageSizeL3Memory     uint64
	TotalL3Memory        uint64
	FreeL3Memory         uint64
	UsedL3Memory         uint64
	Reserved             [8]uint64
}

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

func NewMemoryRef(ref unsafe.Pointer) *Memory

NewMemoryRef converts the C object reference into a raw struct reference without wrapping.

func (*Memory) Free

func (x *Memory) Free()

Free cleanups the referenced memory using C free.

func (*Memory) PassRef

func (x *Memory) PassRef() *C.xpumlMemory_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.xpumlMemory_t

Ref returns a reference to C object as it is.

type MemoryLocation

type MemoryLocation int32

MemoryLocation as declared in xpuml/xpuml.h:472

const (
	MEMORY_LOCATION_GLOBAL_MEMORY MemoryLocation = iota
	MEMORY_LOCATION_L3_MEMORY     MemoryLocation = 1
	MEMORY_LOCATION_COUNT         MemoryLocation = 2
)

MemoryLocation enumeration from xpuml/xpuml.h:472

type PciInfo

type PciInfo struct {
	Domain         uint32
	Bus            uint32
	Device         uint32
	Function       uint32
	PciDeviceId    uint32
	PciSubSystemId uint32
	BusId          [32]int8
	Reserved       [9]uint64
}

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

func NewPciInfoRef(ref unsafe.Pointer) *PciInfo

NewPciInfoRef converts the C object reference into a raw struct reference without wrapping.

func (*PciInfo) Free

func (x *PciInfo) Free()

Free cleanups the referenced memory using C free.

func (*PciInfo) PassRef

func (x *PciInfo) PassRef() *C.xpumlPciInfo_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.xpumlPciInfo_t

Ref returns a reference to C object as it is.

type PcieLinkState

type PcieLinkState int32

PcieLinkState as declared in xpuml/xpuml.h:647

const (
	PCIE_LINK_KEEP      PcieLinkState = iota
	PCIE_LINK_SHUT_DOWN PcieLinkState = 1
)

PcieLinkState enumeration from xpuml/xpuml.h:647

type PcieUtilCounter

type PcieUtilCounter int32

PcieUtilCounter as declared in xpuml/xpuml.h:235

const (
	PCIE_UTIL_TX_BYTES PcieUtilCounter = iota
	PCIE_UTIL_RX_BYTES PcieUtilCounter = 1
	PCIE_UTIL_COUNT    PcieUtilCounter = 2
)

PcieUtilCounter enumeration from xpuml/xpuml.h:235

type PerfPolicyType

type PerfPolicyType int32

PerfPolicyType as declared in xpuml/xpuml.h:291

const (
	PERF_POLICY_POWER             PerfPolicyType = iota
	PERF_POLICY_THERMAL           PerfPolicyType = 1
	PERF_POLICY_SYNC_BOOST        PerfPolicyType = 2
	PERF_POLICY_BOARD_LIMIT       PerfPolicyType = 3
	PERF_POLICY_LOW_UTILIZATION   PerfPolicyType = 4
	PERF_POLICY_RELIABILITY       PerfPolicyType = 5
	PERF_POLICY_TOTAL_APP_CLOCKS  PerfPolicyType = 10
	PERF_POLICY_TOTAL_BASE_CLOCKS PerfPolicyType = 11
	PERF_POLICY_COUNT             PerfPolicyType = 12
)

PerfPolicyType enumeration from xpuml/xpuml.h:291

type ProcessInfo

type ProcessInfo struct {
	Pid              uint32
	UsedGlobalMemory uint64
	UsedL3Memory     uint64
	Reserved         [13]uint64
}

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.xpumlProcessInfo_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.xpumlProcessInfo_t

Ref returns a reference to C object as it is.

type ProcessUtilizationSample

type ProcessUtilizationSample struct {
	Pid       uint32
	TimeStamp uint64
	SmUtil    uint32
	MemUtil   uint32
	EncUtil   uint32
	DecUtil   uint32
}

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 (*ProcessUtilizationSample) Free

func (x *ProcessUtilizationSample) Free()

Free cleanups the referenced memory using C free.

func (*ProcessUtilizationSample) PassRef

PassRef returns a reference to C object as it is or allocates a new C object of this type.

func (*ProcessUtilizationSample) Ref

Ref returns a reference to C object as it is.

type RawString

type RawString string

RawString reperesents a string backed by data on the C side.

func (RawString) Copy

func (raw RawString) Copy() string

Copy returns a Go-managed copy of raw string.

type Return

type Return int32

Return as declared in xpuml/xpuml.h:460

const (
	SUCCESS                       Return = iota
	ERROR_UNINITIALIZED           Return = 1
	ERROR_INVALID_ARGUMENT        Return = 2
	ERROR_NOT_SUPPORTED           Return = 3
	ERROR_NO_PERMISSION           Return = 4
	ERROR_ALREADY_INITIALIZED     Return = 5
	ERROR_NOT_FOUND               Return = 6
	ERROR_INSUFFICIENT_SIZE       Return = 7
	ERROR_INSUFFICIENT_POWER      Return = 8
	ERROR_DRIVER_NOT_LOADED       Return = 9
	ERROR_TIMEOUT                 Return = 10
	ERROR_IRQ_ISSUE               Return = 11
	ERROR_LIBRARY_NOT_FOUND       Return = 12
	ERROR_FUNCTION_NOT_FOUND      Return = 13
	ERROR_CORRUPTED_INFOROM       Return = 14
	ERROR_XPU_IS_LOST             Return = 15
	ERROR_RESET_REQUIRED          Return = 16
	ERROR_OPERATING_SYSTEM        Return = 17
	ERROR_LIB_RM_VERSION_MISMATCH Return = 18
	ERROR_IN_USE                  Return = 19
	ERROR_MEMORY                  Return = 20
	ERROR_NO_DATA                 Return = 21
	ERROR_VXPU_ECC_NOT_SUPPORTED  Return = 22
	ERROR_INSUFFICIENT_RESOURCES  Return = 23
	ERROR_FREQ_NOT_SUPPORTED      Return = 24
	ERROR_UNKNOWN                 Return = 999
)

Return enumeration from xpuml/xpuml.h:460

func DeviceGetBoardId

func DeviceGetBoardId(Device Device) (uint32, Return)

xpuml.DeviceGetBoardId()

func DeviceGetCount

func DeviceGetCount() (int, Return)

xpuml.DeviceGetCount()

func DeviceSetSriovVfNum

func DeviceSetSriovVfNum(Device Device, VfNum int32) Return

xpuml.DeviceSetSriovVfNum()

func Init

func Init() Return

xpuml.Init()

func Shutdown

func Shutdown() Return

xpuml.Shutdown()

func SystemGetDriverVersion

func SystemGetDriverVersion() (string, Return)

xpuml.SystemGetDriverVersion()

func SystemGetXPUMLVersion

func SystemGetXPUMLVersion() (string, Return)

xpuml.SystemGetXPUMLVersion()

type Sample

type Sample struct {
	TimeStamp   uint64
	SampleValue [8]byte
}

func NewSample

func NewSample() *Sample

NewSample allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.

func NewSampleRef

func NewSampleRef(ref unsafe.Pointer) *Sample

NewSampleRef converts the C object reference into a raw struct reference without wrapping.

func (*Sample) Free

func (x *Sample) Free()

Free cleanups the referenced memory using C free.

func (*Sample) PassRef

func (x *Sample) PassRef() *C.xpumlSample_t

PassRef returns a reference to C object as it is or allocates a new C object of this type.

func (*Sample) Ref

func (x *Sample) Ref() *C.xpumlSample_t

Ref returns a reference to C object as it is.

type SamplingType

type SamplingType int32

SamplingType as declared in xpuml/xpuml.h:223

const (
	TOTAL_POWER_SAMPLES        SamplingType = iota
	XPU_UTILIZATION_SAMPLES    SamplingType = 1
	MEMORY_UTILIZATION_SAMPLES SamplingType = 2
	ENC_UTILIZATION_SAMPLES    SamplingType = 3
	DEC_UTILIZATION_SAMPLES    SamplingType = 4
	PROCESSOR_CLK_SAMPLES      SamplingType = 5
	MEMORY_CLK_SAMPLES         SamplingType = 6
	SAMPLINGTYPE_COUNT         SamplingType = 7
)

SamplingType enumeration from xpuml/xpuml.h:223

type TemperatureSensors

type TemperatureSensors int32

TemperatureSensors as declared in xpuml/xpuml.h:426

const (
	TEMPERATURE_XPU   TemperatureSensors = iota
	TEMPERATURE_COUNT TemperatureSensors = 1
)

TemperatureSensors enumeration from xpuml/xpuml.h:426

type TemperatureThresholds

type TemperatureThresholds int32

TemperatureThresholds as declared in xpuml/xpuml.h:415

const (
	TEMPERATURE_THRESHOLD_SHUTDOWN      TemperatureThresholds = iota
	TEMPERATURE_THRESHOLD_SLOWDOWN      TemperatureThresholds = 1
	TEMPERATURE_THRESHOLD_MEM_MAX       TemperatureThresholds = 2
	TEMPERATURE_THRESHOLD_XPU_MAX       TemperatureThresholds = 3
	TEMPERATURE_THRESHOLD_ACOUSTIC_MIN  TemperatureThresholds = 4
	TEMPERATURE_THRESHOLD_ACOUSTIC_CURR TemperatureThresholds = 5
	TEMPERATURE_THRESHOLD_ACOUSTIC_MAX  TemperatureThresholds = 6
	TEMPERATURE_THRESHOLD_COUNT         TemperatureThresholds = 7
)

TemperatureThresholds enumeration from xpuml/xpuml.h:415

type Utilization

type Utilization struct {
	Xpu      uint32
	Memory   uint32
	Reserved [15]uint64
}

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 (*Utilization) Free

func (x *Utilization) Free()

Free cleanups the referenced memory using C free.

func (*Utilization) PassRef

func (x *Utilization) PassRef() *C.xpumlUtilization_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.xpumlUtilization_t

Ref returns a reference to C object as it is.

type Value

type Value [sizeofValue]byte

type ValueType

type ValueType int32

ValueType as declared in xpuml/xpuml.h:250

const (
	VALUE_TYPE_DOUBLE             ValueType = iota
	VALUE_TYPE_UNSIGNED_INT       ValueType = 1
	VALUE_TYPE_UNSIGNED_LONG      ValueType = 2
	VALUE_TYPE_UNSIGNED_LONG_LONG ValueType = 3
	VALUE_TYPE_SIGNED_LONG_LONG   ValueType = 4
	VALUE_TYPE_COUNT              ValueType = 5
)

ValueType enumeration from xpuml/xpuml.h:250

type ViolationTime

type ViolationTime struct {
	ReferenceTime uint64
	ViolationTime uint64
}

func NewViolationTime

func NewViolationTime() *ViolationTime

NewViolationTime allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.

func NewViolationTimeRef

func NewViolationTimeRef(ref unsafe.Pointer) *ViolationTime

NewViolationTimeRef converts the C object reference into a raw struct reference without wrapping.

func (*ViolationTime) Free

func (x *ViolationTime) Free()

Free cleanups the referenced memory using C free.

func (*ViolationTime) PassRef

func (x *ViolationTime) PassRef() *C.xpumlViolationTime_t

PassRef returns a reference to C object as it is or allocates a new C object of this type.

func (*ViolationTime) Ref

Ref returns a reference to C object as it is.

type VxpuGuestInfoState

type VxpuGuestInfoState int32

VxpuGuestInfoState as declared in xpuml/xpuml.h:522

const (
	VXPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED VxpuGuestInfoState = iota
	VXPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED   VxpuGuestInfoState = 1
)

VxpuGuestInfoState enumeration from xpuml/xpuml.h:522

type VxpuInstance

type VxpuInstance uint32

type VxpuTypeId

type VxpuTypeId uint32

type VxpuVmIdType

type VxpuVmIdType int32

VxpuVmIdType as declared in xpuml/xpuml.h:513

const (
	VXPU_VM_ID_DOMAIN_ID VxpuVmIdType = iota
	VXPU_VM_ID_UUID      VxpuVmIdType = 1
)

VxpuVmIdType enumeration from xpuml/xpuml.h:513

type XPUP2PCapsIndex

type XPUP2PCapsIndex int32

XPUP2PCapsIndex as declared in xpuml/xpuml.h:206

const (
	P2P_CAPS_INDEX_READ    XPUP2PCapsIndex = iota
	P2P_CAPS_INDEX_WRITE   XPUP2PCapsIndex = 1
	P2P_CAPS_INDEX_KLINK   XPUP2PCapsIndex = 2
	P2P_CAPS_INDEX_ATOMICS XPUP2PCapsIndex = 3
	P2P_CAPS_INDEX_PROP    XPUP2PCapsIndex = 4
	P2P_CAPS_INDEX_UNKNOWN XPUP2PCapsIndex = 5
)

XPUP2PCapsIndex enumeration from xpuml/xpuml.h:206

type XPUP2PStatus

type XPUP2PStatus int32

XPUP2PStatus as declared in xpuml/xpuml.h:195

const (
	P2P_STATUS_OK                         XPUP2PStatus = iota
	P2P_STATUS_CHIPSET_NOT_SUPPORED       XPUP2PStatus = 1
	P2P_STATUS_XPU_NOT_SUPPORTED          XPUP2PStatus = 2
	P2P_STATUS_IOH_TOPOLOGY_NOT_SUPPORTED XPUP2PStatus = 3
	P2P_STATUS_DISABLED_BY_REGKEY         XPUP2PStatus = 4
	P2P_STATUS_NOT_SUPPORTED              XPUP2PStatus = 5
	P2P_STATUS_UNKNOWN                    XPUP2PStatus = 6
)

XPUP2PStatus enumeration from xpuml/xpuml.h:195

type XPUTopologyLevel

type XPUTopologyLevel int32

XPUTopologyLevel as declared in xpuml/xpuml.h:179

const (
	TOPOLOGY_INTERNAL   XPUTopologyLevel = iota
	TOPOLOGY_SINGLE     XPUTopologyLevel = 10
	TOPOLOGY_MULTIPLE   XPUTopologyLevel = 20
	TOPOLOGY_HOSTBRIDGE XPUTopologyLevel = 30
	TOPOLOGY_NODE       XPUTopologyLevel = 40
	TOPOLOGY_SYSTEM     XPUTopologyLevel = 50
)

XPUTopologyLevel enumeration from xpuml/xpuml.h:179

type XPUVirtualizationMode

type XPUVirtualizationMode int32

XPUVirtualizationMode as declared in xpuml/xpuml.h:495

const (
	XPU_VIRTUALIZATION_MODE_NONE        XPUVirtualizationMode = iota
	XPU_VIRTUALIZATION_MODE_PASSTHROUGH XPUVirtualizationMode = 1
	XPU_VIRTUALIZATION_MODE_VXPU        XPUVirtualizationMode = 2
	XPU_VIRTUALIZATION_MODE_HOST_VXPU   XPUVirtualizationMode = 3
	XPU_VIRTUALIZATION_MODE_HOST_VSGA   XPUVirtualizationMode = 4
)

XPUVirtualizationMode enumeration from xpuml/xpuml.h:495

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL