Skip to content

Commit 38bae4d

Browse files
authored
Update src/stdlib_linalg_pinv.fypp
1 parent 3d10d39 commit 38bae4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/stdlib_linalg_pinv.fypp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ submodule(stdlib_linalg) stdlib_linalg_pseudoinverse
7272
! Get pseudo-inverse: A_pinv = V * (diag(1/s) * U^H) = V * (U * diag(1/s))^H
7373

7474
! 1) compute (U * diag(1/s)) in-place
75-
forall (i=1:m,j=1:k) u(i,j) = s(j)*u(i,j)
75+
do concurrent (i=1:m,j=1:k); u(i,j) = s(j)*u(i,j); end do
7676

7777
! 2) commutate matmul: A_pinv = V^H * (U * diag(1/s))^H = ((U * diag(1/s)) * V^H)^H.
7878
! This avoids one matrix transpose

0 commit comments

Comments
 (0)