Package Scientific :: Package BSP :: Class ParClass

[frames] | no frames]

# Class ParClass

    object --+
             |
            ParClass

Global class

Global classes are needed to construct global objects that have more functionalities than offered by the ParValue class hierarchy. When an instance of a global class is generated, each processor generates an instance of the local class that becomes the local value of the new global object. Attribute requests and method calls are passed through to the local objects and the results are assembled into global objects (ParValue or ParFunction). The arguments to methods of a global class must be global objects, the local class methods are then called with the corresponding local values.

The local objects are initialized via the special method __parinit__ instead of the usual __init__. This method is called with two special arguments (processor number and total number of processors) followed by the local values of the arguments to the global object initialization call.

The local classes must inherit from the base class ParBase (see below), which also provides communication routines.

Instance Methods

__call__(self, *args, **kwargs) |

__init__(self, local_class) x.__init__(...) initializes x; see x.__class__.__doc__ for signature |

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

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, local_class)
(Constructor)

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  - `local_class` - a standard Python class
Overrides: object.__init__