Clear Filters
Clear Filters

Modifying an algorithm to perform BLAS1 operations

2 views (last 30 days)
I am asked to modify the following algorithm (LU decomposition of A) to perform BLAS1 operations instead of scalar operations. How can this be done? How will the algorithm be modified?
function [L,U] = ColLU(A)
n = size(A);
for k = 1:n-1
piv = A(k, k);
for i = k+1:n
A(i, k) = A(i, k)/piv;
end
for j = k+1:n
for i = k+1:n
A(i,j) = A(i,j)- A(i, k) * A(k, j);
end
end
end
U = triu(A)
L = tril(A, -1) + eye(n)

Answers (0)

Categories

Find more on Fluid Dynamics in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!