// Returns in a device handle given an ordinal in the range [0, DeviceGetCount()-1]. func DeviceGet(ordinal int) Device { var device C.CUdevice err := Result(C.cuDeviceGet(&device, C.int(ordinal))) if err != SUCCESS { panic(err) } return Device(device) }
func DeviceGet(ordinal int) (device, err int) { var cDevice C.CUdevice var cErr C.int cErr = C.int(C.cuDeviceGet(&cDevice, C.int(ordinal))) device = int(cDevice) err = int(cErr) return }