Shop OBEX P1 Docs P2 Docs Learn Events
Parallel algorithm - Page 2 — Parallax Forums

Parallel algorithm

2»

Comments

  • prof_brainoprof_braino Posts: 4,313
    edited 2010-10-20 21:32
    Heater. wrote: »
    prof_braino,

    On technique I have seen used to share the work load more evenly is to split the job up by lines. Have each available processor(COG) calculate all the pixels for a given line on the screen.

    So:

    A master process manages the whole thing. It knows the lines that have been drawn and which are yet to be done. It also knows which COGS are working and which are idle.

    When ever a worker COG is idle the master determines the next line to be drawn. It sends the coordinates in the complex plane of the first pixel in that line to the idle COG. Together with the "step size" to get from one pixel in the line to the next and the required iteration count. And whatever other params may be needed for that line.

    The COG then computes all the pixels of the line and returns the result to the master for drawing on the screen.

    This is interesting to watch because the lines are filled in and appear on the screen out of order as the computation progresses. You can see how the work is being parallelized and different lines are being completed in different times.

    Is there an example I can follow? I've never done fractals before, but I'd really like to try this out. High level or pseudo code would be best. I have to learn the graphics as well.
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-10-20 23:33
    Leon wrote: »
    It would be more sensible to use one of the chips which must not be mentioned. I already have one interfaced to a Propeller.
    Leon, that sounds like something I'm very interested in. Since it's interfaced and connected to a prop chip, I am sure you could talk about it. Do you any photos or specs or more information?
  • LeonLeon Posts: 7,620
    edited 2010-10-21 03:06
    There's a thread on it:

    http://forums.parallax.com/showthread.php?t=117662

    I tidied up my web site and the links don't work.

    Here is a photo:

    http://www.leonheller.com/Propeller/XProp/XProp_photo.gif

    I added a crystal for the Propeller.
Sign In or Register to comment.