コード例 #1
0
  public Task<X> compute(SkeletonSystemImpl system, Task<P> parent) throws Exception {
    Timer timer = new Timer();

    X[] childObjects = div.divide(parent.getObject(), system);
    timer.stop();

    for (X o : childObjects) {
      Task<X> child = new Task<X>(o);
      child.setStack(instruction); // Each child task executes the same instruction stack
      parent.family.addReadyChild(child); // parent remebers it's children
    }

    parent.getStats().getWorkout().track(div, timer);
    return (Task<X>) parent;
  }
コード例 #2
0
  @SuppressWarnings("unchecked")
  public PrefetchFilesMatching getPrefetchFilesAnnotation() {
    Class cls = div.getClass();

    return (PrefetchFilesMatching) cls.getAnnotation(PrefetchFilesMatching.class);
  }