Effacer les filtres
Effacer les filtres

Modifying an algorithm to perform BLAS1 operations

1 vue (au cours des 30 derniers jours)
Pascale Bou Chahine
Pascale Bou Chahine le 18 Oct 2020
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)

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by