Package Scientific :: Package BSP :: Class ParBase
[frames] | no frames]

Class ParBase

object --+
         |
        ParBase
Known Subclasses:

Distributed data base class

Local classes that are to be used in global classes must inherit from this class.

Instance Methods
any
broadcast(self, data, from_pid=0)
Send a local value of one processor to all processors.
list
exchangeMessages(self, message_list)
Returns: the incoming data
list
get(self, data, pid_list)
Request the local values of other processors.
list
put(self, data, pid_list)
Send data to other processors

Inherited from object: __delattr__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables
  is_parclass = 1
Properties

Inherited from object: __class__

Method Details

broadcast(self, data, from_pid=0)

 

Send a local value of one processor to all processors.

Parameters:
  • data - the data to be transmitted. This value is used only on one processor.
  • from_pid (any) - the processor whose data is broadcast
Returns: any
the received data

exchangeMessages(self, message_list)

 
Parameters:
  • message_list (list) - a list of (pid, data) pairs to be transmitted
Returns: list
the incoming data

get(self, data, pid_list)

 

Request the local values of other processors.

Parameters:
  • data (any) - the data to be sent to processors who request it
  • pid_list (list) - the list of processor numbers to which data requests are sent
Returns: list
the values received from other processors

put(self, data, pid_list)

 

Send data to other processors

Parameters:
  • data (any) - the data to be sent
  • pid_list (list) - the list of processor numbers to which the data is sent
Returns: list
the values received from other processors