Programming the Cell Processor: For Games, Graphics, and Computation

Hardcover (Print)
Used and New from Other Sellers
Used and New from Other Sellers
from $1.99
Usually ships in 1-2 business days
(Save 97%)
Other sellers (Hardcover)
  • All (9) from $1.99   
  • New (4) from $58.25   
  • Used (5) from $1.99   

Overview

Make the Most of IBM’s Breakthrough Cell Processor in Any Gaming, Graphics, or Scientific Application

IBM’s Cell processor delivers truly stunning computational power: enough to satisfy even the most demanding gamers and graphics developers. That’s why Sony chose the Cell to drive its breakthrough PlayStation 3 and why Cell processors are at the heart of today’s most powerful supercomputers. But many developers have struggled to create high-performance Cell applications: the practical, coherent information they need simply hasn’t existed.

Programming the Cell Processor solves that problem once and for all. Whether you’re a game developer, graphics programmer, or engineer, Matthew Scarpino shows you how to create applications that leverage all the Cell’s extraordinary power. Scarpino covers everything from the Cell’s advanced architecture to its powerful tools and libraries, presenting realistic code examples that help you gain an increasingly deep and intuitive understanding of Cell development.

Scarpino illuminates each of the Cell’s most important technical innovations, introduces the commands needed to access its power, and walks you through the entire development process, including compiling, linking, debugging, and simulating code. He also offers start-to-finish case studies for three especially important Cell applications: games, graphics, and scientific computing. The Cell platform offers unprecedented potential, and this book will help you make the most of it.

  • Mastering the Cell SDK, including the GCC-based buildchain, ppu-gdb/spu-gdb debuggers, IBM Full System Simulator, and Cell IDE
  • Understanding the Cell’s central processing core, the PowerPC Processor Unit (PPU): structure, programming libraries, and AltiVec instructions
  • Programming the Synergistic Processor Unit (SPU): vector processing, communication, caching, assembler coding, and more
  • Leveraging SDK vector and matrix libraries, including the Large Matrix Library, BLAS Library, FFT libraries, Multiprecision Library, and Monte Carlo API
  • Coding basic 2D graphics using the Linux frame buffer
  • Building 3D graphics with the new Gallium OpenGL library
  • Constructing 3D games with Ogre3D and packaging them using Collada digital content interchange
  • Optimizing the performance of your Cell applications
  • Developing on standard PCs and transferring code to Cell systems such as the PlayStation 3

Foreword xv

Preface xvii

Chapter 1: Introducing the Cell Processor 1

Part I: The Software Development Tools 13

Chapter 2: The Cell Software Development Kit (SDK) 15

Chapter 3: Building Applications for the Cell Processor 35

Chapter 4: Debugging and Simulating Applications 53

Chapter 5: The Cell SDK Integrated Development Environment 83

Part II: The PowerPC Processor Element (PPE) 97

Chapter 6: Introducing the PowerPC Processor Unit (PPU) 99

Chapter 7: The SPE Runtime Management Library (libspe) 125

Chapter 8: SIMD Programming on the PPU, Part 1: Vector Libraries and Functions 153

Chapter 9: SIMD Programming on the PPU, Part 2: Methods and Algorithms 195

Part III: The Synergistic Processor Element (SPE) 217

Chapter 10: Introducing the Synergistic Processor Unit (SPU) 219

Chapter 11: SIMD Programming on the SPU 239

Chapter 12: SPU Communication, Part 1: Direct Memory Access (DMA) 285

Chapter 13: SPU Communication, Part 2: Events, Signals, and Mailboxes 317

Chapter 14: Advanced SPU Topics: Overlays, Software Caching, and SPU Isolation 345

Chapter 15: SPU Assembly Language 367

Part IV: Mathematics and Computation 409

Chapter 16: Vectors and Matrices 411

Chapter 17: The Fast Fourier Transform (FFT) 439

Chapter 18: Multiprecision Processing and Monte Carlo Methods 463

Part V: Graphics and Games 489

Chapter 19: Programming the Frame Buffer: Linux and the PlayStation 3 491

