Jump to content

Parallel Patterns Library: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Citation bot (talk | contribs)
m Misc citation tidying. You can use this bot yourself. Report bugs here. | Headbomb
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0
Line 1: Line 1:
The '''Parallel Patterns Library''' is a [[Microsoft]] library designed for use by native C++ developers that provides features for [[multicore programming]].<ref>{{cite web | url = http://paper.li/visualc/news/2011/03/12 | title = The Visual C++ Weekly | date = March 12, 2011}}</ref> It was first bundled with [[Visual Studio 2010]]. It resembles the [[C++ Standard Library]] in style and works well with the C++11 language feature, lambdas, also introduced with [[Visual Studio 2010]].
The '''Parallel Patterns Library''' is a [[Microsoft]] library designed for use by native C++ developers that provides features for [[multicore programming]].<ref>{{cite web | url = http://paper.li/visualc/news/2011/03/12 | title = The Visual C++ Weekly | date = March 12, 2011 | access-date = August 14, 2011 | archive-url = https://web.archive.org/web/20111008024206/http://paper.li/visualc/news/2011/03/12 | archive-date = October 8, 2011 | url-status = dead }}</ref> It was first bundled with [[Visual Studio 2010]]. It resembles the [[C++ Standard Library]] in style and works well with the C++11 language feature, lambdas, also introduced with [[Visual Studio 2010]].


For example, this sequential loop:
For example, this sequential loop:

Revision as of 06:17, 30 April 2020

The Parallel Patterns Library is a Microsoft library designed for use by native C++ developers that provides features for multicore programming.[1] It was first bundled with Visual Studio 2010. It resembles the C++ Standard Library 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 <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. ^ "The Visual C++ Weekly". March 12, 2011. Archived from the original on October 8, 2011. Retrieved August 14, 2011.
  2. ^ "Parallel Patterns Library (PPL) on MSDN".