Next | Prev | Up | Top | Contents | Index
Power C
IRIS Power C allows your program to make efficient use of Silicon Graphics multiprocessor platforms by generating code segments that execute concurrently. Power C consists of the standard C compiler and a preprocessor that automatically analyzes sequential code to determine where loops can run in parallel. The preprocessor generates a modified version of the source code with multiprocessing directives added. The C compiler, when it compiles the modified source code, interprets the directives and produces object code that uses multiple processors. An advantage of Power C is that you can use it to recompile existing serial C programs so that they run efficiently on multiprocessor computers without hand recoding.
The IRIS Power C Analyzer (PCA) is the C code optimization preprocessor that detects potential parallelism in C code. It also performs other optimizing tasks. The Power C Analyzer can
- direct C code to run in parallel
- determine data dependencies which might prevent code from running concurrently
- distribute well-behaved loops and certain other code across multiprocessors
- optimize source code
You can use PCA either as a standalone tool or as a phase of the C compiler. You can also enter the directives that produce concurrent code directly into your program rather than using the PCA. Figure 3-1 illustrates the role of the PCA in producing an executable module that can utilize more than one processor on a multiprocessor system.
![](IX5FIRIXX5FProg-34-image-5.gif)
Figure 3-1 : Using Power C to Produce a Parallelized Program
Power C can produce a listing containing information about the loops that it parallelizes and those that it cannot. Using this information, you may be able to modify your source so that a subsequent Power C compilation produces more efficient code. You can select a PCA compilation of your source code by specifying the pca compiler driver option when you compile your program.
Next | Prev | Up | Top | Contents | Index