Package aleph

Examples of aleph.Join.waitFor()


    long duration = 0;
    for (int j = 0; j < iterations; j++) {
      long start = System.currentTimeMillis();
      for (Iterator e = PE.allPEs(); e.hasNext(); )
        thread.start((PE) e.next(), join);
      join.waitFor();
      long stop = System.currentTimeMillis();
      duration += (stop - start);
    }
    System.out.println(howMany + "\t" + (double) duration / (double)
        iterations);
View Full Code Here


    HelloThread thread = new HelloThread();
    Join join = new Join();
    long start = System.currentTimeMillis();
    for (Iterator e = PE.allPEs(); e.hasNext(); )
      thread.start((PE) e.next(), join);
    join.waitFor();
  }
}
View Full Code Here

      if(level[j] > level[k]) {
        Moder m = new Moder(gb[j], gb[k]);
        m.start((PE)e.next(), join);
      }
  }
      join.waitFor();
    }
   
    //write the columns back
    for(int i=0; i<n; i++) {
      Column ctmp = (Column)gb[i].open("r");
View Full Code Here

      Join join = new Join();
      for(int j=k+1; j<n; j++) {
  Moder m = new Moder(gb[j], gb[k]);
  m.start((PE)e.next(), join);
      }
      join.waitFor();
    }

    //write the columns back
    for(int i=0; i<n; i++) {
      Column ctmp = (Column)gb[i].open("r");
View Full Code Here

      Aleph.warning("Release failed: " + ale.getMessage());
    }
    Builder builder = new Builder(gb, leftN, dir, peNo+numPE/2, numPE/2,
          minX, med, minY, maxY);
    builder.start(PE.getPE(peNo+numPE/2), jv);
    jv.waitFor();
    t = (Tree) gb.open("w");
  }
      }
     
      if (rightN == 0)
View Full Code Here

      Aleph.warning("Release failed: " + ale.getMessage());
    }
    Builder builder = new Builder(gb, leftN, dir, peNo+numPE/2, numPE/2,
          minX, maxX, minY, med);
    builder.start(PE.getPE(peNo+numPE/2), jv);
    jv.waitFor();
    t = (Tree) gb.open("w");
  }
      }

      if (rightN == 0)
View Full Code Here

    }

    t._size = n;
    t._next = null;
    t._prev = null;
    jv.waitFor();
   
    try {
      gb.release();
    } catch (AlephException ale) {
      Aleph.warning("Release failed: " + ale.getMessage());
View Full Code Here

  Traveler traveler = new Traveler(gb, gtleft, sz, nproc_2);
  traveler.start(pid, jv);
      }
   
      grightval = go(gtright, sz, nproc_2);
      jv.waitFor();
      return merge(gleftval, grightval, gt, nproc);
    } catch (Exception e) {
      Aleph.panic(e);
      return null;    // not reached
    }
View Full Code Here

    long t0 = System.currentTimeMillis();

    InitDataThread forkInitData = new InitDataThread( n );
    for (Iterator e = PE.allPEs(); e.hasNext(); )
      forkInitData.start( (PE) e.next() , join );
    join.waitFor();
    // get returned value
    while(join.hasNext()) {
      try{
        Data d = (Data)join.next();
        data[ d.pe ] = d;
View Full Code Here

      for ( pe = 0; pe < PE.numPEs(); pe++ ) {
        BookKeepingThread forkBookKeeping = new BookKeepingThread( data[pe] );
        forkBookKeeping.start( PE.getPE(pe), join );
     
      join.waitFor();
      // get returned value
      while(join.hasNext()) {
        try{
          Data d = (Data)join.next();
          data[ d.pe ] = d;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.