adding working version of TornadoDeviceOutput
@@ -28,26 +28,19 @@ package uk.ac.manchester.tornado.drivers.opencl;
import static uk.ac.manchester.tornado.runtime.TornadoRuntime.getTornadoRuntime;
-import uk.ac.manchester.tornado.drivers.opencl.runtime.OCLTornadoDevice;
import uk.ac.manchester.tornado.runtime.TornadoDriver;
-import uk.ac.manchester.tornado.runtime.api.TaskSchedule;
public class TornadoDeviceOutput {
public static void main(String[] args) {
final int numDrivers = getTornadoRuntime().getNumDrivers();
- System.out.printf("Current number of drivers: %d \n", numDrivers);
+ System.out.printf("Number of Tornado drivers: %d \n", numDrivers);
for (int driverIndex = 0; driverIndex < numDrivers; driverIndex++) {
- TaskSchedule s0 = new TaskSchedule("s" + driverIndex);
final TornadoDriver driver = getTornadoRuntime().getDriver(driverIndex);
final int numDevices = driver.getDeviceCount();
- System.out.println(numDevices);
+ System.out.printf("Number of devices: %d \n", numDevices);
for (int deviceIndex = 0; deviceIndex < numDevices; deviceIndex++) {
- System.out.println("s" + driverIndex + ".device=" + driverIndex + ":" + deviceIndex);
- // setProperty("s" + driverIndex + ".device=", driverIndex + ":" + deviceIndex);
- // s0.setDevice(driver.getDevice(deviceIndex));
- OCLTornadoDevice oclDevice = new OCLTornadoDevice(driverIndex, deviceIndex);
- // System.out.println(setDevice(driver.getDevice(deviceIndex));
+ System.out.println("Tornado device=" + driverIndex + ":" + deviceIndex);
System.out.println(driver.getDevice(deviceIndex));
}
