O'Reilly logo

OpenCL Parallel Programming Development Cookbook by Raymond Tay

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

OpenCL implementation of the Histogram

In this section, we will attempt to develop your intuition to be able to identify possible areas of parallelization and how you can use those techniques to parallelize sequential algorithms.

Not wanting to delve into too much theory about parallelization, one of the key insights about whether a routine/algorithm can be parallelized is to examine whether the algorithm allows work to be split among different processing elements. Processing elements from the OpenCL's perspective would be the processors, that is, CPU/GPU.

Note

Recall that OpenCL's work items are execution elements that act on a set of data and execute on the processing element. They are often found in a work group where all work items can coordinate ...

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