|
||||||||
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<java.lang.Integer,BSP_INTEGER> com.multicorebsp.core.BSP_INTEGER
public class BSP_INTEGER
This class represents a shared integer type.
Apart from the general read / write methods, bulk-synchronous
message passing (BSMP) and direct remote memory access (DRMA)
methods are available. Note this class would be functionally
equivalent to BSP_REGISTER<Integer>, except that Integer
does not extend CompulsaryCloneable, and cannot be extended to
implement it (Integer is a final class).
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_INTEGER.Wrapper> |
global
Reference to global instance. |
protected int |
pid
Processor ID corresponding to this array instance. |
Constructor Summary | |
---|---|
BSP_INTEGER(BSP_PROGRAM thread,
int init)
Base constructor. |
Method Summary | |
---|---|
void |
bsp_direct_get(BSP_INTEGER source,
int pid)
Direct get instruction. |
void |
bsp_direct_get(int pid)
Get instruction. |
void |
bsp_get(BSP_INTEGER source,
int source_processor)
Get instruction. |
void |
bsp_get(int pid)
Get instruction. |
void |
bsp_move()
Move a BSMP message from this global variable's queue. |
void |
bsp_put(BSP_INTEGER source,
int destination_processor)
Put instruction. |
void |
bsp_put(int pid)
Put instruction. |
void |
bsp_put(java.lang.Integer data,
int destination_processor)
Put instruction. |
void |
bsp_put(int data,
int destination_processor)
DRMA Put instruction. |
int |
bsp_qsize()
BSMP instruction. |
void |
bsp_send(com.multicorebsp.core.BSP_INTEGER.Wrapper source,
int to)
BSMP send instruction. |
void |
bsp_send(BSP_INTEGER source,
int to)
BSMP send instruction. |
void |
bsp_send(int to)
BSMP send instruction. |
void |
bsp_send(java.lang.Integer source,
int to)
BSMP send instruction. |
void |
bsp_send(int source,
int to)
BSMP send instruction. |
int |
read()
Method to get the raw array. |
void |
unregister()
Removes all shared references. |
BSP_INTEGER |
write(int x)
Method to set a new raw array 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_INTEGER.Wrapper> global
protected int pid
Constructor Detail |
---|
public BSP_INTEGER(BSP_PROGRAM thread, int init)
thread
- Instance of BSP_PROGRAM corresponding to this global array.init
- Initial array.Method Detail |
---|
public int read()
public BSP_INTEGER write(int x)
x
- The new array.
public void bsp_move() throws EmptyQueueException
bsp_move
in class BSP_GLOBAL_COMM<java.lang.Integer,BSP_INTEGER>
EmptyQueueException
public int bsp_qsize()
BSP_GLOBAL_COMM
bsp_qsize
in class BSP_GLOBAL_COMM<java.lang.Integer,BSP_INTEGER>
public void bsp_send(int to)
bsp_send
in class BSP_GLOBAL_COMM<java.lang.Integer,BSP_INTEGER>
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_INTEGER>
source
- The array to be enqueued.to
- At which processor to perform the enqueue operation.public void bsp_send(com.multicorebsp.core.BSP_INTEGER.Wrapper source, int to)
source
- The array to be enqueued.to
- At which processor to perform the enqueue operation.public void bsp_send(BSP_INTEGER source, int to)
bsp_send
in class BSP_GLOBAL_COMM<java.lang.Integer,BSP_INTEGER>
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_INTEGER>
pid
- The destination processor.public void bsp_put(BSP_INTEGER source, int destination_processor)
BSP_GLOBAL_COMM
bsp_put
in class BSP_GLOBAL_COMM<java.lang.Integer,BSP_INTEGER>
source
- Source global variable.destination_processor
- Destination processor.public void bsp_put(java.lang.Integer data, int destination_processor)
BSP_GLOBAL_COMM
bsp_put
in class BSP_GLOBAL_COMM<java.lang.Integer,BSP_INTEGER>
data
- Source variable.destination_processor
- Destination processor.public void bsp_put(int data, int destination_processor)
data
- The array to put.destination_processor
- At which processor to put the current variable.public void bsp_get(int pid)
BSP_GLOBAL_COMM
bsp_get
in class BSP_GLOBAL_COMM<java.lang.Integer,BSP_INTEGER>
pid
- From which processor to get its variable.public void bsp_get(BSP_INTEGER source, int source_processor)
BSP_GLOBAL_COMM
bsp_get
in class BSP_GLOBAL_COMM<java.lang.Integer,BSP_INTEGER>
source
- From which global variable to get its contents.source_processor
- From which processor to get its variable.public void bsp_direct_get(int pid)
BSP_GLOBAL_COMM
bsp_direct_get
in class BSP_GLOBAL_COMM<java.lang.Integer,BSP_INTEGER>
pid
- From which processor to get its variable.public void bsp_direct_get(BSP_INTEGER source, int pid)
BSP_GLOBAL_COMM
bsp_direct_get
in class BSP_GLOBAL_COMM<java.lang.Integer,BSP_INTEGER>
source
- From which global variable to get its contents.pid
- From which processor to get its variable.public void unregister()
BSP_GLOBAL_COMM
unregister
in class BSP_GLOBAL_COMM<java.lang.Integer,BSP_INTEGER>
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |