This is not the current version of the class.

Storage Supplement 1: Matrices

Overview

In this lecture, we play with the processor cache.

Full lecture notes on storageTextbook readings

Processor cache

accessor.cc

Question

list-inserter.cc

Question

Machine learning

Machine learning Matrix multiplication

Pictorial matrix multiplication

Matrix multiplication dimensions

Matrix multiplication cell computation

Matrix storage

Implementing matrix multiplication

    // clear `c`
    for (size_t i = 0; i != c.size(); ++i) {
        for (size_t j = 0; j != c.size(); ++j) {
            c.at(i, j) = 0;
        }
    }

    // compute product and update `c`
    for (size_t i = 0; i != c.size(); ++i) {
        for (size_t j = 0; j != c.size(); ++j) {
            for (size_t k = 0; k != c.size(); ++k) {
                c.at(i, j) += a.at(i, k) * b.at(k, j);
            }
        }
    }

Question

Forking, piping, and stdio