Common Parallel Algorithms

In this chapter are 11 common parallel algorithms implemented using the TPL. You can download all of the source code for all of the algorithms from

These are some of the most widely used building blocks in parallel programming, and I have included them as a reference for when you are facing a problem, a time-saver for when you need a quick answer, and a demonstration of how the TPL abstractions we covered throughout this book allow complex and rich functions to be developed with relatively few lines of code.

There are lots of variations in parallel algorithms. I have chosen those that I think have the broadest application and in which the core ideas are easily seen. I have kept the implementations as simple as possible, so you'll need to deal with exceptions, cancellations, and degrees of parallelization yourself; you'll find all you need to do so in earlier chapters.

0 0

Post a comment