|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.multicorebsp.core.BSP_GLOBAL_COMM<T[],S>
com.multicorebsp.core.BSP_GLOBAL_ARR_COMM<java.lang.Integer,BSP_INT_ARRAY>
com.multicorebsp.core.BSP_INT_ARRAY
public class BSP_INT_ARRAY
This class represents a global double[] type.
Apart from the general vector-like read / write methods, bulk-synchronous
message passing (BSMP) and direct remote memory access (DRMA) methods are
available.
This class is to be used within the parallel part of an instance of a
BSP_PROGRAM.
BSP_REGISTER,
BSP_DOUBLE_ARRAY,
BSP_PROGRAM| Field Summary | |
|---|---|
protected com.multicorebsp.core.BSP_GLOBAL<com.multicorebsp.core.BSP_INT_ARRAY.Wrapper> |
global
Reference to global instance. |
protected int |
pid
Processor ID corresponding to this array instance. |
| Constructor Summary | |
|---|---|
BSP_INT_ARRAY(BSP_PROGRAM thread,
int length)
Helper constructor. |
|
BSP_INT_ARRAY(BSP_PROGRAM thread,
int[] init)
Base constructor. |
|
BSP_INT_ARRAY(BSP_PROGRAM thread,
int length,
int default_value)
Helper constructor Creates an array and then calls the base constructor. |
|
| Method Summary | |
|---|---|
void |
bsp_direct_get(BSP_INT_ARRAY source,
int pid)
Direct get instruction. |
void |
bsp_direct_get(BSP_INT_ARRAY source,
int pid,
int length)
DRMA Direct get instruction. |
void |
bsp_direct_get(BSP_INT_ARRAY source,
int pid,
int source_offset,
int dest_offset,
int length)
DRMA Direct get instruction. |
void |
bsp_direct_get(int pid)
Get instruction. |
void |
bsp_direct_get(int pid,
int length)
DRMA Direct get instruction. |
void |
bsp_direct_get(int pid,
int source_offset,
int dest_offset,
int length)
DRMA Direct get instruction. |
void |
bsp_get(BSP_INT_ARRAY source,
int pid)
Get instruction. |
void |
bsp_get(BSP_INT_ARRAY source,
int source_processor,
int length)
DRMA Get instruction. |
void |
bsp_get(BSP_INT_ARRAY source,
int source_processor,
int source_offset,
int destination_offset,
int length)
DRMA Get instruction. |
void |
bsp_get(int pid)
Get instruction. |
void |
bsp_get(int source_processor,
int length)
DRMA Get instruction. |
void |
bsp_get(int pid,
int source_offset,
int dest_offset,
int length)
DRMA Get instruction. |
void |
bsp_move()
Move a BSMP message from this global variable's queue. |
void |
bsp_put(BSP_INT_ARRAY source,
int pid)
Put instruction. |
void |
bsp_put(BSP_INT_ARRAY source,
int pid,
int length)
DRMA Put instruction. |
void |
bsp_put(BSP_INT_ARRAY source,
int source_offset,
int destination_processor,
int destination_offset,
int length)
DRMA Put instruction. |
void |
bsp_put(int pid)
Put instruction. |
void |
bsp_put(int[] data,
int pid)
DRMA Put instruction. |
void |
bsp_put(int[] data,
int pid,
int length)
DRMA Put instruction. |
void |
bsp_put(int[] data,
int source_offset,
int destination_processor,
int dest_offset,
int length)
DRMA Put instruction. |
void |
bsp_put(java.lang.Integer[] source,
int pid)
DRMA Put instruction. |
void |
bsp_put(java.lang.Integer[] source,
int pid,
int length)
DRMA Put instruction. |
void |
bsp_put(java.lang.Integer[] data,
int source_offset,
int destination_processor,
int dest_offset,
int length)
DRMA Put instruction. |
void |
bsp_put(java.lang.Integer item,
int pid,
int dest_offset)
DRMA Put instruction. |
void |
bsp_put(int pid,
int length)
DRMA Put instruction. |
void |
bsp_put(int item,
int destination_processor,
int destination_offset)
|
void |
bsp_put(int source_offset,
int pid,
int dest_offset,
int length)
DRMA Put instruction. |
int |
bsp_qsize()
BSMP instruction. |
protected void |
bsp_send(com.multicorebsp.core.BSP_INT_ARRAY.Wrapper source,
int to)
BSMP send instruction. |
void |
bsp_send(BSP_INT_ARRAY source,
int to)
BSMP send instruction. |
void |
bsp_send(int to)
BSMP send instruction. |
void |
bsp_send(int[] source,
int to)
BSMP send instruction. |
void |
bsp_send(java.lang.Integer[] source,
int to)
BSMP send instruction. |
int[] |
getData()
Method to get the raw array. |
protected void |
initialise(BSP_PROGRAM thread,
int[] init)
|
BSP_INT_ARRAY |
setData(int[] x)
Method to set a new raw array source. |
void |
unregister()
Removes all shared references. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected com.multicorebsp.core.BSP_GLOBAL<com.multicorebsp.core.BSP_INT_ARRAY.Wrapper> global
protected int pid
| Constructor Detail |
|---|
public BSP_INT_ARRAY(BSP_PROGRAM thread,
int length)
thread - Instance of BSP_PROGRAM corresponding to this global array.length - Length of array.
public BSP_INT_ARRAY(BSP_PROGRAM thread,
int length,
int default_value)
thread - Instance of BSP_PROGRAM corresponding to this global array.length - Length of array.default_value - Default value of each integer in the array.
public BSP_INT_ARRAY(BSP_PROGRAM thread,
int[] init)
thread - Instance of BSP_PROGRAM corresponding to this global array.init - Initial array.| Method Detail |
|---|
protected void initialise(BSP_PROGRAM thread,
int[] init)
public int[] getData()
public BSP_INT_ARRAY setData(int[] x)
x - The new array.
public void bsp_move()
bsp_move in class BSP_GLOBAL_COMM<java.lang.Integer[],BSP_INT_ARRAY>public int bsp_qsize()
BSP_GLOBAL_COMM
bsp_qsize in class BSP_GLOBAL_COMM<java.lang.Integer[],BSP_INT_ARRAY>public void bsp_send(int to)
bsp_send in class BSP_GLOBAL_COMM<java.lang.Integer[],BSP_INT_ARRAY>to - At which processor to perform the enqueue operation.
public void bsp_send(int[] source,
int to)
source - The array to be enqueued.to - At which processor to perform the enqueue operation.
public void bsp_send(java.lang.Integer[] source,
int to)
bsp_send in class BSP_GLOBAL_COMM<java.lang.Integer[],BSP_INT_ARRAY>source - The array to be enqueued.to - At which processor to perform the enqueue operation.
protected void bsp_send(com.multicorebsp.core.BSP_INT_ARRAY.Wrapper source,
int to)
source - The array to be enqueued.to - At which processor to perform the enqueue operation.
public void bsp_send(BSP_INT_ARRAY source,
int to)
bsp_send in class BSP_GLOBAL_COMM<java.lang.Integer[],BSP_INT_ARRAY>source - The array to be enqueued.to - At which processor to perform the enqueue operation.public void bsp_put(int pid)
BSP_GLOBAL_COMM
bsp_put in class BSP_GLOBAL_COMM<java.lang.Integer[],BSP_INT_ARRAY>pid - The destination processor.
public void bsp_put(int pid,
int length)
BSP_GLOBAL_ARR_COMM
bsp_put in class BSP_GLOBAL_ARR_COMM<java.lang.Integer,BSP_INT_ARRAY>pid - Destination processor.length - Elements to put.
public void bsp_put(int source_offset,
int pid,
int dest_offset,
int length)
BSP_GLOBAL_ARR_COMM
bsp_put in class BSP_GLOBAL_ARR_COMM<java.lang.Integer,BSP_INT_ARRAY>source_offset - Copy length items beginning at
this[ source_offset ].pid - Target processor ID of this put instruction.dest_offset - Put items into destination starting at
this[ destination_offset ] (at processor pid).length - Put a total of length items in the row direction.
public void bsp_put(BSP_INT_ARRAY source,
int pid)
BSP_GLOBAL_COMM
bsp_put in class BSP_GLOBAL_COMM<java.lang.Integer[],BSP_INT_ARRAY>source - Source global variable.pid - Destination processor.
public void bsp_put(BSP_INT_ARRAY source,
int pid,
int length)
BSP_GLOBAL_ARR_COMM
bsp_put in class BSP_GLOBAL_ARR_COMM<java.lang.Integer,BSP_INT_ARRAY>source - Where to write the (sub)array to.pid - Target processor ID of this put instruction.length - Put a total of length items in the row direction.
public void bsp_put(BSP_INT_ARRAY source,
int source_offset,
int destination_processor,
int destination_offset,
int length)
BSP_GLOBAL_ARR_COMM
bsp_put in class BSP_GLOBAL_ARR_COMM<java.lang.Integer,BSP_INT_ARRAY>source - Where to write the (sub)array to.source_offset - Copy length items beginning at this[ source_offset ].destination_processor - Target processor ID of this put instruction.destination_offset - Put items into destination starting at destination[ dest_offset ].length - Put a total of length items in the row direction.
public void bsp_put(java.lang.Integer[] source,
int pid)
BSP_GLOBAL_ARR_COMM
bsp_put in class BSP_GLOBAL_ARR_COMM<java.lang.Integer,BSP_INT_ARRAY>source - The array to put.pid - At which processor to put the current variable.
public void bsp_put(java.lang.Integer[] source,
int pid,
int length)
BSP_GLOBAL_ARR_COMM
bsp_put in class BSP_GLOBAL_ARR_COMM<java.lang.Integer,BSP_INT_ARRAY>source - The array to put.pid - At which processor to put the current variable.length - How many items to put.
public void bsp_put(java.lang.Integer[] data,
int source_offset,
int destination_processor,
int dest_offset,
int length)
BSP_GLOBAL_ARR_COMM
bsp_put in class BSP_GLOBAL_ARR_COMM<java.lang.Integer,BSP_INT_ARRAY>data - The array to put.source_offset - From which index on to put from the source array.destination_processor - At which processor to put the current variable.dest_offset - Put items into destination starting at destination[ dest_offset ].length - How many items to put.
public void bsp_put(java.lang.Integer item,
int pid,
int dest_offset)
BSP_GLOBAL_ARR_COMM
bsp_put in class BSP_GLOBAL_ARR_COMM<java.lang.Integer,BSP_INT_ARRAY>item - The value to put.pid - At which processor to put the current variable.dest_offset - Put item into destination[ dest_offset ] at processor pid.
public void bsp_put(int[] data,
int pid)
data - The array to put.pid - At which processor to put the current variable.
public void bsp_put(int[] data,
int pid,
int length)
data - The array to put.pid - At which processor to put the current variable.length - How many items to put.
public void bsp_put(int[] data,
int source_offset,
int destination_processor,
int dest_offset,
int length)
data - The array to put.source_offset - From which index on to put from the source array.destination_processor - At which processor to put the current variable.dest_offset - Put items into destination starting at destination[ dest_offset ].length - How many items to put.
public void bsp_put(int item,
int destination_processor,
int destination_offset)
public void bsp_get(int pid)
BSP_GLOBAL_COMM
bsp_get in class BSP_GLOBAL_COMM<java.lang.Integer[],BSP_INT_ARRAY>pid - From which processor to get its variable.
public void bsp_get(int source_processor,
int length)
BSP_GLOBAL_ARR_COMM
bsp_get in class BSP_GLOBAL_ARR_COMM<java.lang.Integer,BSP_INT_ARRAY>source_processor - Processor to get the (partial) vector from.length - Number of elements to retrieve in the row direction.
public void bsp_get(int pid,
int source_offset,
int dest_offset,
int length)
BSP_GLOBAL_ARR_COMM
bsp_get in class BSP_GLOBAL_ARR_COMM<java.lang.Integer,BSP_INT_ARRAY>pid - Processor to get the (partial) array from.source_offset - Get elements starting from source[ isource_offset ][..].dest_offset - Copy elements into sub-array starting from destination[ idestination_offset ][..].length - Number of elements to retrieve in the row direction.
public void bsp_get(BSP_INT_ARRAY source,
int pid)
BSP_GLOBAL_COMM
bsp_get in class BSP_GLOBAL_COMM<java.lang.Integer[],BSP_INT_ARRAY>source - From which global variable to get its contents.pid - From which processor to get its variable.
public void bsp_get(BSP_INT_ARRAY source,
int source_processor,
int length)
BSP_GLOBAL_ARR_COMM
bsp_get in class BSP_GLOBAL_ARR_COMM<java.lang.Integer,BSP_INT_ARRAY>source - From which global variable to get data.source_processor - Processor to get the (partial) vector from.length - Number of elements to retrieve in the row direction.
public void bsp_get(BSP_INT_ARRAY source,
int source_processor,
int source_offset,
int destination_offset,
int length)
BSP_GLOBAL_ARR_COMM
bsp_get in class BSP_GLOBAL_ARR_COMM<java.lang.Integer,BSP_INT_ARRAY>source - From which global variable to get data.source_processor - Processor to get the (partial) vector from.source_offset - Get elements starting from source[ isource_offset ][..].destination_offset - Copy elements into sub-array starting from destination[ idestination_offset ][..].length - Number of elements to retrieve in the row direction.public void unregister()
BSP_GLOBAL_COMM
unregister in class BSP_GLOBAL_COMM<java.lang.Integer[],BSP_INT_ARRAY>public void bsp_direct_get(int pid)
BSP_GLOBAL_COMM
bsp_direct_get in class BSP_GLOBAL_COMM<java.lang.Integer[],BSP_INT_ARRAY>pid - From which processor to get its variable.
public void bsp_direct_get(int pid,
int length)
BSP_GLOBAL_ARR_COMM
bsp_direct_get in class BSP_GLOBAL_ARR_COMM<java.lang.Integer,BSP_INT_ARRAY>pid - Processor to get the (partial) vector from.length - Number of elements to retrieve in the row direction.
public void bsp_direct_get(int pid,
int source_offset,
int dest_offset,
int length)
BSP_GLOBAL_ARR_COMM
bsp_direct_get in class BSP_GLOBAL_ARR_COMM<java.lang.Integer,BSP_INT_ARRAY>pid - Processor to get the (partial) vector from.source_offset - Get elements starting from source[ isource_offset ][..].dest_offset - Copy elements into sub-array starting from destination[ idestination_offset ][..].length - Number of elements to retrieve in the row direction.
public void bsp_direct_get(BSP_INT_ARRAY source,
int pid)
BSP_GLOBAL_COMM
bsp_direct_get in class BSP_GLOBAL_COMM<java.lang.Integer[],BSP_INT_ARRAY>source - From which global variable to get its contents.pid - From which processor to get its variable.
public void bsp_direct_get(BSP_INT_ARRAY source,
int pid,
int length)
BSP_GLOBAL_ARR_COMM
bsp_direct_get in class BSP_GLOBAL_ARR_COMM<java.lang.Integer,BSP_INT_ARRAY>source - From which global variable to get data.pid - Processor to get the (partial) vector from.length - Number of elements to retrieve in the row direction.
public void bsp_direct_get(BSP_INT_ARRAY source,
int pid,
int source_offset,
int dest_offset,
int length)
BSP_GLOBAL_ARR_COMM
bsp_direct_get in class BSP_GLOBAL_ARR_COMM<java.lang.Integer,BSP_INT_ARRAY>source - From which global variable to get data.pid - Processor to get the (partial) vector from.source_offset - Get elements starting from source[ isource_offset ][..].dest_offset - Copy elements into sub-array starting from destination[ idestination_offset ][..].length - Number of elements to retrieve in the row direction.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||