CHAPTER 1: Shared Memory¶
Programmers can utilize several languages and libraries to program shared-memory multiprocessors. In this chapter, we will discuss OpenMP (or Open Muliti-Processing), a standard API for multithreading that has existed for over 25 years. A key advantage of OpenMP over other API and libraries is its use of pragmas, or compiler directives that indicate where in a program parallelism should occur. The actual task of creating and destroying teams of threads is done automatically and silently by the compiler, abstracting away many details that make writing multithreaded applications difficult. In addition, OpenMP makes it possible for programmers to incrementally add parallelism to their programs.
- 1.0 Shared Memory Preliminaries
- 1.1 First Steps - Programming Shared Memory
- 1.2 Race Conditions
- 1.3 Reduction
- 1.4 Real World Problem - Drug Design