Algorithmic Structures and Parallel Patterns