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 }
// 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 }