O'Reilly logo

GPU Computing Gems Jade Edition by Wen-mei W. Hwu

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 29

Accelerating Development and Execution Speed with Just-in-Time GPU Code Generation

Peter Eastman and Vijay Pande

In this chapter we describe a method for automatically generating OpenCL kernels to perform a calculation. The user supplies a set of mathematical expressions describing the calculation to be done. We analyze the expressions, transform them into optimized OpenCL code, and generate kernels to perform the calculation using an appropriate algorithm. This process allows us to simultaneously satisfy the requirements for speed, flexibility, and ease of use.

29.1 Introduction, Problem Statement, and Context

The design of numerical software involves trade-offs between speed, flexibility, and ease of use. At one extreme, the developer ...

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