Auto boutiques-francophones Simple and secure cloud storage giftguide Cyber Monday Deals Week in Home & Kitchen Kindle Music Deals Store SGG Tools
CUDA by Example and over one million other books are available for Amazon Kindle. Learn more
CDN$ 60.20
  • List Price: CDN$ 61.99
  • You Save: CDN$ 1.79 (3%)
Only 10 left in stock (more on the way).
Ships from and sold by Gift-wrap available.
CUDA by Example: An Intro... has been added to your Cart
Have one to sell?
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

CUDA by Example: An Introduction to General-Purpose GPU Programming Paperback – Jul 19 2010

1 customer review

See all 2 formats and editions Hide other formats and editions
Amazon Price
New from Used from
Kindle Edition
"Please retry"
"Please retry"
CDN$ 60.20
CDN$ 37.74 CDN$ 45.92

Cyber Monday Deals Week in Books

Frequently Bought Together

  • CUDA by Example: An Introduction to General-Purpose GPU Programming
  • +
  • CUDA Handbook: A Comprehensive Guide to GPU Programming, The
  • +
  • Professional CUDA C Programming
Total price: CDN$ 185.12
Buy the selected items together

No Kindle device required. Download one of the Free Kindle apps to start reading Kindle books on your smartphone, tablet, and computer.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your e-mail address or mobile phone number.

Product Details

  • Paperback: 312 pages
  • Publisher: Addison-Wesley Professional; 1 edition (July 19 2010)
  • Language: English
  • ISBN-10: 0131387685
  • ISBN-13: 978-0131387683
  • Product Dimensions: 18.5 x 2.3 x 22.9 cm
  • Shipping Weight: 567 g
  • Average Customer Review: 5.0 out of 5 stars  See all reviews (1 customer review)
  • Amazon Bestsellers Rank: #202,331 in Books (See Top 100 in Books)
  •  Would you like to update product info, give feedback on images, or tell us about a lower price?

  • See Complete Table of Contents

Product Description

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.

Inside This Book

(Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index
Search inside this book:

What Other Items Do Customers Buy After Viewing This Item?

Customer Reviews

5.0 out of 5 stars
5 star
4 star
3 star
2 star
1 star
See the customer review
Share your thoughts with other customers

Most helpful customer reviews

Format: Paperback
I bought this book to learn the ins and outs of CUDA. I was surprised to find that a book endorsed by NVIDIA, the proprietors of CUDA, would publish such a concise walk through of CUDA and the main features. The book goes through the core concepts. It is a good first read before moving onto a larger exposition on CUDA. If you are a scientist or engineer without much computing background and need to use CUDA, this title is for you. You will be composing CUDA kernels in a matter of days.
Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again.
Report abuse

Most Helpful Customer Reviews on (beta) 58 reviews
66 of 70 people found the following review helpful
A good introduction to CUDA C which could well supplant its competition July 24 2010
By Alexandros Gezerlis - Published on
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. This fact, along with the availability of lecture slides and lab materials for the latter book, points to the main difference between the two texts: Sanders & Kandrot are better-suited to a self-study of CUDA C, while the Kirk & Hwu book is more of a class textbook (and thus broader). Finally, I was pleased to see Sanders & Kandrot include a whole chapter (chapter 11) on working with multiple GPUs, a topic Kirk & Hwu relegate to a short section.

The Bad: having color is a welcome addition, but I could not understand why the authors chose to simply follow the text editor's default highlighting of keywords when they could have used color to highlight specific portions of the code. Similarly, a number of figures (e.g. Figs. 5.5 and 8.1) are described in the text as containing green, but they show up in greyscale. The book also contains quite a few minor typos, but that's normal; what's not normal is that every single section cross-reference outside the appendix is wrong (I counted 16 in total). Moving on to more consequential matters: Kirk & Hwu have a chapter on floating point topics; given that numerical computations are certainly part of general-purpose GPU programming, Sanders & Kandrot could have said more about them. On a different note, Kirk & Hwu have a chapter on the competing programming model OpenCL, while Sanders & Kandrot do not even have an index entry on it -- one might counter-argue here that they have knowingly put CUDA in the title. This brings me to my main gripe with this book: why didn't the authors just call it "CUDA C by example"? I believe the answer is connected to their ambivalence toward C++. An illustrative example: new and delete are used in host code only once in the entire volume (on p. 82 and p. 84, respectively), but when the code snippets are shown again (on pp. 86-87) new and delete have been silently replaced by malloc and free! In the case of device code, the authors do not discuss CUDA-supported C++ constructs like default parameters, namespaces, function templates, not to mention compute capability 2.0 things like function objects. (Structures with member functions do not beget C++). In a nutshell, the book contains too much C++ for people who only know C, and not enough C++ for those who actually use that language.

Despite these misgivings, I cannot ignore this book's low selling price (especially on the Kindle), its practical focus on a multitude of code listings, and the fact that its explanations are generally clear. Thus, I think it is an appropriate buy for those interested in learning about CUDA C.

Alex Gezerlis
17 of 18 people found the following review helpful
The best introduction to CUDA by far. July 22 2010
By Mark A. Peot - Published on
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..."
17 of 18 people found the following review helpful
Great starting point for learning CUDA. July 22 2010
By K. Tillman - Published on
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.)
19 of 22 people found the following review helpful
Fair starting point, but definitely not the only book you should read. Sept. 11 2010
By Amazon Customer - Published on
Format: Paperback Verified Purchase
I've done some work with CUDA and read a number of books and tutorials. This book does a very good job of relating the syntax and structure, but this book really doesn't go beyond showing you how to get your code to compile when using different features. It does not show you how to write efficient CUDA code (Getting a 7x speedup on a card running 960 threads simultaneously should *not" be considered very impressive. We've recently gotten >60x speedups, but using concepts that aren't covered in this text). I know the book industry doesn't turn on a dime, so I can certainly understand that no specific discussion is given to Fermi (though the book does list those cards), and there are (I think they claim) 200 million non-Fermi cards out there, so there is still more than enough reason to write apps that need to know how these "older" cards work. You really need a reference that will also discuss optimizing for register use, coalesced memory accesses, divergence, etc. in much greater depth.

So, given the low price, it's a useful buy if you prefer a book instead of going through some online tutorials. But, if you want to write fast, efficient code, don't stop at this book.
9 of 10 people found the following review helpful
Professional effort April 1 2011
By Amazon Customer - Published on
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.

Look for similar items by category


Would you like to update product info or give feedback on images?