Package Scientific :: Package BSP :: Class ParRootFunction
[hide private]
[frames] | no frames]

Class ParRootFunction



object --+        
         |        
  ParValue --+    
             |    
   ParFunction --+
                 |
                ParRootFunction

Asymmetric global function

Constructor: ParRootFunction(|root_function|, |other_function|=None)

Arguments:

Global functions are called with global object arguments. The local values of these arguments are then passed to the local function, and the result is returned in a ParValue object.

A ParRootFunction differs from a ParFunction in that it uses a different local function for processor 0 than for the other processors. ParRootFunction objects are commonly used for I/O operations.

Instance Methods [hide private]
  __init__(self, local_function, other_function=None)

Inherited from ParFunction: __repr__

Inherited from ParValue: __add__, __call__, __div__, __divmod__, __eq__, __ge__, __getattr__, __getitem__, __gt__, __le__, __len__, __lt__, __mod__, __mul__, __ne__, __neg__, __nonzero__, __pow__, __str__, __sub__, accumulate, alltrue, anytrue, broadcast, fullExchange, get, getattr, map, put, reduce

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


Class Variables [hide private]

Inherited from ParValue: is_parvalue


Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, local_function, other_function=None)
(Constructor)

 
Parameters:
  • root_function (callable) - the local function for processor 0
  • other_function (callable) - the local function for all other processors. The default is a function that returns None.
Overrides: ParFunction.__init__