|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IParallelContext
Method Summary | ||
---|---|---|
void |
barrier()
Parallel barrier that requires all tasks to particpate. |
|
|
bcast(int type,
T buf,
int offset,
int count,
int sender)
Broadcast a message to all tasks in this parallel context |
|
void |
bcastByte(int type,
byte[] buf,
int offset,
int count,
int sender)
|
|
void |
bcastDouble(int type,
double[] buf,
int offset,
int count,
int sender)
|
|
void |
bcastFloat(int type,
float[] buf,
int offset,
int count,
int sender)
|
|
void |
bcastInt(int type,
int[] buf,
int offset,
int count,
int sender)
|
|
void |
bcastLong(int type,
long[] buf,
int offset,
int count,
int sender)
|
|
void |
bcastShort(int type,
short[] buf,
int offset,
int count,
int sender)
|
|
|
collect(T a,
int aoffset,
T b,
int boffset,
int count)
Collect an array from all tasks and concatenate on the master task |
|
byte[] |
collectByte(byte a)
Collect a scalar from all tasks into an array and return to all |
|
void |
collectByte(byte[] a,
int aoffset,
byte[] b,
int boffset,
int count)
|
|
double[] |
collectDouble(double a)
|
|
void |
collectDouble(double[] a,
int aoffset,
double[] b,
int boffset,
int count)
|
|
float[] |
collectFloat(float a)
|
|
void |
collectFloat(float[] a,
int aoffset,
float[] b,
int boffset,
int count)
|
|
int[] |
collectInt(int a)
|
|
void |
collectInt(int[] a,
int aoffset,
int[] b,
int boffset,
int count)
|
|
long[] |
collectLong(long a)
|
|
void |
collectLong(long[] a,
int aoffset,
long[] b,
int boffset,
int count)
|
|
short[] |
collectShort(short a)
|
|
void |
collectShort(short[] a,
int aoffset,
short[] b,
int boffset,
int count)
|
|
void |
finish()
Complete participation in the parallel context |
|
|
globalMax(T a,
int aoffset,
T b,
int boffset,
int count)
|
|
void |
globalMaxByte(byte[] a,
int aoffset,
byte[] b,
int boffset,
int count)
|
|
void |
globalMaxDouble(double[] a,
int aoffset,
double[] b,
int boffset,
int count)
|
|
void |
globalMaxFloat(float[] a,
int aoffset,
float[] b,
int boffset,
int count)
|
|
void |
globalMaxInt(int[] a,
int aoffset,
int[] b,
int boffset,
int count)
|
|
void |
globalMaxLong(long[] a,
int aoffset,
long[] b,
int boffset,
int count)
|
|
void |
globalMaxShort(short[] a,
int aoffset,
short[] b,
int boffset,
int count)
|
|
|
globalMin(T a,
int aoffset,
T b,
int boffset,
int count)
|
|
void |
globalMinByte(byte[] a,
int aoffset,
byte[] b,
int boffset,
int count)
|
|
void |
globalMinDouble(double[] a,
int aoffset,
double[] b,
int boffset,
int count)
|
|
void |
globalMinFloat(float[] a,
int aoffset,
float[] b,
int boffset,
int count)
|
|
void |
globalMinInt(int[] a,
int aoffset,
int[] b,
int boffset,
int count)
|
|
void |
globalMinLong(long[] a,
int aoffset,
long[] b,
int boffset,
int count)
|
|
void |
globalMinShort(short[] a,
int aoffset,
short[] b,
int boffset,
int count)
|
|
|
globalSum(T a,
int aoffset,
T b,
int boffset,
int count)
Global operations across tasks in a ParallelContext Operations are provided for Sum, Min, and Max. |
|
void |
globalSumByte(byte[] a,
int aoffset,
byte[] b,
int boffset,
int count)
|
|
void |
globalSumDouble(double[] a,
int aoffset,
double[] b,
int boffset,
int count)
|
|
void |
globalSumFloat(float[] a,
int aoffset,
float[] b,
int boffset,
int count)
|
|
void |
globalSumInt(int[] a,
int aoffset,
int[] b,
int boffset,
int count)
|
|
void |
globalSumLong(long[] a,
int aoffset,
long[] b,
int boffset,
int count)
|
|
void |
globalSumShort(short[] a,
int aoffset,
short[] b,
int boffset,
int count)
|
|
boolean |
init(java.lang.String[] args)
Return true if this is the "master" task for master/slave style algorithms |
|
boolean |
isMaster()
Initialize the parallel context using mpiJava |
|
void |
masterPrint(java.lang.String s)
Print a string from the rank 0 task only A barrier is invoked, so all tasks must participate in the call to this method. |
|
int |
rank()
Return the rank (task index) of this task in the parallel context |
|
|
recv(int tag,
T buf,
int offset,
int count)
Receive a message from another task in this parallel context |
|
void |
recvByte(int tag,
byte[] buf,
int offset,
int count)
|
|
void |
recvDouble(int tag,
double[] buf,
int offset,
int count)
|
|
void |
recvFloat(int tag,
float[] buf,
int offset,
int count)
|
|
void |
recvInt(int tag,
int[] buf,
int offset,
int count)
|
|
void |
recvLong(int tag,
long[] buf,
int offset,
int count)
|
|
void |
recvShort(int tag,
short[] buf,
int offset,
int count)
|
|
|
send(int tag,
T buf,
int offset,
int count,
int dest)
Send a message to another task in this parallel context |
|
void |
sendByte(int tag,
byte[] buf,
int offset,
int count,
int dest)
|
|
void |
sendDouble(int tag,
double[] buf,
int offset,
int count,
int dest)
|
|
void |
sendFloat(int tag,
float[] buf,
int offset,
int count,
int dest)
|
|
void |
sendInt(int tag,
int[] buf,
int offset,
int count,
int dest)
|
|
void |
sendLong(int tag,
long[] buf,
int offset,
int count,
int dest)
|
|
void |
sendShort(int tag,
short[] buf,
int offset,
int count,
int dest)
|
|
void |
serialPrint(java.lang.String s)
Serialize printing a string from all tasks, so that one line at a time is printed A barrier is invoked, so all tasks must participate in the call to this method. |
|
|
shift(int nshift,
T a,
int offset,
int count,
T buf)
Shift an array of primitive or objects types across tasks in a parallel context |
|
void |
shiftByte(int nshift,
byte[] a,
int offset,
int count,
byte[] buf)
|
|
void |
shiftDouble(int nshift,
double[] a,
int offset,
int count,
double[] buf)
|
|
void |
shiftFloat(int nshift,
float[] a,
int offset,
int count,
float[] buf)
|
|
void |
shiftInt(int nshift,
int[] a,
int offset,
int count,
int[] buf)
|
|
void |
shiftLong(int nshift,
long[] a,
int offset,
int count,
long[] buf)
|
|
void |
shiftShort(int nshift,
short[] a,
int offset,
int count,
short[] buf)
|
|
int |
size()
Return the size (total number of tasks) in the parallel context |
|
|
ttran(int tileSize,
T a,
int startOffset,
T buf)
Transpose a "tiled" array across tasks in this parallel context. |
|
void |
ttranByte(int tileSize,
byte[] a,
int offset,
byte[] buf)
|
|
void |
ttranDouble(int tileSize,
double[] a,
int offset,
double[] buf)
|
|
void |
ttranFloat(int tileSize,
float[] a,
int offset,
float[] buf)
|
|
void |
ttranInt(int tileSize,
int[] a,
int offset,
int[] buf)
|
|
void |
ttranLong(int tileSize,
long[] a,
int offset,
long[] buf)
|
|
void |
ttranShort(int tileSize,
short[] a,
int offset,
short[] buf)
|
|
|
ttranv(int[] lena,
int[] aoffset,
T[] a,
int[] lenb,
int[] boffset,
T[] b)
|
|
|
ttranvInit(int[] lena,
int[] aoffset,
int[] lenb,
int[] boffset)
|
Method Detail |
---|
void barrier()
barrier()
<T> void bcast(int type, T buf, int offset, int count, int sender)
tag
- unique integer tag for this messagebuf
- array containing data to be sentoffset
- offset into array where broadcast will startcount
- count of elements to be sentsender
- rank of the source for this broadcastorg.javaseis.parallel.IParallelContext#bcast(int, T, int, int,
int)
void bcastByte(int type, byte[] buf, int offset, int count, int sender)
void bcastDouble(int type, double[] buf, int offset, int count, int sender)
void bcastFloat(int type, float[] buf, int offset, int count, int sender)
void bcastInt(int type, int[] buf, int offset, int count, int sender)
void bcastLong(int type, long[] buf, int offset, int count, int sender)
void bcastShort(int type, short[] buf, int offset, int count, int sender)
<T> void collect(T a, int aoffset, T b, int boffset, int count)
a
- source arrayaoffset
- offset within source array for the operationb
- result array, length size*count, where size is the context sizeboffset
- offset in the result array where results are placedcount
- number of elements to collect from each task. Output array
b will have count*ParallelContext.size() elements on output.
Methods support object and primitive types.byte[] collectByte(byte a)
a
- input scalar
void collectByte(byte[] a, int aoffset, byte[] b, int boffset, int count)
double[] collectDouble(double a)
void collectDouble(double[] a, int aoffset, double[] b, int boffset, int count)
float[] collectFloat(float a)
void collectFloat(float[] a, int aoffset, float[] b, int boffset, int count)
int[] collectInt(int a)
void collectInt(int[] a, int aoffset, int[] b, int boffset, int count)
long[] collectLong(long a)
void collectLong(long[] a, int aoffset, long[] b, int boffset, int count)
short[] collectShort(short a)
void collectShort(short[] a, int aoffset, short[] b, int boffset, int count)
void finish()
finish()
<T> void globalMax(T a, int aoffset, T b, int boffset, int count)
void globalMaxByte(byte[] a, int aoffset, byte[] b, int boffset, int count)
void globalMaxDouble(double[] a, int aoffset, double[] b, int boffset, int count)
void globalMaxFloat(float[] a, int aoffset, float[] b, int boffset, int count)
void globalMaxInt(int[] a, int aoffset, int[] b, int boffset, int count)
void globalMaxLong(long[] a, int aoffset, long[] b, int boffset, int count)
void globalMaxShort(short[] a, int aoffset, short[] b, int boffset, int count)
<T> void globalMin(T a, int aoffset, T b, int boffset, int count)
void globalMinByte(byte[] a, int aoffset, byte[] b, int boffset, int count)
void globalMinDouble(double[] a, int aoffset, double[] b, int boffset, int count)
void globalMinFloat(float[] a, int aoffset, float[] b, int boffset, int count)
void globalMinInt(int[] a, int aoffset, int[] b, int boffset, int count)
void globalMinLong(long[] a, int aoffset, long[] b, int boffset, int count)
void globalMinShort(short[] a, int aoffset, short[] b, int boffset, int count)
<T> void globalSum(T a, int aoffset, T b, int boffset, int count)
aoffset
- offset in input array at which to begin the operationb
- output array containing result across tasksboffset
- offset in output array where results will be placedcount
- number of elements to operate onvoid globalSumByte(byte[] a, int aoffset, byte[] b, int boffset, int count)
void globalSumDouble(double[] a, int aoffset, double[] b, int boffset, int count)
void globalSumFloat(float[] a, int aoffset, float[] b, int boffset, int count)
void globalSumInt(int[] a, int aoffset, int[] b, int boffset, int count)
void globalSumLong(long[] a, int aoffset, long[] b, int boffset, int count)
void globalSumShort(short[] a, int aoffset, short[] b, int boffset, int count)
boolean init(java.lang.String[] args)
org.javaseis.parallel.IParallelContext#init()
boolean isMaster()
args
- command line argument stringsorg.javaseis.parallel.IParallelContext#init()
void masterPrint(java.lang.String s)
s
- string to be printedint rank()
rank()
<T> void recv(int tag, T buf, int offset, int count)
tag
- unique integer tag for this messagebuf
- array to receive dataoffset
- offset into array where receive will startcount
- maximum count of elements to be receivedorg.javaseis.parallel.IParallelContext#recv(int, T, int, int)
void recvByte(int tag, byte[] buf, int offset, int count)
void recvDouble(int tag, double[] buf, int offset, int count)
void recvFloat(int tag, float[] buf, int offset, int count)
void recvInt(int tag, int[] buf, int offset, int count)
void recvLong(int tag, long[] buf, int offset, int count)
void recvShort(int tag, short[] buf, int offset, int count)
<T> void send(int tag, T buf, int offset, int count, int dest)
tag
- unique integer tag for this messagebuf
- array containing data to be sentoffset
- offset into array where send will startcount
- count of elements to be sentdest
- rank of the destination for this messageorg.javaseis.parallel.IParallelContext#send(int, T, int, int, int)
void sendByte(int tag, byte[] buf, int offset, int count, int dest)
void sendDouble(int tag, double[] buf, int offset, int count, int dest)
void sendFloat(int tag, float[] buf, int offset, int count, int dest)
void sendInt(int tag, int[] buf, int offset, int count, int dest)
void sendLong(int tag, long[] buf, int offset, int count, int dest)
void sendShort(int tag, short[] buf, int offset, int count, int dest)
void serialPrint(java.lang.String s)
s
- string to be printed<T> void shift(int nshift, T a, int offset, int count, T buf)
type
- MPI data type, i.e. MPI.INT, MPI.OBJECT, etca
- input array of objects or primitive types to be shiftedoffset
- offset into array a that the shift will be performed uponcount
- number of array elements to shiftbuf
- a matching array to input array a, at least count elements in lengthorg.javaseis.parallel.IParallelContext#shift(int, T, int, int)
void shiftByte(int nshift, byte[] a, int offset, int count, byte[] buf)
void shiftDouble(int nshift, double[] a, int offset, int count, double[] buf)
void shiftFloat(int nshift, float[] a, int offset, int count, float[] buf)
void shiftInt(int nshift, int[] a, int offset, int count, int[] buf)
void shiftLong(int nshift, long[] a, int offset, int count, long[] buf)
void shiftShort(int nshift, short[] a, int offset, int count, short[] buf)
int size()
size()
<T> void ttran(int tileSize, T a, int startOffset, T buf)
tileSize
- size of the tile for the transposea
- array containing data to be transposedstartOffset
- index of start position in array a for transposebuf
- array of matching type of length "tileSize" used as work spacevoid ttranByte(int tileSize, byte[] a, int offset, byte[] buf)
void ttranDouble(int tileSize, double[] a, int offset, double[] buf)
void ttranFloat(int tileSize, float[] a, int offset, float[] buf)
void ttranInt(int tileSize, int[] a, int offset, int[] buf)
void ttranLong(int tileSize, long[] a, int offset, long[] buf)
void ttranShort(int tileSize, short[] a, int offset, short[] buf)
<T> void ttranv(int[] lena, int[] aoffset, T[] a, int[] lenb, int[] boffset, T[] b)
<T> void ttranvInit(int[] lena, int[] aoffset, int[] lenb, int[] boffset)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |