<Refactor> Prebuilt Task, removed dependency to OpenCL Tornado code
Github issue
@@ -35,7 +35,8 @@ import org.junit.Test;
import uk.ac.manchester.tornado.api.TaskSchedule;
import uk.ac.manchester.tornado.api.annotations.Parallel;
import uk.ac.manchester.tornado.api.common.Access;
-import uk.ac.manchester.tornado.drivers.opencl.OpenCL;
+import uk.ac.manchester.tornado.api.common.GenericDevice;
+import uk.ac.manchester.tornado.api.runtinface.TornadoRuntime;
public class PrebuiltTest {
@@ -58,6 +59,8 @@ public class PrebuiltTest {
Arrays.fill(a, 1);
Arrays.fill(b, 2);
+ GenericDevice defaultDevice = TornadoRuntime.getTornadoRuntime().getDefaultDevice();
+
// @formatter:off
new TaskSchedule("s0")
.prebuiltTask("t0",
@@ -65,7 +68,7 @@ public class PrebuiltTest {
tornadoSDK + "/examples/generated/add.cl",
new Object[] { a, b, c },
new Access[] { Access.READ, Access.READ, Access.WRITE },
- OpenCL.defaultDevice(),
+ defaultDevice,
new int[] { numElements })
.streamOut(c)
.execute();
