Skip to content

Commit 4871684

Browse files
committed
Add VgpuTypeIdToUint32 helper function
Signed-off-by: PiotrProkop <[email protected]>
1 parent 0e815c7 commit 4871684

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/nvml/cgo_helpers_static.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,7 @@ func unpackPCharString(str string) (*C.char, *struct{}) {
7373
h := (*stringHeader)(unsafe.Pointer(&str))
7474
return (*C.char)(h.Data), cgoAllocsUnknown
7575
}
76+
77+
func VgpuTypeIdToUint32(typeId VgpuTypeId) uint32 {
78+
return uint32(typeId.(nvmlVgpuTypeId))
79+
}

0 commit comments

Comments
 (0)