This chapter introduces the Thrust library for CUDA programming. The library supports type-generic functions in C++. This chapter uses practical code examples to demonstrate the utility, portability, and productivity advantage of the library.
generic programming; template; C++; Thrust; portability; algorithm building blocks
B.1 Background 475
B.2 Motivation 477
B.7 Exercises 491
This chapter demonstrates how to leverage the Thrust parallel template library to implement high-performance ...