uka.psp
Class PSP

java.lang.Object
  extended byuka.psp.PSP

public class PSP
extends java.lang.Object

Author:
Bernhard Haumacher

Nested Class Summary
static class PSP.Port
           
 
Field Summary
static int ANYPORT
           
static int MAX_MESSAGE_SIZE
           
 
Constructor Summary
PSP()
           
 
Method Summary
static PSP.Port createPort(int portNr)
          Create a new port object for communication over the PSP network interface.
static int getNodeID()
           
private static void pspClose(long portHandle)
           
static void pspDump()
           
private static void pspFinalize()
           
private static int pspGetNodeID()
           
private static int pspGetPortNo(long portHandle)
           
private static void pspInit()
           
private static long pspOpen(int port)
           
private static int pspReceiveBlockingBoolean(long portHandle, boolean[] buffer, int offset, int cnt)
           
private static int pspReceiveBlockingByte(long portHandle, byte[] buffer, int offset, int cnt)
           
private static int pspReceiveBlockingChar(long portHandle, char[] buffer, int offset, int cnt)
           
private static int pspReceiveBlockingDouble(long portHandle, double[] buffer, int offset, int cnt)
           
private static int pspReceiveBlockingFloat(long portHandle, float[] buffer, int offset, int cnt)
           
private static int pspReceiveBlockingInt(long portHandle, int[] buffer, int offset, int cnt)
           
private static int pspReceiveBlockingLong(long portHandle, long[] buffer, int offset, int cnt)
           
private static int pspReceiveBlockingShort(long portHandle, short[] buffer, int offset, int cnt)
           
private static void pspSendBlockingBoolean(long portHandle, int portTo, int nodeTo, boolean[] buffer, int offset, int cnt)
           
private static void pspSendBlockingByte(long portHandle, int portTo, int nodeTo, byte[] buffer, int offset, int cnt)
           
private static void pspSendBlockingChar(long portHandle, int portTo, int nodeTo, char[] buffer, int offset, int cnt)
           
private static void pspSendBlockingDouble(long portHandle, int portTo, int nodeTo, double[] buffer, int offset, int cnt)
           
private static void pspSendBlockingFloat(long portHandle, int portTo, int nodeTo, float[] buffer, int offset, int cnt)
           
private static void pspSendBlockingInt(long portHandle, int portTo, int nodeTo, int[] buffer, int offset, int cnt)
           
private static void pspSendBlockingLong(long portHandle, int portTo, int nodeTo, long[] buffer, int offset, int cnt)
           
