MPI.java :
package MPI;
public class MPI {
public Comm COMM_WORLD;
public Op MAX, MIN, SUM, PROD, LAND, BAND,
LOR, BOR, LXOR, BXOR, MINLOC, MAXLOC;
public MPI(String[] args);
public void finalize();
public native double Wtime();
public native double Wtick();
public native String Get_processor_name();
public native int Buffer_attach(byte[] buf);
public native int Buffer_detach(byte[] buf);
*
static {
System.loadLibrary("MPI");
}
}
Comm.java :
package MPI;
public class Comm {
public final static int NULL = 0;
public final static int SELF = 1;
public final static int WORLD = 2;
public Comm() { handle = 0;}
public Comm(int Type) { Setup(Type);}
private native void Setup(int Type);
public native int Barrier();
public native int Size(int[] size);
public native int Rank(int[] rank);
public native int Send(Datatype buf, int dest, int tag);
public native int Bsend(Datatype buf, int dest, int tag);
public native int Ssend(Datatype buf, int dest, int tag);
public native int Rsend(Datatype buf, int dest, int tag);
public native int Recv(Datatype buf, int source, int tag,
Status stat);
*
public native int Bcast(Datatype buf, int root);
public native int Gather(Datatype sbuf, Datatype rbuf, int root);
public native int Scatter(Datatype sbuf, Datatype rbuf, int root);
public native int Allgather(Datatype sbuf, Datatype rbuf);
public native int Alltoall(Datatype sbuf, Datatype rbuf);
public native int Reduce(Datatype sbuf, Datatype rbuf, Op op,
int root);
*
private long handle ;
}
Datatype.java :
package MPI ;
public class Datatype {
public Datatype() { handle = type = 0;}
public Datatype(byte[] data) { SetupByte(data);}
public Datatype(char[] data) { SetupChar(data);}
public Datatype(short[] data) { SetupShort(data);}
public Datatype(boolean[] data) { SetupBoolean(data);}
public Datatype(int[] data) { SetupInt(data);}
public Datatype(long[] data) { SetupLong(data);}
public Datatype(float[] data) { SetupFloat(data);}
public Datatype(double[] data) { SetupDouble(data);}
*
private native void SetupByte(byte[] data);
private native void SetupChar(char[] data);
private native void SetupShort(short[] data);
private native void SetupBoolean(boolean[] data);
private native void SetupInt(int[] data);
private native void SetupLong(long[] data);
private native void SetupFloat(float[] data);
private native void SetupDouble(double[] data);
*
private long handle, type;
private int size;
}
Op.java :
package MPI ;
public class Op {
public final static int NULL = 0;
public final static int MAX = 1;
public final static int MIN = 2;
public final static int SUM = 3;
public final static int PROD = 4;
public final static int LAND = 5;
public final static int BAND = 6;
public final static int LOR = 7;
public final static int BOR = 8;
public final static int LXOR = 9;
public final static int BXOR =10;
public final static int MINLOC=11;
public final static int MAXLOC=12;
public Op() { handle = 0;}
public Op(int Type) { Setup(Type);}
private native void Setup(int Type);
private long handle ;
}
Status.java :
package MPI ;
public class Status {
public int count;
public int SOURCE;
public int TAG;
public int ERROR;
}
Request.java :
package MPI ;
public class Request {
private long handle;
}