added more stuff to test
This commit is contained in:
@@ -24,9 +24,9 @@ public class Main {
|
||||
Imgproc.cvtColor(mat, mat, org.opencv.imgproc.Imgproc.COLOR_BGR2GRAY);
|
||||
Imgproc.Canny(mat, edges, 15, 45);
|
||||
});
|
||||
utils.setInput(new MatInput(Imgcodecs.imread("src/main/resources/car.jpg")));
|
||||
utils.setInput(new MatInput(Imgcodecs.imread("src/main/resources/skyscraper_large.jpg")));
|
||||
utils.initializeCommands();
|
||||
utils.warmup(10);
|
||||
utils.runTests(50);
|
||||
utils.warmup(5);
|
||||
utils.runTests(10);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,13 @@ import de.unidue.nes.gpu.testframework.exception.NotInitializedException;
|
||||
import de.unidue.nes.gpu.testframework.internal.mathandling.MatConverter;
|
||||
import de.unidue.nes.gpu.testframework.internal.mathandling.MatPool;
|
||||
import de.unidue.nes.gpu.testframework.internal.pipeline.TestPipeline;
|
||||
import de.unidue.nes.gpu.testframework.internal.resulthandling.Result;
|
||||
import de.unidue.nes.gpu.testframework.internal.resulthandling.ResultHandler;
|
||||
import de.unidue.nes.gpu.testframework.internal.resulthandling.TestExecution;
|
||||
import de.unidue.nes.gpu.testframework.internal.tasks.general.DownloadTask;
|
||||
import de.unidue.nes.gpu.testframework.internal.tasks.general.PagelockedUploadTask;
|
||||
import de.unidue.nes.gpu.testframework.internal.tasks.general.PipelineTask;
|
||||
import de.unidue.nes.gpu.testframework.internal.tasks.general.UploadTask;
|
||||
import de.unidue.nes.gpu.testframework.internal.timing.TimeDto;
|
||||
import de.unidue.nes.gpu.testframework.internal.timing.TimingUtil;
|
||||
import de.unidue.nes.gpu.testframework.tasks.GpuTask;
|
||||
@@ -137,9 +144,10 @@ public class TestUtils<T> {
|
||||
|
||||
private void testCPUPipeline(List<Task> tasks, int iterations) {
|
||||
Runnable setup = () -> this.originalInput.copyTo(this.input);
|
||||
Runnable toTest = () -> tasks.forEach(t -> t.toCpuTask().run());
|
||||
PipelineTask task = new PipelineTask(() -> tasks.forEach(t -> t.toCpuTask().run()), NOOP);
|
||||
|
||||
TimeDto time = TimingUtil.testPerformance(setup, toTest, NOOP, iterations);
|
||||
TimeDto time = TimingUtil.testPerformance(setup, task.toCpuTask(), NOOP, iterations);
|
||||
ResultHandler.newResult(new Result(task, TestExecution.CPU, time));
|
||||
}
|
||||
|
||||
private void testCPUTaskInIsolation(List<Task> tasks, int index, int iterations) {
|
||||
@@ -150,6 +158,7 @@ public class TestUtils<T> {
|
||||
}
|
||||
};
|
||||
TimeDto time = TimingUtil.testPerformance(setup, tasks.get(index).toCpuTask(), NOOP, iterations);
|
||||
ResultHandler.newResult(new Result(tasks.get(index), TestExecution.CPU, time));
|
||||
}
|
||||
|
||||
public void runGPUTests(int iterations) {
|
||||
@@ -167,74 +176,39 @@ public class TestUtils<T> {
|
||||
}
|
||||
|
||||
private void testPageLockedUpload(int iterations) {
|
||||
org.bytedeco.opencv.opencv_core.Mat[] jcvMat = new org.bytedeco.opencv.opencv_core.Mat[1];
|
||||
GpuMat[] gpuMat = new GpuMat[1];
|
||||
|
||||
Runnable setUp = () -> {
|
||||
jcvMat[0] = new org.bytedeco.opencv.opencv_core.Mat();
|
||||
gpuMat[0] = new GpuMat();
|
||||
this.originalInput.copyTo(this.input);
|
||||
MatConverter.copyMat(this.input.toMat(), jcvMat[0]);
|
||||
opencv_core.registerPageLocked(jcvMat[0]);
|
||||
};
|
||||
Runnable test = () -> gpuMat[0].upload(jcvMat[0]);
|
||||
|
||||
Runnable cleanUp = () -> {
|
||||
opencv_core.unregisterPageLocked(jcvMat[0]);
|
||||
gpuMat[0].close();
|
||||
jcvMat[0].close();
|
||||
};
|
||||
TimeDto time = TimingUtil.testPerformance(setUp, test, cleanUp, iterations);
|
||||
PagelockedUploadTask task = new PagelockedUploadTask(this.input.toMat());
|
||||
testSpecialGpuMethod(iterations, task);
|
||||
}
|
||||
|
||||
private void testDownload(int iterations) {
|
||||
org.bytedeco.opencv.opencv_core.Mat[] jcvMat = new org.bytedeco.opencv.opencv_core.Mat[1];
|
||||
GpuMat[] gpuMat = new GpuMat[1];
|
||||
|
||||
Runnable setUp = () -> {
|
||||
jcvMat[0] = new org.bytedeco.opencv.opencv_core.Mat();
|
||||
gpuMat[0] = new GpuMat();
|
||||
this.originalInput.copyTo(this.input);
|
||||
MatConverter.copyMat(this.input.toMat(), jcvMat[0]);
|
||||
gpuMat[0].upload(jcvMat[0]);
|
||||
};
|
||||
Runnable test = () -> gpuMat[0].download(jcvMat[0]);
|
||||
|
||||
Runnable cleanUp = () -> {
|
||||
gpuMat[0].close();
|
||||
jcvMat[0].close();
|
||||
};
|
||||
TimeDto time = TimingUtil.testPerformance(setUp, test, cleanUp, iterations);
|
||||
DownloadTask task = new DownloadTask(this.input.toMat());
|
||||
testSpecialGpuMethod(iterations, task);
|
||||
}
|
||||
|
||||
private void testUpload(int iterations) {
|
||||
org.bytedeco.opencv.opencv_core.Mat[] jcvMat = new org.bytedeco.opencv.opencv_core.Mat[1];
|
||||
GpuMat[] gpuMat = new GpuMat[1];
|
||||
UploadTask task = new UploadTask(this.input.toMat());
|
||||
testSpecialGpuMethod(iterations, task);
|
||||
}
|
||||
|
||||
Runnable setUp = () -> {
|
||||
jcvMat[0] = new org.bytedeco.opencv.opencv_core.Mat();
|
||||
gpuMat[0] = new GpuMat();
|
||||
private void testSpecialGpuMethod(int iterations, Task task) {
|
||||
GpuTask gpuTask = task.toGpuTask();
|
||||
TimeDto time = TimingUtil.testPerformance(() -> {
|
||||
this.originalInput.copyTo(this.input);
|
||||
MatConverter.copyMat(this.input.toMat(), jcvMat[0]);
|
||||
};
|
||||
Runnable test = () -> gpuMat[0].upload(jcvMat[0]);
|
||||
|
||||
Runnable cleanUp = () -> {
|
||||
gpuMat[0].close();
|
||||
jcvMat[0].close();
|
||||
};
|
||||
TimeDto time = TimingUtil.testPerformance(setUp, test, cleanUp, iterations);
|
||||
gpuTask.init();
|
||||
}, gpuTask::run, gpuTask::cleanUp, iterations);
|
||||
ResultHandler.newResult(new Result(task, TestExecution.GPU, time));
|
||||
}
|
||||
|
||||
private void testGPUTaskInIsolation(List<Task> tasks, int index, int iterations) {
|
||||
GpuTask toTest = tasks.get(index).toGpuTask();
|
||||
Task task = tasks.get(index);
|
||||
GpuTask toTest = task.toGpuTask();
|
||||
Runnable setup = () -> {
|
||||
this.originalInput.copyTo(this.input);
|
||||
for (int j = 0; j < index; j++) {
|
||||
GpuTask task = tasks.get(j).toGpuTask();
|
||||
task.init();
|
||||
task.run();
|
||||
task.cleanUp();
|
||||
GpuTask gpuTask = tasks.get(j).toGpuTask();
|
||||
gpuTask.init();
|
||||
gpuTask.run();
|
||||
gpuTask.cleanUp();
|
||||
}
|
||||
toTest.init();
|
||||
};
|
||||
@@ -243,6 +217,8 @@ public class TestUtils<T> {
|
||||
MatPool.reset();
|
||||
};
|
||||
TimeDto time = TimingUtil.testPerformance(setup, toTest, cleanUp, iterations);
|
||||
ResultHandler.newResult(new Result(task, TestExecution.GPU, time));
|
||||
|
||||
}
|
||||
|
||||
private void checkNotInitialized() {
|
||||
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package de.unidue.nes.gpu.testframework.internal.resulthandling;
|
||||
|
||||
import de.unidue.nes.gpu.testframework.internal.timing.TimeDto;
|
||||
import de.unidue.nes.gpu.testframework.tasks.Task;
|
||||
|
||||
/**
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class Result {
|
||||
|
||||
private final Task task;
|
||||
|
||||
private final TestExecution execution;
|
||||
|
||||
private final TimeDto time;
|
||||
|
||||
public Result(Task task, TestExecution execution, TimeDto time) {
|
||||
this.task = task;
|
||||
this.execution = execution;
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public Task getTask() {
|
||||
return this.task;
|
||||
}
|
||||
|
||||
public TestExecution getExecution() {
|
||||
return this.execution;
|
||||
}
|
||||
|
||||
public TimeDto getTime() {
|
||||
return this.time;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.task.getDescription() + " on " + this.execution + " took " + this.time.toString();
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package de.unidue.nes.gpu.testframework.internal.resulthandling;
|
||||
|
||||
/**
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class ResultHandler {
|
||||
|
||||
private ResultHandler() {
|
||||
}
|
||||
|
||||
public static void newResult(Result result) {
|
||||
System.out.println(result);
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package de.unidue.nes.gpu.testframework.internal.resulthandling;
|
||||
|
||||
/**
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*
|
||||
*/
|
||||
public enum TestExecution {
|
||||
CPU, GPU
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package de.unidue.nes.gpu.testframework.internal.tasks.general;
|
||||
|
||||
import org.bytedeco.opencv.opencv_core.GpuMat;
|
||||
import org.opencv.core.Mat;
|
||||
|
||||
import de.unidue.nes.gpu.testframework.internal.mathandling.MatConverter;
|
||||
import de.unidue.nes.gpu.testframework.tasks.CpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.GpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.Task;
|
||||
|
||||
/**
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*
|
||||
*/
|
||||
public class DownloadTask implements Task {
|
||||
|
||||
private Mat mat;
|
||||
|
||||
public DownloadTask(Mat mat) {
|
||||
this.mat = mat;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CpuTask toCpuTask() {
|
||||
return () -> {
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public GpuTask toGpuTask() {
|
||||
return new GpuTask() {
|
||||
|
||||
private org.bytedeco.opencv.opencv_core.Mat jcvMat;
|
||||
private GpuMat gpuMat;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
this.gpuMat.download(this.jcvMat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
this.jcvMat = new org.bytedeco.opencv.opencv_core.Mat();
|
||||
this.gpuMat = new GpuMat();
|
||||
MatConverter.copyMat(DownloadTask.this.mat, this.jcvMat);
|
||||
this.gpuMat.upload(this.jcvMat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cleanUp() {
|
||||
this.gpuMat.close();
|
||||
this.jcvMat.close();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Download of " + this.mat;
|
||||
}
|
||||
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package de.unidue.nes.gpu.testframework.internal.tasks.general;
|
||||
|
||||
import org.bytedeco.opencv.global.opencv_core;
|
||||
import org.bytedeco.opencv.opencv_core.GpuMat;
|
||||
import org.opencv.core.Mat;
|
||||
|
||||
import de.unidue.nes.gpu.testframework.internal.mathandling.MatConverter;
|
||||
import de.unidue.nes.gpu.testframework.tasks.CpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.GpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.Task;
|
||||
|
||||
/**
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*
|
||||
*/
|
||||
public class PagelockedUploadTask implements Task {
|
||||
|
||||
private Mat mat;
|
||||
|
||||
public PagelockedUploadTask(Mat mat) {
|
||||
this.mat = mat;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CpuTask toCpuTask() {
|
||||
return () -> {
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public GpuTask toGpuTask() {
|
||||
return new GpuTask() {
|
||||
|
||||
private org.bytedeco.opencv.opencv_core.Mat jcvMat;
|
||||
private GpuMat gpuMat;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
this.gpuMat.upload(this.jcvMat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
this.jcvMat = new org.bytedeco.opencv.opencv_core.Mat();
|
||||
this.gpuMat = new GpuMat();
|
||||
MatConverter.copyMat(PagelockedUploadTask.this.mat, this.jcvMat);
|
||||
opencv_core.registerPageLocked(this.jcvMat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cleanUp() {
|
||||
opencv_core.unregisterPageLocked(this.jcvMat);
|
||||
this.gpuMat.close();
|
||||
this.jcvMat.close();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Page-locked upload of " + this.mat;
|
||||
}
|
||||
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package de.unidue.nes.gpu.testframework.internal.tasks.general;
|
||||
|
||||
import de.unidue.nes.gpu.testframework.tasks.CpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.GpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.Task;
|
||||
|
||||
/**
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*
|
||||
*/
|
||||
public class PipelineTask implements Task {
|
||||
|
||||
private final Runnable cpuPipeline;
|
||||
|
||||
private final Runnable gpuPipeline;
|
||||
|
||||
public PipelineTask(Runnable cpuPipeline, Runnable gpuPipeline) {
|
||||
this.cpuPipeline = cpuPipeline;
|
||||
this.gpuPipeline = gpuPipeline;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CpuTask toCpuTask() {
|
||||
return this.cpuPipeline::run;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GpuTask toGpuTask() {
|
||||
return new GpuTask() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
PipelineTask.this.gpuPipeline.run();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
// nothing to init
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cleanUp() {
|
||||
// nothing to clean up
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Pipeline";
|
||||
}
|
||||
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package de.unidue.nes.gpu.testframework.internal.tasks.general;
|
||||
|
||||
import org.bytedeco.opencv.opencv_core.GpuMat;
|
||||
import org.opencv.core.Mat;
|
||||
|
||||
import de.unidue.nes.gpu.testframework.internal.mathandling.MatConverter;
|
||||
import de.unidue.nes.gpu.testframework.tasks.CpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.GpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.Task;
|
||||
|
||||
/**
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*
|
||||
*/
|
||||
public class UploadTask implements Task {
|
||||
|
||||
private Mat mat;
|
||||
|
||||
public UploadTask(Mat mat) {
|
||||
this.mat = mat;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CpuTask toCpuTask() {
|
||||
return () -> {
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public GpuTask toGpuTask() {
|
||||
return new GpuTask() {
|
||||
|
||||
private org.bytedeco.opencv.opencv_core.Mat jcvMat;
|
||||
private GpuMat gpuMat;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
this.gpuMat.upload(this.jcvMat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
this.jcvMat = new org.bytedeco.opencv.opencv_core.Mat();
|
||||
this.gpuMat = new GpuMat();
|
||||
MatConverter.copyMat(UploadTask.this.mat, this.jcvMat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cleanUp() {
|
||||
this.gpuMat.close();
|
||||
this.jcvMat.close();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Upload of " + this.mat;
|
||||
}
|
||||
|
||||
}
|
||||
+6
-13
@@ -33,19 +33,7 @@ public class Canny implements Task {
|
||||
|
||||
@Override
|
||||
public CpuTask toCpuTask() {
|
||||
return new CpuTask() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Imgproc.Canny(Canny.this.image, Canny.this.edges, Canny.this.threshold1, Canny.this.threshold2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Imgproc.Canny(" + Objects.toString(Canny.this.image) + ", " + Objects.toString(Canny.this.edges) + ", " + Canny.this.threshold1 + ", "
|
||||
+ Canny.this.threshold2 + ")";
|
||||
}
|
||||
};
|
||||
return () -> Imgproc.Canny(this.image, this.edges, this.threshold1, this.threshold2);
|
||||
|
||||
}
|
||||
|
||||
@@ -78,4 +66,9 @@ public class Canny implements Task {
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Imgproc.Canny(" + Objects.toString(this.image) + ", " + Objects.toString(this.edges) + ", " + this.threshold1 + ", " + this.threshold2 + ")";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+10
-12
@@ -54,18 +54,6 @@ public class CvtColor implements Task {
|
||||
Imgproc.cvtColor(CvtColor.this.src, CvtColor.this.dst, CvtColor.this.code, CvtColor.this.dstCn);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (CvtColor.this.numParams == 3) {
|
||||
return "Imgproc.cvtColor(" + Objects.toString(CvtColor.this.src) + ", " + Objects.toString(CvtColor.this.dst) + ", " + CvtColor.this.code
|
||||
+ ")";
|
||||
} else if (CvtColor.this.numParams == 4) {
|
||||
return "Imgproc.cvtColor(" + Objects.toString(CvtColor.this.src) + ", " + Objects.toString(CvtColor.this.dst) + ", " + CvtColor.this.code
|
||||
+ ", " + CvtColor.this.dstCn + ")";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -99,4 +87,14 @@ public class CvtColor implements Task {
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
if (this.numParams == 3) {
|
||||
return "Imgproc.cvtColor(" + Objects.toString(this.src) + ", " + Objects.toString(this.dst) + ", " + this.code + ")";
|
||||
} else if (this.numParams == 4) {
|
||||
return "Imgproc.cvtColor(" + Objects.toString(this.src) + ", " + Objects.toString(this.dst) + ", " + this.code + ", " + this.dstCn + ")";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
package de.unidue.nes.gpu.testframework.internal.timing;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class TimeDto {
|
||||
|
||||
private double avgTime;
|
||||
private double varTime;// sigma²
|
||||
private double stdAbweichung;// sqrt(varTime)
|
||||
private int iterations;
|
||||
private final double avgTime;
|
||||
private final double varTime;// sigma²
|
||||
private final double stdAbweichung;// sqrt(varTime)
|
||||
private final int iterations;
|
||||
private final TimeUnit unit;
|
||||
|
||||
public TimeDto(double avgTime, double varTime, double stdAbweichung, int iterations) {
|
||||
public TimeDto(double avgTime, double varTime, double stdAbweichung, int iterations, TimeUnit unit) {
|
||||
this.avgTime = avgTime;
|
||||
this.varTime = varTime;
|
||||
this.stdAbweichung = stdAbweichung;
|
||||
this.iterations = iterations;
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public double getAvgTime() {
|
||||
@@ -33,8 +37,21 @@ public class TimeDto {
|
||||
return this.iterations;
|
||||
}
|
||||
|
||||
public TimeUnit getUnit() {
|
||||
return this.unit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.avgTime + "";
|
||||
long longtime = (long) this.avgTime;
|
||||
long time = this.unit.toNanos(longtime);
|
||||
if (time < 1_000_000) {
|
||||
return time + " ns";
|
||||
}
|
||||
time = this.unit.toMillis(longtime);
|
||||
if (time < 1000) {
|
||||
return time + " ms";
|
||||
}
|
||||
return ((time / 100) / 10.0) + " s";
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -38,6 +38,6 @@ public class TimingUtil {
|
||||
var /= times.length;
|
||||
double stdAbw = Math.sqrt(var);
|
||||
|
||||
return new TimeDto(avg, var, stdAbw, iterations);
|
||||
return new TimeDto(avg, var, stdAbw, iterations, TimeUnit.NANOSECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,4 @@ public interface CpuTask extends Runnable {
|
||||
|
||||
@Override
|
||||
void run();
|
||||
|
||||
@Override
|
||||
String toString();
|
||||
}
|
||||
|
||||
@@ -12,7 +12,4 @@ public interface GpuTask extends Runnable {
|
||||
void run();
|
||||
|
||||
void cleanUp();
|
||||
|
||||
@Override
|
||||
String toString();
|
||||
}
|
||||
|
||||
@@ -8,4 +8,6 @@ public interface Task {
|
||||
CpuTask toCpuTask();
|
||||
|
||||
GpuTask toGpuTask();
|
||||
|
||||
String getDescription();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user