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 ...

Get GPU Computing Gems Jade Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.