Skip to content

Commit 98f1708

Browse files
committed
Function interface for pivoting QR.
1 parent 9e4c230 commit 98f1708

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/stdlib_linalg.fypp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,23 @@ module stdlib_linalg
614614
!> [optional] state return flag. On error if not requested, the code will stop
615615
type(linalg_state_type), optional, intent(out) :: err
616616
end subroutine stdlib_linalg_${ri}$_qr
617+
618+
pure module subroutine stdlib_linalg_${ri}$_pivoting_qr(a, q, r, pivots, overwrite_a, storage, err)
619+
!> Input matrix a[m, n]
620+
${rt}$, intent(inout), target :: a(:, :)
621+
!> Orthogonal matrix Q ([m, m] or [m, k] if reduced)
622+
${rt}$, intent(out), contiguous, target :: q(:, :)
623+
!> Upper triangular matrix R ([m, n] or [k, n] if reduced)
624+
${rt}$, intent(out), contiguous, target :: r(:, :)
625+
!> Pivots.
626+
integer(ilp), intent(out) :: pivots(:)
627+
!> [optional] Can A data be overwritten and destroyed?
628+
logical(lk), optional, intent(in) :: overwrite_a
629+
!> [optional] Provide pre-allocated workspace, size to be checked with pivoting_qr_space.
630+
${rt}$, intent(out), optional, target :: storage(:)
631+
!> [optional] state return flag. On error if not requested, the code will stop.
632+
type(linalg_state_type), optional, intent(out) :: err
633+
end subroutine stdlib_linalg_${ri}$_pivoting_qr
617634
#:endfor
618635
end interface qr
619636

0 commit comments

Comments
 (0)