6.12 Case studies

In this section we explore the potential of CUDA with a number of easy-to-understand applications. The goal is to show how we can use CUDA to accelerate our computations while at the same time exercise the tools that are provided with the CUDA SDK.

In the code supplied in the following sections, we revert to the primitive but convenientCUDA error checking that a preprocessor macro can provide,as identified in Section 6.6. This is currently the safest bet for catching early errors occurring on the GPU. Although we purposefully omitted error checking in the previous sections, this was done for the sake of clarity and is obviously not recommended.

6.12.1 Fractal set calculation

In this section we explorethe design of a solution ...

Get Multicore and GPU Programming 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.