My first OpenMP code…


…well, the first one I’ve written myself.

I’ve spent some time on trying to optimize the RLE-like image compression used for network transfer of frame buffer data in Equalizer. After fiddling a couple of hours with SSE2 and not getting anywhere, I gave OpenMP a shot.

Turns out the parallelization was quite easy, but only gains 20-30% on a dual-core machine with gcc 4.2. There should be some room for improvement, but it’s a first step and now the code runs at >700 MB/s compression rate on a 2.16 GHz Core2 Duo.

For the curious: here is the change. Maybe there is an OpenMP crack out there who wants to beat my implementation. 😉

One Response to “My first OpenMP code…”

  1. David Says:

    OpenMP is great for code which is simple to parallelize. When you want to parallelize code which is more complex you need to do it manually.

Leave a comment