CUDA by Example and over one million other books are available for Amazon Kindle. Learn more
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See all 3 images
Sell yours for a Gift Card
We'll buy it for $9.33
Learn More
Trade in now
Have one to sell? Sell on Amazon

CUDA by Example: An Introduction to General-Purpose GPU Programming Paperback – July 29, 2010

ISBN-13: 978-0131387683 ISBN-10: 0131387685 Edition: 1st
Buy used
Buy new
Used & new from other sellers Delivery options vary per offer
63 used & new from $18.96
Amazon Price New from Used from
"Please retry"
Paperback, July 29, 2010
"Please retry"
$23.16 $18.96

Hero Quick Promo
Save up to 90% on Textbooks
Rent textbooks, buy textbooks, or get up to 80% back when you sell us your books. Shop Now
$33.67 FREE Shipping on orders over $35. In Stock. Ships from and sold by Gift-wrap available.

Frequently Bought Together

CUDA by Example: An Introduction to General-Purpose GPU Programming + CUDA Handbook: A Comprehensive Guide to GPU Programming, The + Programming Massively Parallel Processors, Second Edition: A Hands-on Approach
Price for all three: $127.85

Buy the selected items together

Editorial Reviews

From the Back Cover

“This book is required reading for anyone working with accelerator-based computing systems.

-From the Foreword by Jack Dongarra, University of Tennessee and Oak Ridge National Laboratory

CUDA is a computing architecture designed to facilitate the development of parallel programs. In conjunction with a comprehensive software platform, the CUDA Architecture enables programmers to draw on the immense power of graphics processing units (GPUs) when building high-performance applications. GPUs, of course, have long been available for demanding graphics and game applications. CUDA now brings this valuable resource to programmers working on applications in other domains, including science, engineering, and finance. No knowledge of graphics programming is required-just the ability to program in a modestly extended version of C.


CUDA by Example,written by two senior members of the CUDA software platform team, shows programmers how to employ this new technology. The authors introduce each area of CUDA development through working examples. After a concise introduction to the CUDA platform and architecture, as well as a quick-start guide to CUDA C, the book details the techniques and trade-offs associated with each key CUDA feature. You'll discover when to use each CUDA C extension and how to write CUDA software that delivers truly outstanding performance.


Major topics covered include

  • Parallel programming
  • Thread cooperation
  • Constant memory and events
  • Texture memory
  • Graphics interoperability
  • Atomics
  • Streams
  • CUDA C on multiple GPUs
  • Advanced atomics
  • Additional CUDA resources

All the CUDA software tools you'll need are freely available for download from NVIDIA.

About the Author

Jason Sanders is a senior software engineer in the CUDA Platform group at NVIDIA. While at NVIDIA, he helped develop early releases of CUDA system software and contributed to the OpenCL 1.0 Specification, an industry standard for heterogeneous computing. Jason received his master’s degree in computer science from the University of California Berkeley where he published research in GPU computing, and he holds a bachelor’s degree in electrical engineering from Princeton University. Prior to joining NVIDIA, he previously held positions at ATI Technologies, Apple, and Novell. When he’s not writing books, Jason is typically working out, playing soccer, or shooting photos.


Edward Kandrot is a senior software engineer on the CUDA Algorithms team at NVIDIA. He has more than twenty years of industry experience focused on optimizing code and improving performance, including for Photoshop and Mozilla. Kandrot has worked for Adobe, Microsoft, and Google, and he has been a consultant at many companies, including Apple and Autodesk. When not coding, he can be found playing World of Warcraft or visiting Las Vegas for the amazing food.


Shop the New Digital Design Bookstore
Check out the Digital Design Bookstore, a new hub for photographers, art directors, illustrators, web developers, and other creative individuals to find highly rated and highly relevant career resources. Shop books on web development and graphic design, or check out blog posts by authors and thought-leaders in the design industry. Shop now

Product Details

  • Paperback: 312 pages
  • Publisher: Addison-Wesley Professional; 1 edition (July 29, 2010)
  • Language: English
  • ISBN-10: 0131387685
  • ISBN-13: 978-0131387683
  • Product Dimensions: 7.4 x 0.9 x 9.1 inches
  • Shipping Weight: 1.2 pounds (View shipping rates and policies)
  • Average Customer Review: 4.3 out of 5 stars  See all reviews (55 customer reviews)
  • Amazon Best Sellers Rank: #47,980 in Books (See Top 100 in Books)

More About the Authors

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

4.3 out of 5 stars

Most Helpful Customer Reviews

65 of 69 people found the following review helpful By Alexandros Gezerlis on July 24, 2010
Format: Paperback
"CUDA by example: an introduction to general-purpose GPU programming" is a brand new text by Jason Sanders and Edward Kandrot, senior members of NVIDIA's CUDA development team. This is basically the second introductory text to hit the market on general-purpose GPU programming, the first one being "Programming Massively Parallel Processors: A Hands-On Approach" by David Kirk and Wen-Mei Hwu.

