Skip to Main Content
Multicore and GPU Programming
book

Multicore and GPU Programming

by Gerassimos Barlas
December 2014
Intermediate to advanced content levelIntermediate to advanced
698 pages
19h 8m
English
Morgan Kaufmann
Content preview from Multicore and GPU Programming
Chapter 4

Shared-memory programming

OpenMP

Abstract

The decomposition of a sequential program into components that can execute in parallel is a tedious enterprise. OpenMP has been designed to alleviate much of the effort involved, by accommodating the incremental conversion of sequential programs into parallel ones, with the assistance of the compiler.

OpenMP relies on compiler directives for decorating portions of the code that the compiler will attempt to parallelize. In this chapter we examine these OpenMP directives and the associated clauses that control their behavior.

OpenMP is particularly useful for partitioning and running in parallel the iterations of a loop. Loop parallelism as facilitated by OpenMP, can be successful only if ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The CUDA Handbook: A Comprehensive Guide to GPU Programming

The CUDA Handbook: A Comprehensive Guide to GPU Programming

Nicholas Wilt
PThreads Programming

PThreads Programming

Dick Buttlar, Jacqueline Farrell, Bradford Nichols

Publisher Resources

ISBN: 9780124171374