Summary of new PPL features
In Visual Studio 2010, we saw the introduction of C++ parallelization libraries. We also introduced concepts to leverage concurrency by expressing sophisticated dataflow pipelines. In Visual Studio 11 Developer Preview, these libraries have been extended to provide better performance, more control, and richer support for the parallel patterns developers need most.
More parallel patterns
std:: patterns |
concurrency:: patterns |
parallel_buffered_sort parallel_radix_sort |
|
parallel_transform |
|
parallel_reduce |
|
|
More concurrency-safe containers and data structures
std:: containers |
concurrency:: containers |
concurrent_priority_queue |
|
concurrent_unordered_map |
|
concurrent_unordered_multimap |
|
concurrent_unordered_set |
|
concurrent_unordered_multiset |
Richer Task Model
We have enriched the C++ task model by adding support for task continuations, which lets a developer express “when you’re done with this task, continue with that one, and in the meantime I’ll go away to do some other work”. Doing other work can mean processing the message loop, or scheduling other tasks – all of which can run in parallel.
Scheduler and resource management enhancements
In my previous post, I mentioned the performance improvements gained by simply recompiling the application. Some of the improvements come from applying better scheduling techniques and enhancing task locality.
Lastly, the Resource Manager now respects process affinity mask set prior to the use of parallel libraries. One can also programmatically set this at the Resource Manager level by calling LimitTaskExecutionResources() API. This feature is particularly aimed at enabling server-side developers who would like to partition and dedicate CPU resources for each application.
Cheers!
Rahul V. Patil
Lead Program Manager
Comments
Anonymous
January 19, 2012
"accumulate - parallel_reduce" Now why would you go and change the name to something confusing as parallel_reduce ? What is wrong with parallel_accumulate ? Looking at other "parallel_" function will make the programmer assume you only have to add "parallel_" to the existing stl functions. Did you want to be special and annoy programmers ?Anonymous
January 20, 2012
James, Thanks for the feedback! We did so exactly for the reason you stated -- we don't want the programmer to assume that adding "parallel_" results in a semantically equivalent program. The last parameter to std::accumulate is the initial value, whereas the last parameter to Concurrency::parallel_reduce is the identity value. The difference is subtle but significant: int data[] = {1,2,3}; std::accumulate(begin(data), end(data), 1); will return 7, but Concurrency::parallel_reduce(begin(data), end(data), 1); will return 14.