private static void pspSendBlockingShort(long portHandle, int portTo, int nodeTo, short[] buffer, int offset, int cnt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANYPORT

public static final int ANYPORT
See Also:
Constant Field Values

MAX_MESSAGE_SIZE

public static final int MAX_MESSAGE_SIZE
See Also:
Constant Field Values
Constructor Detail

PSP

public PSP()
Method Detail

getNodeID

public static int getNodeID()
                     throws java.io.IOException
Throws:
java.io.IOException

createPort

public static PSP.Port createPort(int portNr)
                           throws java.io.IOException
Create a new port object for communication over the PSP network interface. If the port number is ANYPORT, an arbitrary free port is allocated.

Throws:
java.io.IOException

pspInit

private static void pspInit()
                     throws java.io.IOException
Throws:
java.io.IOException

pspFinalize

private static void pspFinalize()

pspOpen

private static long pspOpen(int port)
                     throws java.io.IOException
Throws:
java.io.IOException

pspClose

private static void pspClose(long portHandle)
                      throws java.io.IOException
Throws:
java.io.IOException

pspReceiveBlockingByte

private static int pspReceiveBlockingByte(long portHandle,
                                          byte[] buffer,
                                          int offset,
                                          int cnt)
                                   throws java.io.IOException
Throws:
java.io.IOException

pspSendBlockingByte

private static void pspSendBlockingByte(long portHandle,
                                        int portTo,
                                        int nodeTo,
                                        byte[] buffer,
                                        int offset,
                                        int cnt)
                                 throws java.io.IOException
Throws:
java.io.IOException

pspReceiveBlockingBoolean

private static int pspReceiveBlockingBoolean(long portHandle,
                                             boolean[] buffer,
                                             int offset,
                                             int cnt)
                                      throws java.io.IOException
Throws:
java.io.IOException

pspSendBlockingBoolean

private static void pspSendBlockingBoolean(long portHandle,
                                           int portTo,
                                           int nodeTo,
                                           boolean[] buffer,
                                           int offset,
                                           int cnt)
                                    throws java.io.IOException
Throws:
java.io.IOException

pspReceiveBlockingFloat

private static int pspReceiveBlockingFloat(long portHandle,
                                           float[] buffer,
                                           int offset,
                                           int cnt)
                                    throws java.io.IOException
Throws:
java.io.IOException

pspSendBlockingFloat

private static void pspSendBlockingFloat(long portHandle,
                                         int portTo,
                                         int nodeTo,
                                         float[] buffer,
                                         int offset,
                                         int cnt)
                                  throws java.io.IOException
Throws:
java.io.IOException

pspReceiveBlockingDouble

private static int pspReceiveBlockingDouble(long portHandle,
                                            double[] buffer,
                                            int offset,
                                            int cnt)
                                     throws java.io.IOException
Throws:
java.io.IOException

pspSendBlockingDouble

private static void pspSendBlockingDouble(long portHandle,
                                          int portTo,
                                          int nodeTo,
                                          double[] buffer,
                                          int offset,
                                          int cnt)
                                   throws java.io.IOException
Throws:
java.io.IOException

pspReceiveBlockingInt

private static int pspReceiveBlockingInt(long portHandle,
                                         int[] buffer,
                                         int offset,
                                         int cnt)
                                  throws java.io.IOException
Throws:
java.io.IOException

pspSendBlockingInt

private static void pspSendBlockingInt(long portHandle,
                                       int portTo,
                                       int nodeTo,
                                       int[] buffer,
                                       int offset,
                                       int cnt)
                                throws java.io.IOException
Throws:
java.io.IOException

pspReceiveBlockingLong

private static int pspReceiveBlockingLong(long portHandle,
                                          long[] buffer,
                                          int offset,
                                          int cnt)
                                   throws java.io.IOException
Throws:
java.io.IOException

pspSendBlockingLong

private static void pspSendBlockingLong(long portHandle,
                                        int portTo,
                                        int nodeTo,
                                        long[] buffer,
                                        int offset,
                                        int cnt)
                                 throws java.io.IOException
Throws:
java.io.IOException

pspReceiveBlockingChar

private static int pspReceiveBlockingChar(long portHandle,
                                          char[] buffer,
                                          int offset,
                                          int cnt)
                                   throws java.io.IOException
Throws:
java.io.IOException

pspSendBlockingChar

private static void pspSendBlockingChar(long portHandle,
                                        int portTo,
                                        int nodeTo,
                                        char[] buffer,
                                        int offset,
                                        int cnt)
                                 throws java.io.IOException
Throws:
java.io.IOException

pspReceiveBlockingShort

private static int pspReceiveBlockingShort(long portHandle,
                                           short[] buffer,
                                           int offset,
                                           int cnt)
                                    throws java.io.IOException
Throws:
java.io.IOException

pspSendBlockingShort

private static void pspSendBlockingShort(long portHandle,
                                         int portTo,
                                         int nodeTo,
                                         short[] buffer,
                                         int offset,
                                         int cnt)
                                  throws java.io.IOException
Throws:
java.io.IOException

pspGetNodeID

private static int pspGetNodeID()
                         throws java.io.IOException
Throws:
java.io.IOException

pspGetPortNo

private static int pspGetPortNo(long portHandle)
                         throws java.io.IOException
Throws:
java.io.IOException

pspDump

public static void pspDump()