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. 😉

Advertisements

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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: