Wednesday, April 02, 2008

QuickMP 0.8.0 Released

I just released the first version of QuickMP, which is a very small (one header file) piece of C++ code to ease the burden of shared-memory programming. It's ideal for applications where you perform the same operations repeatedly on lots of data.

The basic idea is that you convert your main C++ for loop from something like this:
// Normal for loop uses only 1 thread.
for (int i = 0; i < 1000000; ++i)
{
processMyData(i);
}
...to something like this:
// Parallel for loop automatically uses 1 thread per processor.
QMP_PARALLEL_FOR(i, 0, 1000000)
processMyData(i);
QMP_END_PARALLEL_FOR