Day2-15_DevelopingCodeforCell-PortingTips&Techniques-SDK30

Day2-15_DevelopingCodeforCell-PortingTips&Techniques-SDK30

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

View Full Document Right Arrow Icon
Cell Programming Workshop 3/2/2008 © 2007 IBM Corporation 1 Cell Programming Workshop Cell/Quasar Ecosystem & Solutions Enablement
Background image of page 1

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

View Full DocumentRight Arrow Icon
© 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
Background image of page 2
© 2007 IBM Corporation Cell Programming Workshop 3/2/2008 3 Course Agenda ! Major steps in code porting ! Code samples ! Code details
Background image of page 3

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

View Full DocumentRight Arrow Icon
© 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
Background image of page 4
© 2007 IBM Corporation Cell Programming Workshop 3/2/2008 5 Code Samples
Background image of page 5

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

View Full DocumentRight Arrow Icon
© 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.
Background image of page 6
© 2007 IBM Corporation Cell Programming Workshop 3/2/2008 7 What’s in the code directory? / opt/cell_class/Hands-on-30/polynomial-libspe2
Background image of page 7

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

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/03/2011 for the course CDA 6938 taught by Professor Zou,c during the Spring '08 term at University of Central Florida.

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 Right Arrow Icon
Ask a homework question - tutors are online