These patterns cover some of the ones available when implementing algorithms for a parallel program.
Loop Parallelism
This pattern covered some of the techniques available for parallelizing loops, or allowing the loop to be processed concurrently over different bounds. The author first recommends profiling the application to identify what loops are used the most and use those as candidates. If one has a target increase desired, using Amdahl's law shows how much code needs to be improved. This could present a large percentage of the loops.
Task Queue Implementation
Tasks can be used for several different algorithms, such as graph traversal or part of loop parallelism. When implementing this pattern, first a task granularity must be decided upon, as discussed in other patterns. Next, the structure for the queue, centralized or decentralized must be chosen, with pros and cons for either choice.
It was nice to see code examples, although writing them in Python may not be the most universal way to document a pattern, as it is not as popular as c++ or Java. Even with out the examples, the concepts in this pattern were not as complex as others, which would have benefited more from examples.
Graph Partitioning
This pattern covered some of the many different ways a graph may be partitioned. As this is an NP-complete problem, different heuristical approaches were presented. I have not been in a position where I needed to do this, but having it documented may be useful for others in the academic or scientific domain.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment