QuickMP

Tyler Streeter

 

 

 

Summary

QuickMP (Quick Multi-Processing) is a simple cross-platform C++ API for generating parallel for loops in shared-memory programs, similar to OpenMP.* It provides automatic scalable performance based on the number of available processors.

 

Code Sample

// Normal for loop uses only 1 thread.

for (int i = 0; i < 1000000; ++i)

{

processMyData(i);

}

 

// Parallel for loop automatically uses 1 thread per processor.

QMP_PARALLEL_FOR(i, 0, 1000000)

processMyData(i);

QMP_END_PARALLEL_FOR

 

Features

> Consists of a single header file

> Small, simple API

> Tested on Windows, Mac OS X, and Linux

> Automatically chooses thread count on multicore machines at runtime

> API includes scheduling options and shared data synchronization

 

Links

How to Use It instructions, examples, tips, etc.

API Reference description of all macros

Download SourceForge download page

 

Also try QuickTest (unit testing) and QuickProf (performance profiling).

 

* OpenMP is a great standard. If your preferred compiler supports it, use it. If not, QuickMP can provide OpenMP-like functionality for any C++ compiler. (Notably, the popular free Visual C++ Express compiler does not support OpenMP as of version 2008. GCC has added OpenMP support as of version 4.2.0, but many programmers prefer older versions.)

 

 

 

SourceForge.net Logo