com.multicorebsp.core
Class BSP_GLOBAL_ARR_COMM<T,S extends BSP_GLOBAL_ARR_COMM<?,?>>

java.lang.Object
  extended by com.multicorebsp.core.BSP_GLOBAL_COMM<T[],S>
      extended by com.multicorebsp.core.BSP_GLOBAL_ARR_COMM<T,S>
Type Parameters:
T - Data type of the array elements.
S - Data type of the class implementing BSP_GLOBAL_ARR_COMM
Direct Known Subclasses:
BSP_ARRAY, BSP_DOUBLE_ARRAY, BSP_INT_ARRAY

public abstract class BSP_GLOBAL_ARR_COMM<T,S extends BSP_GLOBAL_ARR_COMM<?,?>>
extends BSP_GLOBAL_COMM<T[],S>

Defines which functions should be implemented for BSP global arrays.

Since:
2008

Constructor Summary
BSP_GLOBAL_ARR_COMM()
           
 
Method Summary
abstract  void bsp_direct_get(int pid, int length)
          DRMA Direct get instruction.
abstract  void bsp_direct_get(int pid, int source_offset, int dest_offset, int length)
          DRMA Direct get instruction.
abstract  void bsp_direct_get(S source, int pid, int length)
          DRMA Direct get instruction.
abstract  void bsp_direct_get(S source, int pid, int source_offset, int dest_offset, int length)
          DRMA Direct get instruction.
abstract  void bsp_get(int source_processor, int length)
          DRMA Get instruction.
abstract  void bsp_get(int pid, int source_offset, int dest_offset, int length)
          DRMA Get instruction.
abstract  void bsp_get(S source, int pid, int length)
          DRMA Get instruction.
abstract  void bsp_get(S source, int pid, int source_offset, int dest_offset, int length)
          DRMA Get instruction.
abstract  void bsp_put(int pid, int length)
          DRMA Put instruction.
abstract  void bsp_put(int source_offset, int pid, int dest_offset, int length)
          DRMA Put instruction.
abstract  void bsp_put(S source, int pid, int length)
          DRMA Put instruction.
abstract  void bsp_put(S source, int source_offset, int pid, int dest_offset, int length)
          DRMA Put instruction.
abstract  void bsp_put(T[] source, int pid)
          DRMA Put instruction.
abstract  void bsp_put(T[] source, int pid, int length)
          DRMA Put instruction.
abstract  void bsp_put(T[] source, int source_offset, int pid, int dest_offset, int length)
          DRMA Put instruction.
abstract  void bsp_put(T item, int pid, int dest_offset)
          DRMA Put instruction.
 
Methods inherited from class com.multicorebsp.core.BSP_GLOBAL_COMM
bsp_direct_get, bsp_direct_get, bsp_get, bsp_get, bsp_move, bsp_put, bsp_put, bsp_qsize, bsp_send, bsp_send, bsp_send, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BSP_GLOBAL_ARR_COMM

public BSP_GLOBAL_ARR_COMM()
Method Detail

bsp_put

public abstract void bsp_put(int pid,
                             int length)
DRMA Put instruction. Copies
this[ 0, 1, ..., length-1 ] (local to current processor)
to this[ 0, 1, ..., length-1 ] (local to destination processor pid)
This instruction buffers the to-be copied current elements here; array elements thus are free to change after calling this put operation.

Note that the copied elements will be available at the destination only after synchronisation. Note that this is an alias for bsp_put( this, 0, pid, 0, length );

Parameters:
pid - Destination processor.
length - Elements to put.

bsp_put

public abstract void bsp_put(int source_offset,
                             int pid,
                             int dest_offset,
                             int length)
DRMA Put instruction. Copies
this[ source_offset, source_offset+1, ..., source_offset+length-1 ] (local to current processor)
to this[ destination_offset, ..., destination_offset+length-1 ] (local to destination processor pid)
This instruction buffers the to-be copied current elements here; array elements thus are free to change after calling this put operation.

Note that the copied elements will be available at the destination only after synchronisation. Note that this is an alias to
bsp_put( this, source_offset, pid, dest_offset, length );

Parameters:
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.

bsp_put

public abstract void bsp_put(S source,
                             int pid,
                             int length)
DRMA Put instruction. Copies
source[ 0, 1, ..., length-1 ] (local to current processor)
to this[ 0, 1, ..., length-1 ] (local to destination processor 'pid')
This instruction buffers the to-be copied current elements here; array elements thus are free to change after calling this put operation.

Note that the copied elements will be available at the destination only after synchronisation. Note that this is an alias for bsp_put( source, 0, pid, 0, length );

Parameters:
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.

bsp_put

public abstract void bsp_put(S source,
                             int source_offset,
                             int pid,
                             int dest_offset,
                             int length)
DRMA Put instruction. Copies
source[ source_offset, source_offset+1, ..., source_offset+length-1 ] (local to current processor)
to this[ destination_offset, ..., destination_offset+length-1 ] (local to destination processor 'pid')
This instruction buffers the to-be copied current elements here; array elements thus are free to change after calling this put operation.

Note that the copied elements will be available at the destination only after synchronisation.

Parameters:
source - Where to write the (sub)array to.
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 destination[ dest_offset ].
length - Put a total of length items in the row direction.

bsp_put

public abstract void bsp_put(T[] source,
                             int pid)
DRMA Put instruction. Copies
source[ 0, 1, ..., n-1 ] (local to current processor)
to
this[ 0, 1, ..., n-1 ] (local to destination processor 'pid'),
where n is the length of the source vector. This instruction buffers the to-be copied current elements here; the value variable thus is free to change after calling this put operation.

