1
0
mirror of https://github.com/fumiama/gozel.git synced 2026-06-06 00:40:23 +08:00
Files
gozel/examples/quick_start/main.go
2026-03-25 23:25:56 +08:00

25 lines
402 B
Go

package main
import (
"fmt"
"github.com/fumiama/gozel/ze"
)
func main() {
gpus, err := ze.InitGPUDrivers()
if err != nil {
panic(err)
}
fmt.Printf("Found %d GPU driver(s)\n", len(gpus))
devs, _ := gpus[0].DeviceGet()
for _, d := range devs {
prop, _ := d.DeviceGetProperties()
fmt.Printf(" Device: %s\n", string(prop.Name[:]))
}
// Found 1 GPU driver(s)
// Device: Graphics
}