[Haskell-cafe] Parallel executing of actions

Mitar mmitar at gmail.com
Tue Apr 17 18:16:51 EDT 2007


Hi!

On 4/17/07, Sebastian Sylvan <sebastian.sylvan at gmail.com> wrote:
> I would suggest chunking up your work (assuming that calculating your colour
> is indeed a significant amount of work) in tiles or something, then fork off
> a thread for each of them, sticking the final colours in a Chan. Then you
> have another thread just pick tiles off the Chan and copy the results to the
> frame buffer.

Is there some completely different and maybe better way of rendering
the image? Because I noticed that in fact I do not really have any use
for OpenGL (I draw pixels on a 2D plane). So maybe is there some other
portable way of rendering a 2D image, which would be easier to
parallelize? Maybe of precomputing the image in completely functional
way and then only draw the whole image at once to the screen buffer
(now I call OpenGL draw pixel function for every pixel I want to draw
- this is probably not the best way).


Mitar


More information about the Haskell-Cafe mailing list