O'Reilly logo

Heterogeneous Computing with OpenCL by Dana Schaa, Perhaad Mistry, David R. Kaeli, Lee Howes, Benedict Gaster

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Basic OpenCL Examples
This chapter discusses some basic OpenCL examples, which allow us to summarize our understanding of the specification discussed in Chapter 2. These examples demonstrate the programming steps needed to write complete OpenCL applications. We also include an example using the C++ Wrapper API for developers who have a preference toward C++. The examples discussed here can serve as baselines to compare the optimized versions, which can be written after studying later chapters.
Keywords C++, example program, matrix multiplication, OpenCL

Introduction

In Chapter 2, we discussed the OpenCL specification and how it can be used to implement programs for heterogeneous platforms. Chapter 3 covered the architecture of some possible ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required