next up previous contents
Next: BLAS3 Up: Basic Linear Algebra Subroutines Previous: Basic Linear Algebra Subroutines

BLAS2

As a typical BLAS2 operation, we here consider vector-matrix multiplication (the example from lecture),

  equation230

To assess the importance of the ordering of the loops, write the following routines (same prototype as mult()), uncomment their calls through timer in the main program in ``timer.c'', and run the resulting program.

  1. vecmat1(): code the multiplication (2) using the naïve sequence of loops (first i, then j)
  2. vecmat2(): code the multiplication (2) reversing the sequence of the loops


Tomas Arias
Mon Apr 2 13:24:52 EDT 2001