Difference between revisions of "SPO600 Vectorization Lab"

From CDOT Wiki
Jump to: navigation, search
(Created page with 'Category:SPO600 Labs {{Admon/lab|Purpose of this Lab|This lab is designed to explore single instruction/multiple data (SIMD) vectorization, and the auto-vectorization capabi…')
 
Line 1: Line 1:
 
[[Category:SPO600 Labs]]
 
[[Category:SPO600 Labs]]
 
+
{{Chris Tyler Draft}}
 
{{Admon/lab|Purpose of this Lab|This lab is designed to explore single instruction/multiple data (SIMD) vectorization, and the auto-vectorization capabilities of the GCC compiler.}}
 
{{Admon/lab|Purpose of this Lab|This lab is designed to explore single instruction/multiple data (SIMD) vectorization, and the auto-vectorization capabilities of the GCC compiler.}}
  

Revision as of 17:32, 8 February 2016

Important.png
This is a draft only!
It is still under construction and content may change. Do not rely on this information.
Lab icon.png
Purpose of this Lab
This lab is designed to explore single instruction/multiple data (SIMD) vectorization, and the auto-vectorization capabilities of the GCC compiler.

Lab 6

  1. Write the shortest C program that can be vectorized by GCC.
  2. Compile this program on aarchie.
  3. Annotate the emitted code (i.e., obtain a dissassembly via objdump -d and add comments to the instructions in <main> explaining what the code does).
  4. Write a blog post discussing your findings. Include:
    • The source code
    • The compiler command line used to build the code
    • Your annotated dissassembly listing
    • Your reflections on the experience and the results


Resources

  • Auto-Vectorization in GCC - Main project page for the GCC auto-vectorizer.
  • Auto-vectorization with gcc 4.7 - An excellent discussion of the capabilities and limitations of the GCC auto-vectorizer, intrinsics for providing hints to GCC, and other code pattern changes that can improve results. Note that there has been some improvement in the auto-vectorizer since this article was written. This article is strongly recommended.