Parallel Patterns Library
Encyclopedia
The Parallel Patterns Library is a Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

 library designed for use by native C++ developers that provides features for multicore programming. It was first bundled with Visual Studio 2010. It resembles the Standard Library
Standard library
A standard library for a programming language is the library that is conventionally made available in every implementation of that language. In some cases, the library is described directly in the programming language specification; in other cases, the contents of the standard library are...

 in style and works well with the C++11 language feature, lambdas, also introduced with 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
// . . .
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 borne by the library.

MSDN 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.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK