Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7. Using Automatic Parallelization and OpenMP

7. Using Automatic Parallelization and OpenMP

Previous chapters have covered low-level approaches to creating processes or threads and sharing data between them. Fortunately, many approaches enable the developer to focus on higher levels of application design and leave the mechanics of managing threads and sharing data to runtime libraries and the compiler. In an ideal case, the compiler manages everything, from identifying parts of the code to run in parallel through providing the mechanisms to support that parallelism. However, without some help from the developer, current compiler technology will rarely be able to exploit all the parallelism in an application. The most commonly used and commonly available language extension for parallelism is the OpenMP API.[1]

[1] www.openmp.org

The OpenMP specification defines an API that enables a developer to add directives to their serial code that will cause the compiler to produce a parallel version of the application. This chapter describes both automatic parallelism provided by many compilers and how the OpenMP API can produce parallel applications from serial codes.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint