Modifying an algorithm to perform BLAS1 operations
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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)
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Assembly finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!