/** * Checks if the assignments made thus far are valid an within the constraints. */ public boolean isPartiallyValid() { int[] used = new int[executors.size()]; for (int i=0; i<mapping.length; i++) { ExecutorChunk ec = mapping[i]; if (ec==null) continue; if (!ec.canAccept(works(i))) return false; // invalid assignment if ((used[ec.index] += works(i).size()) > ec.capacity()) return false; } return true; }
/** * Checks if the assignments made thus far are valid an within the constraints. */ public boolean isPartiallyValid() { int[] used = new int[executors.size()]; for (int i=0; i<mapping.length; i++) { ExecutorChunk ec = mapping[i]; if (ec==null) continue; if (!ec.canAccept(works(i))) return false; // invalid assignment if ((used[ec.index] += works(i).size()) > ec.capacity()) return false; } return true; }
/** * Checks if the assignments made thus far are valid an within the constraints. */ public boolean isPartiallyValid() { int[] used = new int[executors.size()]; for (int i=0; i<mapping.length; i++) { ExecutorChunk ec = mapping[i]; if (ec==null) continue; if (!ec.canAccept(works(i))) return false; // invalid assignment if ((used[ec.index] += works(i).size()) > ec.capacity()) return false; } return true; }
/** * Checks if the assignments made thus far are valid an within the * constraints. */ public boolean isPartiallyValid() { int[] used = new int[executors.size()]; for (int i = 0; i < mapping.length; i++) { ExecutorChunk ec = mapping[i]; if (ec == null) { continue; } if (!ec.canAccept(works(i))) { return false; // invalid assignment } if ((used[ec.index] += works(i).size()) > ec.capacity()) { return false; } } return true; }
/** * Checks if the assignments made thus far are valid an within the constraints. */ public boolean isPartiallyValid() { int[] used = new int[executors.size()]; for (int i=0; i<mapping.length; i++) { ExecutorChunk ec = mapping[i]; if (ec==null) continue; if (!ec.canAccept(works(i))) return false; // invalid assignment if ((used[ec.index] += works(i).size()) > ec.capacity()) return false; } return true; }
/** * Checks if the assignments made thus far are valid an within the constraints. */ public boolean isPartiallyValid() { int[] used = new int[executors.size()]; for (int i=0; i<mapping.length; i++) { ExecutorChunk ec = mapping[i]; if (ec==null) continue; if (!ec.canAccept(works(i))) return false; // invalid assignment if ((used[ec.index] += works(i).size()) > ec.capacity()) return false; } return true; }
private void execute(WorkChunk wc, WorkUnitContext wuc) { assert capacity() >= wc.size(); int e = 0; for (SubTask s : wc) { while (!get(e).isAvailable()) e++; get(e++).set(wuc.createWorkUnit(s)); } } }
private void execute(WorkChunk wc, WorkUnitContext wuc) { assert capacity() >= wc.size(); int e = 0; for (SubTask s : wc) { while (!get(e).isAvailable()) e++; get(e++).set(wuc.createWorkUnit(s)); } } }
private void execute(WorkChunk wc, WorkUnitContext wuc) { assert capacity() >= wc.size(); int e = 0; for (SubTask s : wc) { while (!get(e).isAvailable()) e++; get(e++).set(wuc.createWorkUnit(s)); } } }
private void execute(WorkChunk wc, WorkUnitContext wuc) { assert capacity() >= wc.size(); int e = 0; for (SubTask s : wc) { while (!get(e).isAvailable()) { e++; } get(e++).set(wuc.createWorkUnit(s)); } } }
private void execute(WorkChunk wc, WorkUnitContext wuc) { assert capacity() >= wc.size(); int e = 0; for (SubTask s : wc) { while (!get(e).isAvailable()) e++; get(e++).set(wuc.createWorkUnit(s)); } } }
private void execute(WorkChunk wc, WorkUnitContext wuc) { assert capacity() >= wc.size(); int e = 0; for (SubTask s : wc) { while (!get(e).isAvailable()) e++; get(e++).set(wuc.createWorkUnit(s)); } } }