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.
for (int i = 0; i < 1000000; ++i)
// Parallel for loop automatically uses 1 thread per processor.
QMP_PARALLEL_FOR(i, 0, 1000000)
> 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
How to Use It – instructions, examples, tips, etc.
API Reference – description of all macros
Download – SourceForge download page
* 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.)