# Parallel Patterns Library

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Parallel_Patterns_Library
> Markdown URL: https://mediated.wiki/source/Parallel_Patterns_Library.md
> Source: https://en.wikipedia.org/wiki/Parallel_Patterns_Library
> Source revision: 1242065373
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

The **Parallel Patterns Library** is a [Microsoft](/source/Microsoft) library designed for use by native C++ developers that provides features for [multicore programming](/source/Multicore_programming).[1] It was first bundled with [Visual Studio 2010](/source/Visual_Studio_2010). It resembles the [C++ Standard Library](/source/C%2B%2B_Standard_Library) in style and works well with the C++11 language feature, lambdas, also introduced with [Visual Studio 2010](/source/Visual_Studio_2010).

For example, this sequential loop:

for (int x=0; x < width; ++x)
{
    // Something parallelizable
}

Can be made into a parallel loop by replacing the for with a parallel_for:

#include <ppl.h>
// . . .
Concurrency::parallel_for (0, width, [=](int x)
{
    // Something parallelizable
});

This still requires the developer to know that the loop is parallelizable, but all the other work is done by the library.

MSDN[2] describes the Parallel Patterns Library as an "imperative programming model that promotes scalability and ease-of-use for developing concurrent applications." It uses the Concurrency Runtime for scheduling and resource management and provides generic, type-safe algorithms and containers for use in parallel applications.

## References

1. **[^](#cite_ref-1)** ["The Visual C++ Weekly"](https://web.archive.org/web/20111008024206/http://paper.li/visualc/news/2011/03/12). March 12, 2011. Archived from [the original](http://paper.li/visualc/news/2011/03/12) on October 8, 2011. Retrieved August 14, 2011.

1. **[^](#cite_ref-2)** ["Parallel Patterns Library (PPL) on MSDN"](http://msdn.microsoft.com/en-us/library/dd492418.aspx). 3 August 2021.

This computing article is a stub. You can help Wikipedia by adding missing information.

- [v](https://en.wikipedia.org/wiki/Template:Compu-stub)
- [t](/source/Template_talk%3ACompu-stub)
- [e](https://en.wikipedia.org/wiki/Special:EditPage/Template:Compu-stub)

---
Adapted from the Wikipedia article [Parallel Patterns Library](https://en.wikipedia.org/wiki/Parallel_Patterns_Library) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Parallel_Patterns_Library?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
