Beispiel #1
0
func DeviceGetCount() (count, err int) {
	var cCount, cErr C.int
	cErr = C.int(C.cuDeviceGetCount(&cCount))
	count = int(cCount)
	err = int(cErr)
	return
}
Beispiel #2
0
// Returns the number of devices with compute capability greater than or equal to 1.0 that are available for execution.
func DeviceGetCount() int {
	var count C.int
	err := Result(C.cuDeviceGetCount(&count))
	if err != SUCCESS {
		panic(err)
	}
	return int(count)
}