Esempio n. 1
0
func DeviceComputeCapability(dev int) (major, minor, err int) {
	var cErr, cMajor, cMinor C.int
	cErr = C.int(C.cuDeviceComputeCapability(&cMajor, &cMinor, C.CUdevice(dev)))
	major = int(cMajor)
	minor = int(cMinor)
	err = int(cErr)
	return
}
Esempio n. 2
0
// Returns the compute capability of the device.
func DeviceComputeCapability(device Device) (major, minor int) {
	var maj, min C.int
	err := Result(C.cuDeviceComputeCapability(&maj, &min, C.CUdevice(device)))
	if err != SUCCESS {
		panic(err)
	}
	major = int(maj)
	minor = int(min)
	return
}