|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.multicorebsp.core.BSP_GLOBAL_COMM<T[],S> com.multicorebsp.core.BSP_GLOBAL_ARR_COMM<java.lang.Double,BSP_DOUBLE_ARRAY> com.multicorebsp.core.BSP_DOUBLE_ARRAY
public class BSP_DOUBLE_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, as per BSP_GLOBAL_COMM
and BSP_GLOBAL_ARR_COMM
.
This class is to be used within the parallel part of an instance of a
BSP_PROGRAM.
BSP_REGISTER
,
BSP_PROGRAM
Field Summary | |
---|---|
protected com.multicorebsp.core.BSP_GLOBAL<com.multicorebsp.core.BSP_DOUBLE_ARRAY.Wrapper> |
global
Reference to global instance. |
protected int |
pid
Processor ID corresponding to this array instance. |
Constructor Summary | |
---|---|
BSP_DOUBLE_ARRAY(BSP_PROGRAM thread,
double[] init)
Base constructor. |
|
BSP_DOUBLE_ARRAY(BSP_PROGRAM thread,
int length)
Helper constructor. |
|
BSP_DOUBLE_ARRAY(BSP_PROGRAM thread,
int length,
double default_value)
Helper constructor Creates an array and then calls the base constructor. |
Method Summary | |
---|---|
void |
bsp_direct_get(BSP_DOUBLE_ARRAY source,
int pid)
Direct get instruction. |
void |
bsp_direct_get(BSP_DOUBLE_ARRAY source,
int pid,
int length)
DRMA Direct get instruction. |
void |
bsp_direct_get(BSP_DOUBLE_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_DOUBLE_ARRAY source,
int pid)
Get instruction. |
void |
bsp_get(BSP_DOUBLE_ARRAY source,
int pid,
int length)
DRMA Get instruction. |
void |
bsp_get(BSP_DOUBLE_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 pid,
int length)
DRMA Get instruction. |
void |
bsp_get(int source_offset,
int pid,
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_DOUBLE_ARRAY source,
int pid)
Put instruction. |
void |
bsp_put(BSP_DOUBLE_ARRAY source,
int pid,
int length)
DRMA Put instruction. |
void |
bsp_put(BSP_DOUBLE_ARRAY source,
int source_offset,
int destination_processor,
int destination_offset,
int length)
DRMA Put instruction. |
void |
bsp_put(double[] source,
int pid)
|
void |
bsp_put(java.lang.Double[] source,
int pid)
DRMA Put instruction. |
void |
bsp_put(double[] data,
int destination_processor,
int length)
|
void |
bsp_put(java.lang.Double[] source,
int pid,
int length)
DRMA Put instruction. |
void |
bsp_put(double[] data,
int source_offset,
int destination_processor,
int destination_offset,
int length)
|
void |
bsp_put(java.lang.Double[] data,
int source_offset,
int destination_processor,
int destination_offset,
int length)
DRMA Put instruction. |
void |
bsp_put(double item,
int destination_processor,
int destination_offset)
|
void |
bsp_put(java.lang.Double item,
int pid,
int dest_offset)
DRMA Put instruction. |
void |
bsp_put(int pid)
Put instruction. |
void |
bsp_put(int pid,
int length)
DRMA Put instruction. |
void |
bsp_put(int source_offset,
int destination_processor,
int destination_offset,
int length)
DRMA Put instruction. |
int |
bsp_qsize()
BSMP instruction. |
void |
bsp_send(BSP_DOUBLE_ARRAY source,
int to)
BSMP instruction. |
void |
bsp_send(double[] source,
int to)
|
void |
bsp_send(java.lang.Double[] source,
int to)
BSMP instruction. |
void |
bsp_send(int to)
Bulk-synchronous message passing (BSMP) instruction. |
double[] |
getData()
Method to get the raw array. |
protected void |
initialise(BSP_PROGRAM thread,
double[] init)
|
BSP_DOUBLE_ARRAY |
setData(double[] 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_DOUBLE_ARRAY.Wrapper> global
protected int pid
Constructor Detail |
---|
public BSP_DOUBLE_ARRAY(BSP_PROGRAM thread, int length)
thread
- Instance of BSP_PROGRAM corresponding to this global array.length
- Length of array.public BSP_DOUBLE_ARRAY(BSP_PROGRAM thread, int length, double 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_DOUBLE_ARRAY(BSP_PROGRAM thread, double[] init)
thread
- Instance of BSP_PROGRAM corresponding to this global array.init
- Initial array.Method Detail |
---|
protected void initialise(BSP_PROGRAM thread, double[] init)
public double[] getData()
public BSP_DOUBLE_ARRAY setData(double[] x)
x
- The new array.
public void bsp_move()
bsp_move
in class BSP_GLOBAL_COMM<java.lang.Double[],BSP_DOUBLE_ARRAY>
public int bsp_qsize()
BSP_GLOBAL_COMM
bsp_qsize
in class BSP_GLOBAL_COMM<java.lang.Double[],BSP_DOUBLE_ARRAY>
public void bsp_send(int to)
BSP_GLOBAL_COMM
bsp_send
in class BSP_GLOBAL_COMM<java.lang.Double[],BSP_DOUBLE_ARRAY>
to
- The ID of the receiving thread.public void bsp_send(double[] source, int to)
public void bsp_send(java.lang.Double[] source, int to)
BSP_GLOBAL_COMM
bsp_send
in class BSP_GLOBAL_COMM<java.lang.Double[],BSP_DOUBLE_ARRAY>
source
- The object to send.to
- The ID of the receiving thread.public void bsp_send(BSP_DOUBLE_ARRAY source, int to)
BSP_GLOBAL_COMM
bsp_send
in class BSP_GLOBAL_COMM<java.lang.Double[],BSP_DOUBLE_ARRAY>
source
- The object to send.to
- The ID of the receiving thread.public void bsp_get(BSP_DOUBLE_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.Double,BSP_DOUBLE_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 bsp_get(int pid, int length)
BSP_GLOBAL_ARR_COMM
bsp_get
in class BSP_GLOBAL_ARR_COMM<java.lang.Double,BSP_DOUBLE_ARRAY>
pid
- Processor to get the (partial) vector from.length
- Number of elements to retrieve in the row direction.public void bsp_get(int source_offset, int pid, int dest_offset, int length)
BSP_GLOBAL_ARR_COMM
bsp_get
in class BSP_GLOBAL_ARR_COMM<java.lang.Double,BSP_DOUBLE_ARRAY>
source_offset
- Processor to get the (partial) array from.pid
- 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_DOUBLE_ARRAY source, int pid, int length)
BSP_GLOBAL_ARR_COMM
bsp_get
in class BSP_GLOBAL_ARR_COMM<java.lang.Double,BSP_DOUBLE_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_get(int pid)
BSP_GLOBAL_COMM
bsp_get
in class BSP_GLOBAL_COMM<java.lang.Double[],BSP_DOUBLE_ARRAY>
pid
- From which processor to get its variable.public void bsp_get(BSP_DOUBLE_ARRAY source, int pid)
BSP_GLOBAL_COMM
bsp_get
in class BSP_GLOBAL_COMM<java.lang.Double[],BSP_DOUBLE_ARRAY>
source
- From which global variable to get its contents.pid
- From which processor to get its variable.public void bsp_put(int pid, int length)
BSP_GLOBAL_ARR_COMM
bsp_put
in class BSP_GLOBAL_ARR_COMM<java.lang.Double,BSP_DOUBLE_ARRAY>
pid
- Destination processor.length
- Elements to put.public void bsp_put(BSP_DOUBLE_ARRAY source, int pid, int length)
BSP_GLOBAL_ARR_COMM
bsp_put
in class BSP_GLOBAL_ARR_COMM<java.lang.Double,BSP_DOUBLE_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(java.lang.Double[] source, int pid, int length)
BSP_GLOBAL_ARR_COMM
bsp_put
in class BSP_GLOBAL_ARR_COMM<java.lang.Double,BSP_DOUBLE_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(double[] data, int destination_processor, int length)
public void bsp_put(java.lang.Double[] data, 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.Double,BSP_DOUBLE_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.destination_offset
- Put items into destination starting at destination[ dest_offset ].length
- How many items to put.public void bsp_put(double[] data, int source_offset, int destination_processor, int destination_offset, int length)
public void bsp_put(BSP_DOUBLE_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.Double,BSP_DOUBLE_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(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.Double,BSP_DOUBLE_ARRAY>
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
this[ destination_offset ] (at processor pid).length
- Put a total of length items in the row direction.public void bsp_put(java.lang.Double item, int pid, int dest_offset)
BSP_GLOBAL_ARR_COMM
bsp_put
in class BSP_GLOBAL_ARR_COMM<java.lang.Double,BSP_DOUBLE_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(double item, int destination_processor, int destination_offset)
public void bsp_put(int pid)
BSP_GLOBAL_COMM
bsp_put
in class BSP_GLOBAL_COMM<java.lang.Double[],BSP_DOUBLE_ARRAY>
pid
- The destination processor.public void bsp_put(BSP_DOUBLE_ARRAY source, int pid)
BSP_GLOBAL_COMM
bsp_put
in class BSP_GLOBAL_COMM<java.lang.Double[],BSP_DOUBLE_ARRAY>
source
- Source global variable.pid
- Destination processor.public void bsp_put(java.lang.Double[] source, int pid)
BSP_GLOBAL_ARR_COMM
bsp_put
in class BSP_GLOBAL_ARR_COMM<java.lang.Double,BSP_DOUBLE_ARRAY>
source
- The array to put.pid
- At which processor to put the current variable.public void bsp_put(double[] source, int pid)
public void unregister()
BSP_GLOBAL_COMM
unregister
in class BSP_GLOBAL_COMM<java.lang.Double[],BSP_DOUBLE_ARRAY>
public void bsp_direct_get(int pid, int length)
BSP_GLOBAL_ARR_COMM
bsp_direct_get
in class BSP_GLOBAL_ARR_COMM<java.lang.Double,BSP_DOUBLE_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.Double,BSP_DOUBLE_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_DOUBLE_ARRAY source, int pid, int length)
BSP_GLOBAL_ARR_COMM
bsp_direct_get
in class BSP_GLOBAL_ARR_COMM<java.lang.Double,BSP_DOUBLE_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_DOUBLE_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.Double,BSP_DOUBLE_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.public void bsp_direct_get(int pid)
BSP_GLOBAL_COMM
bsp_direct_get
in class BSP_GLOBAL_COMM<java.lang.Double[],BSP_DOUBLE_ARRAY>
pid
- From which processor to get its variable.public void bsp_direct_get(BSP_DOUBLE_ARRAY source, int pid)
BSP_GLOBAL_COMM
bsp_direct_get
in class BSP_GLOBAL_COMM<java.lang.Double[],BSP_DOUBLE_ARRAY>
source
- From which global variable to get its contents.pid
- From which processor to get its variable.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |