CUDA for Engineers: An Introduction to High-Performance Parallel Computing

所需积分/C币:20 2019-01-17 23:31:09 6.26MB PDF
49
收藏 收藏
举报

CUDA for Engineers: An Introduction to High-Performance Parallel Computing by Duane Storti (Author), Mete Yurtoglu (Author) Paperback: 331 pages 出版社: Addison Wesley; 01 edition (2 Nov. 2015) Language: English ISBN-10: 013417741X ISBN-13: 9780134177410 CUDA for Engineers gives you direct, hands-on engagement with personal, high-performance parallel computing, enabling you to do computations on a gaming-level PC that would have required a supercomputer just a few years ago. The authors introduce the essentials of CUDA C programming clearly and concisely, quickly guiding you from running sample programs to building your own code. Throughout, you’ll learn from complete examples you can build, run, and modify, complemented by additional projects that deepen your understanding. All projects are fully developed, with detailed building instructions for all major platforms. Ideal for any scientist, engineer, or student with at least introductory programming experience, this guide assumes no specialized background in GPU-based or parallel computing. In an appendix, the authors also present a refresher on C programming for those who need it. Coverage includes Preparing your computer to run CUDA programs Understanding CUDA’s parallelism model and C extensions Transferring data between CPU and GPU Managing timing, profiling, error handling, and debugging Creating 2D grids Interoperating with OpenGL to provide real-time user interactivity Performing basic simulations with differential equations Using stencils to manage related computations across threads Exploiting CUDA’s shared memory capability to enhance performance Interacting with 3D data: slicing, volume rendering, and ray casting Using CUDA libraries Finding more CUDA resources and code Realistic example applications include Visualizing functions in 2D and 3D Solving differential equations while changing initial or boundary conditions Viewing/processing images or image stacks Computing inner products and centroids Solving
Contents Introduction What Is cuda? What Does Need-to-Know"Mean for Learning CUDA? What Is Meant by for Engineers"? What do you need to get started with cuda? How Is this book structured Conventions used in this book Code used in this book User's guide Historical context 10 References Chapter 1: First Steps 13 Running cuda samples CUDA Samples under windows 14 CUDA Samples under linux 17 Estimating Acceleration Running Our Own Serial Apps 19 dist v1 .19 dist v2 ..20 Summary Suggested Projects ....23 Chapter 2: CUDA Essentials 。,,25 CUDAs Model for parallelism 25 Need-to-Know CUDA API and C Language EXtensions 28 Summary 31 Suggested Projects References Chapter 3: From Loops to Grids 33 Parallelizing dist v1 33 Executing dist vI cuda .37 Parallelizing dist v2 ..38 Standard workflow 42 Simplified Workflow Unified Memory and Managed Arrays Distance App with cudaMallocManaged() Summary .47 Suggested Projects References Chapter 4: 2D Grids and Interactive Graphics ........ 49 Launching 2D Computational Grids 50 Syntax for 2d Kernel launch 51 Defining 2D Kernels 52 dist 2d 53 Live Display via Graphics Interop 56 oplication Sta Running the stability visualizer 73 ummary Suggested projects References 77 Chapter 5: Stencils and Shared Memory 79 Thread Interdependence 80 Computing derivatives on a 1D grid Implementing dd ld global 82 Implementing dd ld shared 85 Solving Laplaces equation in 2D: heat 2d 88 Sharpening edges in an Image: sharpen 102 ummary 117 Suggested Projects 118 eferences Chapter 6: Reduction and Atomic Functions 121 Threads Interacting Globally Implementing parallel dot 123 Computing Integral Properties: centroid 2d 130 Summary 138 Suggested Projects 138 References 138 Chapter 7: Interacting with 3D Data Launching 3D Computational Grids: dist 3d 144 Viewing and Interacting with 3D Data: vis 3d 146 Slicing 149 Volume rendering 153 Raycasting 154 Creating the vis 3d App 156 Summary 171 Suggested projects 71 References 171 Chapter 8: Using CUDA Libraries ,,,,,,,,,.173 Custom versus off-the-Shelf Thrust 175 Computing Norms with inner product () .176 Computing Distances with transform( .180 Estimating Pi with generate(), transform(), and reduce() 185 DURAND 190 NPP 193 sharpen npp 194 More Image Processing with NPP Linear algebra using cusolver and cublas 201 CUDNN 207 ArrayFire 207 Summary 207 Suggested projects 208 References ..209 Chapter 9: Exploring the CUDA Ecosystem 211 The Go-To List of Primary Sources 211 CUDA Zone 211 Other Primary Web Sources 212 Online courses 213 CUDA Books 214 Further sources 217 CUDA Samples 217 CUDA Languages and Libraries 217 More cuda books 217 Summary 218 Suggested Projects 219 Appendix A: Hardware Setup 。.,,,221 Checking for an NViDIA GPU: Windows 221 Checking for an NVIDIA GPU: OS X 222 Checking for an NVIDIA GPU: Linux 223 Determining Compute Capability 223 Upgrading Compute Capability 225 Mac or Notebook Computer with a CUDA-Enabled GPU 225 Desktop computer 226 Appendix B: Software Setup 229 Windows setup 229 Creating a restore point 230 Install g the de 230 Installing the CUDA Toolkit 230 al est run 235 Os Setup 238 Downloading and Installing the CUDA Toolkit 239 Linux setup 240 Preparing the System Software for CUDA Installation .240 Downloading and installing the cuda toolkit 240 Installing Samples to the User Directory 241 Initial Test run 242 Appendix C: Need-to-Know C Programming 245 Characterization of c 245 C Language basics 246 Data Types, Declarations, and Assignments 248 Defining functions 250 Building Apps: Create, Compile, Run, Debug 251 Building Apps in Windows 252 Building apps in Linux 258 Arrays, Memory Allocation, and Pointers 262 Control statements: for. if 263 The for loop 264 The if statement 265 Other Control statements 267 Sample c programs 267 dist v1 .267 dist v2 .271 dist v2 with Dynamic Memory 275 References 277 Appendix D: CUDA Practicalities: Timing, Profiling Error Handling, and Debugging 279 Execution Timing and profiling 279 Standard C Timing Methods 280 CUDA EVents 282 Profiling with NviDiA Visual Profiler 284 Profiling in nsight visual studio ..288 Error Handling 292 Debugging in Windows 298 Debugging in Linux 305 CUDA-MEMCHECK .308 Using Visual Studio Property Pages 309 References Index 313 Introduction Welcome to cUda for Engineers. the goal of this book is to give you direct hands-on engagement with personal high-performance computing. If you follow along on our foray into the CUDA world, you will gain the benefit of massive parallelism and be able to perform computations on a basic gaming compute that until very recently required a supercomputer The material presented in this book will help you make sense of more sophisticated CUDA literature and pursue your own CUDA projects Let's get started by explaining CUDa and our strategy for getting up to speed as efficiently as possible What IS cuda? CUDA is a hardware/software platform for parallel computing created and sup ported by nvidia corporation to promote access to high-performance parallel computing. The hardware aspect of CUda involves graphics cards equipped with one or more CUDA-enabled graphics processing units (GPUs). The Nvidia CUDA Toolkit software provides a development environment based on the C/C++ family of programming languages [1] The GPU-based approach to massively parallel computing used by Cuda is also the core technology used in many of the world's fastest and most energy efficient supercomputers. the key criterion has evolved from FLOPS (floating point operations per second to FLOPS/watt (i. e, the ratio of computing pro- ductivity to energy consumption), and GPU-based parallelism competes well in terms of FLoPS/watt. In fact between June 2012 and December 2013, the list of the top ten most energy-efficient supercomputers in the world changed fror being 100% based on IBMs Blue Gene system (containing PowerPC CPUs)to

...展开详情
试读 127P CUDA for Engineers: An Introduction to High-Performance Parallel Computing
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
上传资源赚钱or赚积分
最新推荐
CUDA for Engineers: An Introduction to High-Performance Parallel Computing 20积分/C币 立即下载
1/127
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第1页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第2页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第3页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第4页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第5页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第6页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第7页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第8页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第9页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第10页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第11页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第12页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第13页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第14页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第15页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第16页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第17页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第18页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第19页
CUDA for Engineers: An Introduction to High-Performance Parallel Computing第20页

试读结束, 可继续阅读

20积分/C币 立即下载