Note that the copied element will be available at the destination only after synchronisation.

Specified by:
bsp_put in class BSP_GLOBAL_COMM<T[],S extends BSP_GLOBAL_ARR_COMM<?,?>>
Parameters:
source - The array to put.
pid - At which processor to put the current variable.

bsp_put

public abstract void bsp_put(T[] source,
                             int pid,
                             int length)
DRMA Put instruction. Copies
source[ 0, 1, ..., length-1 ] (local to current processor)
to
this[ 0, 1, ..., length-1 ] (local to destination processor 'pid')
This instruction buffers the to-be copied current elements here; the value variable thus is free to change after calling this put operation.

Note that the copied element will be available at the destination only after synchronisation.

Parameters:
source - The array to put.
pid - At which processor to put the current variable.
length - How many items to put.

bsp_put

public abstract void bsp_put(T[] source,
                             int source_offset,
                             int pid,
                             int dest_offset,
                             int length)
DRMA Put instruction. Copies
source[ source_offset, source_offset+1, ..., source_offset+length-1 ] (local to current processor)
to
this[ dest_offset, ..., dest_offset+length-1 ] (local to destination processor 'pid')
This instruction buffers the to-be copied current elements here; the value variable thus is free to change after calling this put operation.

Note that the copied element will be available at the destination only after synchronisation.

Parameters:
source - The array to put.
source_offset - From which index on to put from the source array.
pid - 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.

bsp_put

public abstract void bsp_put(T item,
                             int pid,
                             int dest_offset)
DRMA Put instruction. Copies a single value to this[ destination_index ], at destination processor pid. This instruction buffers the to-be copied current element here; the value variable thus is free to change after calling this put operation.

Note that the copied element will be available at the destination only after synchronisation.

Parameters:
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.

bsp_get

public abstract void bsp_get(int source_processor,
                             int length)
DRMA Get instruction. Gets
this[ 0, 1, ..., length-1 ] (local to source_processor)
and puts those contents in
this[ 0, 1, ..., length-1 ] (local to current processor)
This instruction does not buffer the elements to be retrieved as they are generally unavailable from this processor's perspective. Hence, those elements in the source vector at synchronisation time are the elements which will be copied to this array.

Note that this implies gets and puts are not necessarily freely interchangeable. Note that the retrieved element will be available at the destination only after synchronisation. Note that this is an alias for bsp_get( this, 0, pid, 0, length );

Parameters:
source_processor - Processor to get the (partial) vector from.
length - Number of elements to retrieve in the row direction.

bsp_get

public abstract void bsp_get(int pid,
                             int source_offset,
                             int dest_offset,
                             int length)
DRMA Get instruction. Gets
this[ source_offset, source_offset+1, ..., source_offset+length-1 ] (local to source_processor)
and puts those contents in
this[ destination_offset, ..., destination_offset+length-1 ] (local to current processor)
This instruction does not buffer the elements to be retrieved as they are generally unavailable from this processor's perspective. Hence, those elements in the source vector at synchronisation time are the elements which will be copied to this array.

Note that this implies gets and puts are not necessarily freely interchangeable. Note that the retrieved element will be available at the destination only after synchronisation. Note that this is an alias for bsp_get( this, source_offset, pid, dest_offset, length );

Parameters:
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.

bsp_get

public abstract void bsp_get(S source,
                             int pid,
                             int length)
DRMA Get instruction. Gets
source [ 0, 1, ..., length-1 ] (local to current processor)
and puts those contents in
this [ 0, 1, ..., length-1 ] (local to processor pid)
This instruction does not buffer the elements to be retrieved as they are generally unavailable from this processor's perspective. Hence, those elements in the source vector at synchronisation time are the elements which will be copied to this array.

Note that this implies gets and puts are not necessarily freely interchangeable. Note that the retrieved element will be available at the destination only after synchronisation. Note that this is an alias for bsp_get( source, 0, pid, 0, length );

Parameters:
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.

bsp_get

public abstract void bsp_get(S source,
                             int pid,
                             int source_offset,
                             int dest_offset,
                             int length)
DRMA Get instruction. Gets
source[ source_offset, source_offset+1, ..., source_offset+length-1 ] (local to source_processor)
and puts those contents in
this[ destination_offset, ..., destination_offset+length-1 ] (local to current processor)
This instruction does not buffer the elements to be retrieved as they are generally unavailable from this processor's perspective. Hence, those elements in the source vector at synchronisation time are the elements which will be copied to this array.

Note that this implies gets and puts are not necessarily freely interchangeable. Note that the retrieved element will be available at the destination only after synchronisation.

Parameters:
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.

bsp_direct_get

public abstract void bsp_direct_get(int pid,
                                    int length)
DRMA Direct get instruction. Like normal bsp_get, but direct & blocking.

Parameters:
pid - Processor to get the (partial) vector from.
length - Number of elements to retrieve in the row direction.

bsp_direct_get

public abstract void bsp_direct_get(int pid,
                                    int source_offset,
                                    int dest_offset,
                                    int length)
DRMA Direct get instruction. Like normal bsp_get, but direct & blocking.

Parameters:
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.

bsp_direct_get

public abstract void bsp_direct_get(S source,
                                    int pid,
                                    int length)
DRMA Direct get instruction. Like normal bsp_get, but direct & blocking.

Parameters:
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.

bsp_direct_get

public abstract void bsp_direct_get(S source,
                                    int pid,
                                    int source_offset,
                                    int dest_offset,
                                    int length)
DRMA Direct get instruction. Like normal bsp_get, but direct & blocking.

Parameters:
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.