In-Class


Download this repository for today's activity

Automatic Vectorizer
We looked at some examples in class of what kind of code can be vectorized or not. The clang compiler can actually do a pretty good job of telling us if it can 'automatically' transform the code to run in parallel. For this exercise, we will run some sample code through the loop vectorizer in clang. It will provide us with a diagnostic for whether the code can, or cannot be transformed to paralle code.

OpenMP
OpemMP is a specification for parallel programming. OpemMP is yet another way to automatically parallelize our code. OpenMP operates by splitting work into different tasks that can execute on different cores. When the work is finished, a final result is computed.

OpenCL
OpenMP is operating on several cores. In today we learned about the GPU which has ALUs to execute tasks on. If we want to start taking advantage of the GPU, we can use OpenCL. An introduction to OpenCL is provided here: First OpenCL Program


Grading


Note that in-class activities are part of your participation grade, and participating will help you perform well on your assignments. You do not have to formally submit anything.