Skip to Main Content
Multicore and GPU Programming
book

Multicore and GPU Programming

by Gerassimos Barlas
December 2014
Intermediate to advanced content levelIntermediate to advanced
698 pages
19h 8m
English
Morgan Kaufmann
Content preview from Multicore and GPU Programming
Chapter 7

The Thrust template library

Abstract

Thrust is a template library that allows a high-level approach to GPU and multicore programming, that closely resembles the way the standard STL library is used, effectively reducing the learning curve associated with GPU computing.

Thrust-based programs operate on collections of data without explicit reference to their location, meaning that the same code can use the CPU or the GPU as an execution platform. In fact, Thrust permits a run-time choice of the “device back-end” that will be used for execution, with the available alternatives including CUDA, TBB, OpenMP or plain threads. This flexibility and the level of ease-of-use, makes Thrust a prime candidate for parallel program design.

In this ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The CUDA Handbook: A Comprehensive Guide to GPU Programming

The CUDA Handbook: A Comprehensive Guide to GPU Programming

Nicholas Wilt
PThreads Programming

PThreads Programming

Dick Buttlar, Jacqueline Farrell, Bradford Nichols

Publisher Resources

ISBN: 9780124171374