{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Day2-15_DevelopingCodeforCell-PortingTips&amp;Techniques-SDK30

# Day2-15_DevelopingCodeforCell-PortingTips&Techniques-SDK30

This preview shows pages 1–8. Sign up to view the full content.

Cell Programming Workshop 3/2/2008 © 2007 IBM Corporation 1 Cell Programming Workshop Cell/Quasar Ecosystem & Solutions Enablement

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
© 2007 IBM Corporation Cell Programming Workshop 3/2/2008 2 Course Objectives ! To familiar with some common tips and techniques used in code porting Trademarks - Cell Broadband Engine and Cell Broadband Engine Architecture are trademarks of Sony Computer Entertainment, Inc. References ! Gordon Fossum, Quasar Design Center
© 2007 IBM Corporation Cell Programming Workshop 3/2/2008 3 Course Agenda ! Major steps in code porting ! Code samples ! Code details

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
© 2007 IBM Corporation Cell Programming Workshop 3/2/2008 4 Major Steps in Porting to Cell Broadband Engine Get code running on PPU (easy port) Deal with memory alignment concerns Identify candidate code for porting to SPUs Parallelize problem for SPE utilization Establish communication methodology Port scalar code to SPUs Optimize data transfers (double-buffering) SIMDize code and unroll loops
© 2007 IBM Corporation Cell Programming Workshop 3/2/2008 5 Code Samples

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
© 2007 IBM Corporation Cell Programming Workshop 3/2/2008 6 What is the problem? ! Goals To show multiply-add operations, Demonstrate how to handle arrays of different types and sizes, Why it's useful to use "select" operations instead of if-then-else, whenever possible. ! Problem statement Given coefficients for two polynomials, A(x) and B(x) and a big list of input x values, accompanied by a big list of flags to indicate which polynomial is to be used for each input. For convenience, we'll assume that the size of these big lists is a multiple of 16, as that will simplify some of the computations. The coefficients are in order of decreasing exponent, so for example, if the degree of A(x) is 3, and A(x) is 5.0 * x^3 + 2.0 * x^2 + 8.0 * x + 12.0, then the array A_coeff would contain {5.0, 2.0, 8.0, 12.0}. The output you're asked to produce is a list of computed polynomial values, as well as the sum of the A computations, the sum of the B computations, and the counts of how many of each there were.
© 2007 IBM Corporation Cell Programming Workshop 3/2/2008 7 What’s in the code directory? / opt/cell_class/Hands-on-30/polynomial-libspe2

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 24

Day2-15_DevelopingCodeforCell-PortingTips&Techniques-SDK30

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online