Exemple #1
0
func GetDriverVersion() (string, error) {
	var driver C.int

	err := cudaErr(C.cudaDriverGetVersion(&driver))
	d := fmt.Sprintf("%d.%d", int(driver)/1000, int(driver)%100/10)
	return d, err
}
Exemple #2
0
func driverGetVersion() (int, error) {
	var driver C.int

	r := C.cudaDriverGetVersion(&driver)
	return int(driver), errorString(r)
}