예제 #1
0
파일: cuda.go 프로젝트: kashif/gocuda
func DeviceGetCount() (count, err int) {
	var cCount, cErr C.int
	cErr = C.int(C.cuDeviceGetCount(&cCount))
	count = int(cCount)
	err = int(cErr)
	return
}
예제 #2
0
파일: device.go 프로젝트: LStoleriu/hotspin
// 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)
}