Summary

In this chapter we have discussed different optimization techniques. All are illustrated on the same simple problem of matrix multiplication to demonstrate how the same algorithm can be adjusted to accommodate different optimization techniques. We also optimized the histogram computation kernel which was originally discussed in Chapter 3, OpenCL Buffer Objects. Based on data size, hardware and software environment different optimization strategies can be applied. The chapter ends with a hint on the kind of application when OpenCL would show real performance improvement and then some general tips or checklist related to optimization. In the next chapter we describe image processing using OpenCL.

Get OpenCL Programming by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.