Basic Linear Algebra Subprograms - BLAS 21
for k=
C( , )=C( , )+v( )*A( , );
end
end
2. Assume A is also an upper triangular matrix. Modify (1.20) to
obtain an algorithm that computes C = A ×B exploiting the special
structures of A and B. Give your answer by filling in the missing spaces
in the following MATLAB program that gives the matrix C column-wise:
function C=MultUpperUpper(A,B)
C=zeros(n,n);
for j=1:n
v=B( ,j);
for k=
C( , )=C( , )+v( )*A( , );
end
end
Give the number of flops needed to execute this algorithm.
Exercise 1.10
Let A and B be square matrices (both stored column-wise) in R
n×n
with B
a Lower Triangular matrix. Consider the formula that gives C = A × B:
C(:, j) = Σ
n
k=1
B(k, j) × A(:, k), j = 1, ..., n (1.21)
1. Use and modify (1.21) to obtain an algorithm ...