CUDA by Example: An Introduction to General-Purpose GPU Programming

CUDA by Example: An Introduction to General-Purpose GPU Programming
复制标题

DOI:
10.12694/scpe.v11i4.663
复制
发表时间:
2010
期刊:
Scalable Comput. Pract. Exp.
影响因子:
--
通讯作者:
Jie Cheng
Jie Cheng
中科院分区:
其他
文献类型:
--
作者:
Jie Cheng

文献摘要

被引文献

相似文献

CUDA by Example:介绍通用图形处理器编程贾森·桑德斯和爱德华·坎德罗ISBN-13:978-0131387683 Addison-Wesley Professional;第一版(2010年7月29日)简介本书是为有兴趣研究如何使用CUDA C在图形处理单元(GPU)上开发通用并行应用程序的读者设计的。CUDA C是一种编程语言,它结合了行业标准编程C语言和一些可以利用CUDA架构的更多功能。这本书对NVIDA的CUDA架构进行了适当的介绍,并对开发环境的设置进行了深入的解释,是一本易于阅读、易于理解和动手的书。这本书的读者被假定至少有C语言背景。通过这本书,读者不仅可以获得CUDA C开发语言的经验,还可以了解很多重要的底层硬件知识,这些知识反过来可以帮助软件开发人员开发更高效和有效的应用程序。这本书组织得很好。每章由总论、章节目标和章节综述组成。桑德斯和坎德罗分别是NVIDIA公司CUDA平台组和CUDA算法团队的高级软件工程师。第一章向用户介绍了GPU和CUDA架构的发展历史。CUDA体系结构的特殊功能使GPU除了执行传统的图形计算外,还可以执行通用计算。通过阅读三个不同的应用程序,读者可以很容易地了解CUDA架构的好处,这些应用程序从医疗领域到环境领域都不同。在第2章中,Sanders和Kandrot为用户提供了运行CUDA C应用程序所需的硬件和软件支持的完整列表。所有软件都可以从作者建议的网站上免费下载。然后,通过第三章中熟悉的Hello world程序,作者揭开了CUDA C本质上是一种标准C语言的神秘面纱,它具有附加功能,允许应用程序开发人员指定哪些代码可以在设备(GPU及其内存)或主机(CPU和系统内存)上运行。在设置了所有合适的背景之后,第四章到第七章讨论了如何使用CUDA C在GPU上运行并行程序。在第八章,作者试图说明如何使用CUDA C将渲染和通用计算结合在一起。没有OpenGL或DirectX背景的读者可以跳过本章,转到下一章。然而,这一章是对本书的一个很好的补充,因为它让读者完全了解CUDA C。尽管CUDA C通过并行处理将复杂的单线程执行应用程序变成了更容易的情况,但当试图在大规模并行体系结构上实现简单的单线程应用程序时,有一些情况需要特别注意;第9章讨论了这个主题。与上面章节中讨论的并行性相比,在第10章中,读者可以在GPU上接触到不同类别的并行性,这指的是要并行执行的两个或更多完全独立的任务。第11章介绍如何在多个GPU上开发CUDA C应用程序。为了进一步研究,第12章展示了更多的工具来帮助CUDA C开发,以及更多的资源来将Reader的CUDA C开发技能提升到另一个水平。杰森·桑德斯和爱德华·坎德罗以一种非常容易阅读和理解的方式写下了这本书。此外,桑德斯和坎德罗从未忘记整本书中伟大的幽默感。阅读这本书,不仅是对CUDA C的一次发现,也是一本快乐的日记。强烈推荐对计算机科学专业学习CUDA C应用开发感兴趣的学生。建议将本书作为本科生学习并行程序设计的教材。程杰,夏威夷大学希洛分校
CUDA by Example: An Introduction to General-Purpose GPU Programming Jason Sanders and Edward Kandrot ISBN-13: 978-0131387683 Addison-Wesley Professional; 1 edition (July 29, 2010) Introduction This book is designed for readers who are interested in studying how to develop general parallel applications on graphics processing unit (GPU) by using CUDA C. CUDA C is a programming language, which combines industry standard programming C language and some more features which can exploit CUDA architecture. With proper introduction to NVIDA's CUDA architecture and in depth explanation for setting up development environment, this book is an easy to read, easy to understand, and hands on book. Readers of this book are assumed to have at least C language as background. Through this book, readers will not only gain experience in CUDA C development languages, but also will understand a lot of important underlying hardware knowledge, which in return can help software developers develop more efficient and effective applications. Outline of the Book This book is very well organized. Each chapter consists of general introduction, chapter objectives and Chapter Review. Both Sanders and Kandrot are senior software engineers in the CUDA Platform group and CUDA Algorithm team in NVIDIA Company, respectively. First chapter provide users background about history of GPU and CUDA architecture. Special features in CUDA architecture enable GPU to perform general purpose computation in addition to carry out traditional graphic computation. Readers can easily understand the benefit of CUDA architecture by reading though three different applications varying from medical field to environmental filed. In Chapter 2, Sanders and Kandrot equip users with complete lists of hardware and software support for running CUDA C applications. All software can be downloaded for free from websites suggested from authors. Then by a familiar Hello world program in Chapter 3, authors demystified that the CUDA C fundamentally is a standard C language with additional features which can allow application developer to specify which code can be run on device (GPU and its memory) or host (CPU and system memory). After setting all of proper background, the use of CUDA C to run parallel programs on GPU are discussed from Chapter 4 to Chapter 7. In Chapter 8, authors try to illustrate how to incorporate rendering and general purpose computation by using CUDA C. Readers without background in OpenGL or DirectX, can skip this chapter and go to the next. However, this chapter is a great addition to the book since it gives readers complete view of CUDA C. Even though CUDA C turns complicated application with single thread execution into easier case by parallel processing, there are some situation that special care should be taken when simple single thread application are tried to implement on massively parallel architecture; Chapter 9 discusses this topic. Compared to parallelism discussed in above chapters, which refers to parallel execution of a function on different sets of data, in Chapter 10, readers are exposed to a different class of parallelism on GPU, which refers to two or more completely independent tasks to be performed in parallel. Chapter 11 covers how to develop CUDA C application on Multiple GPUS. For further study, Chapter 12 shows more tools to aid CUDA C development and more resources to enhance reader's CUBA C development skills to another level. Summary Jason Sanders and Edward Kandrot wrote this book in such a way that is very easy to read and follow. Also, Sanders and Kandrot never forget the great sense of humor throughout the book. Reading this book is not only a discovery about CUDA C but also a joyful journal. It is highly recommended for students who are interested to learn CUDA C application development as Computer Science major. This book is recommended to be adopted as textbook for undergraduate students studying parallel programming. Jie Cheng, University of Hawaii Hilo