Esempio n. 1
0
 @Override
 public void sendReceive(
     int toRank, int sendTag, Buf sendBuf, int fromRank, int recvTag, Buf recvBuf)
     throws IOException {
   comm.sendReceive(
       toRank,
       sendTag,
       (edu.rit.mp.Buf) sendBuf.getBuffer(),
       fromRank,
       recvTag,
       (edu.rit.mp.Buf) recvBuf.getBuffer());
 }
Esempio n. 2
0
  @Override
  public void scatter(int root, int tag, Buf[] srcBuffers, Buf dstBuffer) throws IOException {
    if (srcBuffers == null) {
      comm.scatter(root, null, (edu.rit.mp.Buf) dstBuffer.getBuffer());
      return;
    }

    edu.rit.mp.Buf[] srcarray = new edu.rit.mp.Buf[srcBuffers.length];

    for (int i = 0; i < srcBuffers.length; i++)
      srcarray[i] = (edu.rit.mp.Buf) srcBuffers[i].getBuffer();

    comm.scatter(root, tag, srcarray, (edu.rit.mp.Buf) dstBuffer.getBuffer());
  }
Esempio n. 3
0
  @Override
  public void gather(int root, int tag, Buf srcBuffer, Buf[] dstBuffers) throws IOException {
    if (dstBuffers == null) {
      comm.gather(root, tag, (edu.rit.mp.Buf) srcBuffer.getBuffer(), null);
      return;
    }

    edu.rit.mp.Buf[] dstarray = new edu.rit.mp.Buf[dstBuffers.length];

    for (int i = 0; i < dstBuffers.length; i++) {
      dstarray[i] = (edu.rit.mp.Buf) dstBuffers[i].getBuffer();
    }

    comm.gather(root, tag, (edu.rit.mp.Buf) srcBuffer.getBuffer(), dstarray);
  }
Esempio n. 4
0
 //	@Override
 public void send(int toRank, Buf buffer) throws IOException {
   comm.send(toRank, (edu.rit.mp.Buf) buffer.getBuffer());
 }
Esempio n. 5
0
 @Override
 public void receive(int fromRank, int tag, Buf buffer) throws IOException {
   comm.receive(fromRank, tag, (edu.rit.mp.Buf) buffer.getBuffer());
 }
Esempio n. 6
0
 @Override
 public void broadcast(int root, int tag, Buf data) throws IOException {
   logger.debug("Broadcast Root = %d", comm.rank());
   comm.broadcast(root, tag, (edu.rit.mp.Buf) data.getBuffer());
 }