Skip to content

Commit 2693419

Browse files
committed
Add mode to example
Signed-off-by: Evan Lezar <[email protected]>
1 parent 9da9e13 commit 2693419

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

examples/devices/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ func main() {
5050
if ret != nvml.SUCCESS {
5151
log.Fatalf("Unable to get uuid of device at index %d: %v", i, nvml.ErrorString(ret))
5252
}
53+
fmt.Printf("uuid=%v\n", uuid)
54+
mode, ret := device.GetAddressingMode()
55+
if ret != nvml.SUCCESS {
56+
log.Fatalf("unabled to get addressing mode of device at index %d: %v", i, nvml.ErrorString(ret))
57+
}
58+
fmt.Printf("mode=%v\n", mode)
5359

54-
fmt.Printf("%v\n", uuid)
5560
}
5661
}

0 commit comments

Comments
 (0)