|
|
Version 1.1 includes automated "Computational Grid" launching on a Mac cluster running version 1.1 of Pooch. See
the
Pooch Quick Start for instructions on configuring your Macs for parallel computing.
For information about writing your own parallel applications, see
the Pooch Software Development Kit and
the Compiling MPI page.
What the AltiVec Fractal source code looks like The AltiVec Fractal Carbon demo contains code for both the z -> z^2 + c and z -> z^4 + c Mandelbrot-style iteration methods. Although the z^4 case is selected by default, the z^2 case is shown below for simplicity. The innermost loop of the iteration for the regular FPU case is:
To rewrite the above code for AltiVec, the multiplications, additions, and subtractions must be reexpressed in AltiVec macros, such as vec_madd and vec_nmsub. The comparison operations must be performed in vector form as well, here using vec_cmpgt, vec_and, and vec_any_ne. Note that there is no such thing as a simple floating-point multiply in AltiVec; you must add to something after the multiply. Thus an add to zero is required to complete the iteration loop. The corresponding loop, converted to AltiVec is:
This is the primary difference between the AltiVec and non-AltiVec version of the z^2 code. The remaining differences involve preparing the vector variables with the appropriate data prior to the iteration loop and saving the final data out into a regular array of floating-point numbers for later conversion to pixel data. For a slightly more complex example of vectorized code, compare sections of the DoSqueezeToLetterboxEffect() routine in the source code of the iMovie Squeeze to Letterbox plug-in on the Other Software page. |
© Copyright 2001-2005 Dauger Research, Inc. All rights reserved. |
Dauger Research, Inc. · P.O. Box 3074 Huntington Beach, CA 92605 |