Chapter 20: OpenGL on the Cell: Gallium and Mesa 503

Chapter 21: Building Games with Ogre3D 529

Chapter 22: Packaging Graphics with COLLADA 559

Epilogue 581

Part VI: Appendices 583

Appendix A: Understanding ELF Files 585

Appendix B: Updating the PS3 Add-On Packages and Installing a New Linux Kernel 609

Appendix C: The Accelerated Library Framework (ALF) 617

Appendix D: SPU Instruction Set Reference 649

Appendix E: A Brief Introduction to Tcl 661

Index 669

Read More Show Less

Product Details

  • ISBN-13: 9780136008866
  • Publisher: Prentice Hall
  • Publication date: 10/28/2008
  • Edition description: New Edition
  • Pages: 721
  • Product dimensions: 7.20 (w) x 9.00 (h) x 1.60 (d)

Meet the Author

Matthew Scarpino lives in the San Francisco Bay area and develops software to interface embedded devices. He holds a masters in electrical engineering and has spent more than a decade in software development. His experience encompasses computing clusters, digital signal processors, microcontrollers, and field programmable gate arrays, but he loves programming the Cell processor most of all.

Read More Show Less

Read an Excerpt

ForewordForeword

The Cell Broadband Engine Architecture (Cell/B.E.) defines a new processor structure that extends the 64-bit Power Architecture technology and incorporates unique features that support critical real-time response of highly parallel, computationally intensive code. The first implementation of the architecture has resulted in a single device of heterogeneous processors mixed with simultaneous multithreading and special computational "accelerator" cores for more performance and efficiency gains. The processor comprises a vector Power Processor Element (PPE) with two levels of cache and eight independent Synergistic Processor Elements (SPEs), each with its own multilevel storage organization. In addition to processor-level parallelism, each processing element has Single Instruction Multiple Data (SIMD) units that can process from 4 words up to 16 characters per processing cycle, and globally consistent Direct Memory Access (DMA) engines that provide a rich set of DMA commands for seamless communication between all Cell/B.E. processing elements. The dual thread, 64-bit PPE controls and runs the operating system, manages system resources, and coordinates work sent to the SPEs, while the SPEs are dedicated only to the compute thread and its data.

Although the Cell/B.E. processor was initially intended for application in game consoles and media-rich consumer-electronics devices, a much broader use of the architecture is starting to emerge to handle streaming workloads found in today's applications across such industry segments as health care, life sciences, petroleum exploration, financial services, digital media, electronics, government, andeducation. To fully harness the power of Cell/B.E., developers need to use different programming models and to write multithreaded code that ensures the SPEs are well utilized and work is equally off-loaded across the SPEs.

This book is the first commercially published book written for those who want to program the Cell/B.E. It provides comprehensive learning material for developing multithreaded code that allows an application structured for parallelism to execute much more efficiently on those SPE accelerators. It starts with the IBM Software Development Kit (SDK) for Multicore Acceleration Version 3.0, which consists of run-time tools (such as the Linux kernel), development tools, GNU toolchain, software libraries and frameworks, performance tools, a system simulator, sample source codes and benchmarks—all of which fully support the capabilities of the Cell/B.E. The book discusses the device's architecture, including the PPE vector processing unit, SPE SIMD capabilities, and DMA communication mechanisms. The book also details SPU programming and exploitation of SPU storage by software module overlay and software managed cache. It includes an in-depth section on libraries, ranging from the basic vector and matrix libraries to BLAS, MASS, FFT, and Monte Carlo libraries.

Multicore processing is the future trend of the computing industry. Cell/B.E. offers a general-purpose, programmable multicore processor available to developers through high level programming languages such C/C++ and Fortran. However, in order to fully leverage the processor parallel capabilities, the application needs to be properly designed in both code and data. This book describes the processor in enough details and contains many practical code examples to get you off the ground to write your first Cell/B.E. application. Such experience should give you a competitive edge when working with other multicore systems, or as a foundation to work on Cell/B.E. homogeneous and/or hybrid clusters that are being deployed to support a wide range of high performance computing workloads.

Duc J. Vianney, Ph. D.
Technical Solution Architect1
Education Lead—Cell/QUASAR Ecosystem & Solutions Enablement
IBM Systems & Technology Group, Industry Systems Division

***

1What is the IBM definition of "Technical Solution Architect"? "This role assumes overall technical responsibility for the success of solution construction, implementation, and system integration in a technology, industry, or business specialty. They deliver new and complex high quality solutions to clients in response to varying business requirements. They utilize in-depth knowledge of leading-edge products and technology in conjunction with industry and business skills to influence clients."

***

© Copyright Pearson Education. All rights reserved.

Read More Show Less

Table of Contents

Foreword xv

Preface xvii

Chapter 1: Introducing the Cell Processor 1

Part I: The Software Development Tools 13

Chapter 2: The Cell Software Development Kit (SDK) 15

Chapter 3: Building Applications for the Cell Processor 35

Chapter 4: Debugging and Simulating Applications 53

Chapter 5: The Cell SDK Integrated Development Environment 83

Part II: The PowerPC Processor Element (PPE) 97

Chapter 6: Introducing the PowerPC Processor Unit (PPU) 99

Chapter 7: The SPE Runtime Management Library (libspe) 125

Chapter 8: SIMD Programming on the PPU, Part 1: Vector Libraries and Functions 153

Chapter 9: SIMD Programming on the PPU, Part 2: Methods and Algorithms 195

Part III: The Synergistic Processor Element (SPE) 217

Chapter 10: Introducing the Synergistic Processor Unit (SPU) 219

Chapter 11: SIMD Programming on the SPU 239

Chapter 12: SPU Communication, Part 1: Direct Memory Access (DMA) 285

Chapter 13: SPU Communication, Part 2: Events, Signals, and Mailboxes 317

Chapter 14: Advanced SPU Topics: Overlays, Software Caching, and SPU Isolation 345

Chapter 15: SPU Assembly Language 367

Part IV: Mathematics and Computation 409

Chapter 16: Vectors and Matrices 411

Chapter 17: The Fast Fourier Transform (FFT) 439

Chapter 18: Multiprecision Processing and Monte Carlo Methods 463

Part V: Graphics and Games 489

Chapter 19: Programming the Frame Buffer: Linux and the PlayStation 3 491

Chapter 20: OpenGL on the Cell: Gallium and Mesa 503

Chapter 21: Building Games with Ogre3D 529

Chapter 22: Packaging Graphics with COLLADA 559

Epilogue 581

Part VI: Appendices 583

Appendix A: Understanding ELF Files 585

Appendix B: Updating the PS3 Add-On Packages and Installing a New Linux Kernel 609

Appendix C: The Accelerated Library Framework (ALF) 617

Appendix D: SPU Instruction Set Reference 649

Appendix E: A Brief Introduction to Tcl 661

Index 669

Read More Show Less

Customer Reviews

Average Rating 4
( 1 )
Rating Distribution

5 Star

(0)

4 Star

(1)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Posted December 26, 2008

    more from this reviewer

    powerful libraries

    IBM's Cell is a very impressive processor and Scarpino's text gives tons of practical information about programming it. But there is some material that's a little outdated. In chapter 6, it speaks about Apple's Power Mac using IBM's PowerPC 970 in 2002. However, for the past few years, Apple has gone with the Intel processor family. This book came out in 2008 and perhaps the mention of the Power Mac is slightly dated. <BR/><BR/>A strong point about Cell is its SIMD functionality. When appropriate, it lets you garner vast performance by crunching parallel data streams. For certain matrix operations, including a lot of image processing, SIMD is valid, and if these are your main applications, it is well worth taking a close look at using Cell. <BR/><BR/>What IBM has also done with Cell is emplace sophisticated libraries that can be accessed at the C/C++ level. The crucial point is that you are not restricted to coding in assembler. The code examples are given in C/C++ to drive home this point. The libraries include a lot of matrix algebra that, as mentioned above, lets you use SIMD. So the standard matrix operations are well covered. And there is even a special case of handling 4x4 floating point matrices. Used for 3 dimensional contexts. More generally, BLAS is also available, which helps if you have legacy packages that use it.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)