Skip to main content

Section 2 What will I learn in this course?

Computers are now essential in everyday life. Incorrect and/or slow programs lead to frustration in the best case and disaster in the worst. Thus, how to construct correct programs that can attain high performance is a skill that all who program computers must master.

In this course, we teach “goal-oriented programming” the way Edsger Dijkstra intended: You will learn how to derive programs hand-in-hand with their proofs of correctness. Matrix computations (linear algebra) is the domain from which we draw examples. Typically, we end up with a family of algorithms (programs) all of which compute a given operation. From this family we can then pick the algorithm that has desirable properties. For example, one algorithm may be easier to parallelize than another algorithm or it may inherently be able to attain better performance on a given architecture. You will then learn techniques for mapping the appropriate algorithms to computer architectures so that they can attain high performance.

Subsection 2.1 Prerequisites

You need to have taken a course on linear algebra. You need to have prior experience with basic proof techniques and predicate logic as taught in CS311 or a discrete mathematics class. Major programming assignments will be in the C programming language. You need to either know rudimentary C, or be able to learn it quickly.

Subsection 2.2 Text/Materials

This class is based on materials developed by Prof. Robert van de Geijn, Dr. Maggie Myers, and Dr. Devangi N. Parikh. You can access these materials from ULAFF.

You need to install Matlab on your computer. UT has a site license. Instructions on how to access the license will be provided.

Subsection 2.3 Learning Objectives

By the end of the semester you should be able to:

  • Prove that simple code segments of your code are correct.

  • Derive your code to be correct.

  • Derive a family of algorithms for a given linear algebra operation.

  • Compare/contrast/analyze the performance of the members of a family of algorithms and reason which algorithm will perform better.

  • Understand how the implementation of your code affects the performance of the code.

  • Transform your implementation such that it takes advantage of the various architecture features available.

  • Translate your code so that you can use vector instructions.

  • Block code for cache hierarchy.

  • Parallelize (not paralyze) your code.

  • Calculate the peak performance of your machine.

  • Typeset in LaTeX.

  • Code in C, use makefiles to compile code, and use pointer arithmetic for computing the addresses of the arrays.