next up previous
Next: Exception Handling Up: Actual Parallelization Previous: Modification of the Method

Construction of a new Method

  In the last step, a new method myMethod() with the same qualifiers as the original method and of the form shown below is added to the class in which the original method appears, where the return is omitted for a void-method:

tabular481

After these transformations, all method invocations of myMethod_par_x() have access to the appropriate depth within the method invocation tree.

Because the interface of myMethod() itself remains unaffected, all calls to the original method remain completely unaware of the transformations. Hence, the parallelization of myMethod() only involves some local transformations of the class MyClass. However, this also implies that the method is less suited to deal with mutual recursion, i.e. situations in which myMethod() calls another method that, in turn, invokes myMethod() again. In such cases a parallel execution will be re-initiated for each invocation of myMethod() in the other method.



ajcbik@extreme.indiana.edu