示例#1
0
文件: cuda.go 项目: kashif/gocuda
func DriverGetVersion() (driverVersion, err int) {
	var cDriverVersion, cErr C.int
	cErr = C.int(C.cuDriverGetVersion(&cDriverVersion))
	driverVersion = int(cDriverVersion)
	err = int(cErr)
	return
}
示例#2
0
// Returns the CUDA driver version.
func Version() int {
	var version C.int
	err := Result(C.cuDriverGetVersion(&version))
	if err != SUCCESS {
		panic(err)
	}
	return int(version)
}