O'Reilly logo

Topics in Parallel and Distributed Computing by Charles C Weems, Alan Sussman, Arnold L Rosenberg, Anshul Gupta, Sushil K Prasad

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9

Parallel computing in a Python-based computer science course

Thomas H. Cormen*    * Dartmouth College

Abstract

Drawing heavily from Blelloch’s work on the vector model and scan operations, we work our way up to performing a parallel version of the quicksort algorithm on a shared-memory machine with p processors. We first see how to perform reduction and scan operations in parallel. We then examine parallel meld and permute operations, which lead to unsegmented partitioning in parallel. We then introduce segmented operations and modify our partitioning procedure to work with segmented operations, leading to a fully parallel version of quicksort.

Python code appears for most, but not all, of the operations in this chapter. We omit ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required