The Good: it is not very common to find a technical book in this price range that is not simply in greyscale. Perhaps unsurprisingly for an NVIDIA book there's quite a bit of green, and this definitely enhances the reading experience. On a more substantive note: the authors really mean the "by example" part of "CUDA by example". From chapter 3 onward, all the main concepts are fleshed out by showing and dissecting lots of code -- probably more so than in Kirk & Hwu's text, which includes application case studies, but also more extensive treatments of the CUDA architecture. As with any example-based book, it is important to run and modify the programs while reading through the text. Right now there are a few hiccups with the files Sanders & Kandrot were kind enough to provide (e.g. as of this writing README.txt and license.txt do not have the appropriate permissions set), but I'm pretty sure these are just teething troubles which will disappear soon enough. The writing is cheerful (e.g. "For those readers who are more familiar with Star Trek than with weaving, a warp in this context has nothing to do with the speed of travel through space.", p. 106) and the explanations are for the most part clear, the language being pretty lucid -- once again, probably more so than in the Kirk & Hwu volume.
Read more ›
3 Comments Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
17 of 18 people found the following review helpful By Mark A. Peot on July 22, 2010
Format: Kindle Edition Verified Purchase
This is an excellent introduction to CUDA. The prose and content are excellent: I read it cover-to-cover in a single sitting and enjoyed every page.

The authors clearly explain the basic CUDA paradigm starting with very simple code and working up to progressively more complex examples. The authors spend a considerable amount of time discussing different memory types and memory access styles, motivating when each style is appropriate. The code snippets are clean, clear and concise, providing a minimal yet complete introduction to each new language feature.

Highly recommended!

The book does not provide an HTML pointer to the source code used in the book. Edward Kandrot writes: "The Kindle version shipped a week too soon, it was supposed to ship next week when the physical book ships. Because of this, the website at NVIDIA wasn't done yet. Jason just spent the day making the website happen!

[...] is where the source code is currently located. I hope this helps. I wrote the examples to be specific for what is being covered, putting extras in the header files so as not to distract from the topic at hand. Only really works if the reader has the header files as well..."
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
17 of 18 people found the following review helpful By K. Tillman on July 22, 2010
Format: Kindle Edition Verified Purchase
I downloaded CUDA by Example on the Kindle and starting reading it. Sanders and Kandrot provide a nice step by step walk through of how to program with CUDA and the examples are really straight forward. It begins with the basic hello world introduction to the programming model, then dives deeper into the different API features with examples in each chapter.
I would recommend this book to anyone who wants to get started using CUDA.
(Found the source code online, not sure what the other review is about.)
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
9 of 9 people found the following review helpful By Amazon Customer on April 1, 2011
Format: Paperback Verified Purchase
I purchased this book a few months ago, and was able to get through the bulk of it while on a day-long flight. It is a well structured, albeit terse approach to the CUDA architecture. I think on its own, the book deserves 3.5-4 stars. However, I have also read the most recent OpenCL book (rough cuts - actual release sometime in July 2011), and without using this CUDA book as a background / reference, the OpenCL book is incomprehensible. Hence, as of now, this book is the best there is out there for those interested in venturing into OpenCL or CUDA (no, the book does not teach you OpenCL constructs or syntax, but I found the architectural foundations to be fairly similar).

Also, CUDA is by far a more professional and better groomed effort, and this book reflects that difference. A simple comparison of Nvidia's CUDA support pages with the Kronos' abysmal OpenCL web page will illustrate the point (with the latter's broken or incorrect links, a web design that look like a college freshman's HTML project from the mid 90s, and a handful of hodge-podge and unprofessional scribbles, and requiring a dozen or so clicks and reading incomplete wikis to realize that there is no OpenCL developer "package" from Kronos, except for what Nvidia and AMD are individually making available for their hardware -- so much for creating platform heterogeneity).

However, I am still determined to pursue OpenCL over CUDA, betting my time and effort on a completely open source (and hopefully, someday homogeneous) platform. Otherwise, OpenCL will join the graveyard of many other "nice idea, but half-baked" programming languages of the past.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

Most Recent Customer Reviews

Set up an Amazon Giveaway

Amazon Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more
CUDA by Example: An Introduction to General-Purpose GPU Programming
This item: CUDA by Example: An Introduction to General-Purpose GPU Programming
Price: $33.67
Ships from and sold by

What Other Items Do Customers Buy After Viewing This Item?

Want to discover more products? Check out these pages to see more: gts 8600, gtx 260 ti, gtx 260 ti, geforce gtx 280, geforce gtx 280