Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introdution to SSE or How to put your algorithms on steroids! Christian Kerl 11.05.20121.

Similar presentations


Presentation on theme: "Introdution to SSE or How to put your algorithms on steroids! Christian Kerl 11.05.20121."— Presentation transcript:

1 Introdution to SSE or How to put your algorithms on steroids! Christian Kerl 11.05.20121

2 Outline What is SSE? Basic Operations Example: Image Pyramid Summary Further Resources 11.05.20122

3 What is SSE? SSE = Streaming SIMD Extensions SIMD = Single Instruction, Multiple Data Developed by Intel in 1999 Further extensions SSE2, SSE3 (SSSE3, SSE4) Allows parallel processing of multiple integer or floating point values 11.05.20123

4 What is SSE? 8 XMM registers (special CPU registers, 16 on 64 bit) Each XMM register is 128 bits wide – 2 int64 / doubles – 4 int32 / floats – 8 int16 – 16 int8 11.05.20124

5 What is SSE? Special instructions working on XMM registers – SSE70,SSE2144,SSE313instructions Different instructions for each data type Usable in – Assembly – C/C++ through SSE “intrinsics” 11.05.20125

6 Basic Operations Load / Store Arithmetic Comparison / Logical Type conversion … 11.05.20126

7 Basic Operations Requirements on memory layout for loading and storing data Memory addresses (pointers) need to be 16 byte aligned! 11.05.20127

8 Example: Image Pyramid Performance on 2560x1920 image – Standard C++ version: 7.4 ms – SSE optimized version: 1.62 ms => ≈ 4.5x speedup 11.05.20128

9 Summary SSE available on all modern x86 CPUs Good for sequential data processing Provides considerable speedups (2-4x) SSE intrinsic code harder to program and read => Use wrapper library, e.g. EasySSE, ut-sse – Need to evaluate / extend / write one 11.05.20129

10 Further Resources Tutorials: – http://supercomputingblog.com/optimization/getting-started-with-sse- programming/ http://supercomputingblog.com/optimization/getting-started-with-sse- programming/ – http://www.codeproject.com/Articles/4522/Introduction-to-SSE- Programming http://www.codeproject.com/Articles/4522/Introduction-to-SSE- Programming – http://sci.tuomastonteri.fi/programming/sse http://sci.tuomastonteri.fi/programming/sse MSDN: good reference manual for intrinsics – http://msdn.microsoft.com/de-de/library/y0dh78ez http://msdn.microsoft.com/de-de/library/y0dh78ez Wrapper Libraries: – http://sourceforge.net/projects/easysse/ http://sourceforge.net/projects/easysse/ – http://code.google.com/p/ut-sse/ http://code.google.com/p/ut-sse/ 11.05.201210


Download ppt "Introdution to SSE or How to put your algorithms on steroids! Christian Kerl 11.05.20121."

Similar presentations


Ads by Google