[refactor] Replaced static integers in comparison with a constant array
@@ -48,6 +48,7 @@ import static uk.ac.manchester.tornado.runtime.tasks.meta.MetaDataUtils.resolveD
public abstract class AbstractMetaData implements TaskMetaDataInterface {
+ private static final long[] SEQUENTIAL_GLOBAL_WORK_GROUP = { 1, 1, 1 };
private String id;
private TornadoAcceleratorDevice device;
private boolean shouldRecompile;
@@ -476,7 +477,7 @@ public abstract class AbstractMetaData implements TaskMetaDataInterface {
}
public boolean isGridSequential() {
- return getWorkerGrid(getId()).getGlobalWork()[0] == 1 && getWorkerGrid(getId()).getGlobalWork()[1] == 1 && getWorkerGrid(getId()).getGlobalWork()[2] == 1;
+ return Arrays.equals(getWorkerGrid(getId()).getGlobalWork(), SEQUENTIAL_GLOBAL_WORK_GROUP);
}
public WorkerGrid getWorkerGrid(String taskName) {
