|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.multicorebsp.core.BSP_DOUBLE_MATRIX
public class BSP_DOUBLE_MATRIX
This class represents a global double[][] type.
Bulk-synchronous message passing (BSMP) and direct remote memory
access (DRMA) methods are available. Data access is achieved by
retrieving a reference to the local raw double[][] matrix with
the getData() method.
This class is to be used within the parallel part of an instance of a
BSP_PROGRAM.
BSP_PROGRAM
,
BSP_REGISTER
,
BSP_ARRAY
Field Summary | |
---|---|
protected com.multicorebsp.core.BSP_GLOBAL<com.multicorebsp.core.BSP_DOUBLE_MATRIX.Wrapper> |
global
Reference to global instance. |
protected int |
pid
Processor ID corresponding to this array instance. |
Constructor Summary | |
---|---|
BSP_DOUBLE_MATRIX(BSP_PROGRAM thread,
double[][] init)
Base constructor. |
Method Summary | |
---|---|
void |
bsp_get(int source_processor,
BSP_DOUBLE_MATRIX source,
int isource_offset,
int jsource_offset,
int idestination_offset,
int jdestination_offset,
int ilength,
int jlength)
DRMA Get instruction. |
void |
bsp_move()
Move a BSMP message from this global variable's queue. |
void |
bsp_put(double[][] data,
int destination_processor,
int idestination_offset,
int jdestination_offset)
DRMA Put instruction. |
void |
bsp_put(int isource_offset,
int jsource_offset,
int destination_processor,
BSP_DOUBLE_MATRIX destination,
int idestination_offset,
int jdestination_offset,
int ilength,
int jlength)
DRMA Put instruction. |
int |
bsp_qsize()
|
void |
bsp_send(com.multicorebsp.core.BSP_DOUBLE_MATRIX.Wrapper source,
int to)
BSMP send instruction. |
void |
bsp_send(BSP_DOUBLE_MATRIX source,
int to)
BSMP send instruction. |
void |
bsp_send(double[][] source,
int to)
BSMP send instruction. |
double[][] |
getData()
Method to get the raw matrix. |
BSP_DOUBLE_MATRIX |
setData(double[][] x)
Method to set a new raw matrix source. |
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_MATRIX.Wrapper> global
protected int pid
Constructor Detail |
---|
public BSP_DOUBLE_MATRIX(BSP_PROGRAM thread, double[][] init)
thread
- Instance of BSP_PROGRAM corresponding to this global matrix.init
- Initial matrix.Method Detail |
---|
public double[][] getData()
public BSP_DOUBLE_MATRIX setData(double[][] x)
x
- The new matrix.
public void bsp_move()
public int bsp_qsize()
public void bsp_send(BSP_DOUBLE_MATRIX source, int to)
to
- At which processor to perform the enqueue operation.source
- The matrix to be sent.public void bsp_send(double[][] source, int to)
to
- At which processor to perform the enqueue operation.source
- The matrix to be sent.public void bsp_send(com.multicorebsp.core.BSP_DOUBLE_MATRIX.Wrapper source, int to)
to
- At which processor to perform the enqueue operation.source
- The matrix to be sent.public void bsp_put(int isource_offset, int jsource_offset, int destination_processor, BSP_DOUBLE_MATRIX destination, int idestination_offset, int jdestination_offset, int ilength, int jlength)
isource_offset
- Copy ilength items beginning at this[ isource_offset ][..].jsource_offset
- Copy jlength items beginning at this[..][ jsource_offset ].destination_processor
- Target processor ID of this put instruction.destination
- Destination global matrix.idestination_offset
- Put items into destination starting at destination[ idestination_offset ][..].jdestination_offset
- Put items into destination starting at destination[..][ jdestination_offset ].ilength
- Put a total of length items in the row direction.jlength
- Put a total of length items in the column direction.public void bsp_put(double[][] data, int destination_processor, int idestination_offset, int jdestination_offset)
data
- The matrix to put.destination_processor
- At which processor to put the current variable.idestination_offset
- Put items into destination starting at destination[ idestination_offset ][..].jdestination_offset
- Put items into destination starting at destination[..][ jdestination_offset ].public void bsp_get(int source_processor, BSP_DOUBLE_MATRIX source, int isource_offset, int jsource_offset, int idestination_offset, int jdestination_offset, int ilength, int jlength)
source_processor
- Processor to get the (partial) matrix from.source
- From which global variable to get data.isource_offset
- Get elements starting from source[ isource_offset ][..].jsource_offset
- Get elements starting from source[..][ jsource_offset ].idestination_offset
- Copy elements into sub-array starting from destination[ idestination_offset ][..].jdestination_offset
- Copy elements into sub-array starting from destination[..][ jdestination_offset ].ilength
- Number of elements to retrieve in the row direction.jlength
- Number of elements to retrieve in the column direction.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |