This chapter provides an overall view of the Cell Programming Tutorial.
This tutorial is intended for use by programmers with the knowledge described in Section 0.1.2.
Oriented in a practical way, with working examples and lessons, this tutorial helps programmers develop programs that can get the most out of the Cell’s distinctive computational capability. It will benefit those people who are:
(1) Interested in programming for the Cell
(2) Planning to migrate existing programs to the Cell
This tutorial focuses on the unique aspects of Cell programming. The basics of programming are outside the scope of this document. Readers should be familiar with:
(1) C-language programming
(2) Basic concepts of parallel programming
(3) Program development procedures on Linux
Some program development procedures will be explained if they are unique to the Cell. Again, however, general information, such as the use of editors, is not included. For details of C language and Linux commands, refer to their own manuals and treatises.
Each chapter of this tutorial has a specific learning theme to make it easy to acquire the necessary knowledge and programming techniques. For first-time learners, we recommend starting with Chapter 1 and continuing in the order presented to better understand the subject.
This tutorial is composed of 4 chapters.
Chapter 1 Basics of Cell Architecture
Describes the architecture of the Cell. The reader can learn about the unique features of both the hardware and software utilized in the Cell.
Chapter 2 Basics of SIMD Programming
Focuses on SIMD operations which enable processing of multiple data with a single instruction. The reader can learn the basics of this concurrent processing method, as well as the SIMD processing architecture on the Cell.
Chapter 3 Basics of SPE Programming
Explains programming using the Cell-unique processor cores called SPEs. The reader can learn how to execute programs on the SPEs and how to decomposite tasks to multiple SPEs.
Chapter 4 Advanced Cell Programming
Presents information on advanced Cell programming. The reader can learn techniques to improve performance. Useful tips on Cell programming that have not been discussed in previous chapters are also included.
This tutorial is centered on the fundamentals of Cell programming. It provides direct links to related websites when additional information is considered necessary and useful.
From Chapter 2 on, this tutorial focuses on developing programming skills. Each chapter covers a specific theme and is divided into sections to explain the theme using sample programs. At the end of each chapter, practice questions are provided for review of the content learned.
The following software documentation conventions are used in this tutorial.
(1) Program code for PPE
#include <stdio.h>
int main(int argc, char **argv) { return 0; } |
(2) Program code for SPE
#include <stdio.h>
int main(unsigned long long spe_id, unsigned long long arg) { retrun 0; } |
(3) Shell command execution
$ spu-gcc spe_hello.c -o spe_hello.elf
|
(1) Shell command
The spu_gcc command is used to compile SPE programs. |
(2) Function
The function spu_open_image() is used to read SPE program files. |
(3) Type/variable
The type __vector signed int can store four unsigned integers. The variable vc is a sum of variables va and vb. |