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),

  equation33

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'' from Homework Assignment # 6, comment out preceding calls to timer, and run the resulting program.

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


Tomas Arias
Sun Mar 31 20:03:23 EST 2002