Skip to content

Commit 61d9101

Browse files
committed
Fypp-template for the *geqp3 interfaces.
1 parent 99abc23 commit 61d9101

File tree

1 file changed

+17
-43
lines changed

1 file changed

+17
-43
lines changed

src/stdlib_linalg_lapack.fypp

Lines changed: 17 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3240,63 +3240,37 @@ module stdlib_linalg_lapack
32403240
!! Q is an M-by-min(M, N) orthogonal matrix
32413241
!! R is an min(M, N)-by-N upper triangular matrix;
32423242
#:for ik, it, ii in LINALG_INT_KINDS_TYPES
3243+
#:for rk, rt, ri in RC_KINDS_TYPES
32433244
#ifdef STDLIB_EXTERNAL_LAPACK${ii}$
3244-
pure subroutine sgeqp3(m, n, a, lda, jpvt, tau, work, lwork, info)
3245+
#:if rk in ["sp", "dp"]
3246+
#:if rt.startswith("real")
3247+
pure subroutine ${ri}$geqp3(m, n, a, lda, jpvt, tau, work, lwork, info)
32453248
import sp, dp, qp, ${ik}$, lk
32463249
implicit none
32473250
integer(${ik}$), intent(in) :: m, n, lda, lwork
32483251
integer(${ik}$), intent(out) :: info
32493252
integer(${ik}$), intent(inout) :: jpvt(*)
3250-
real(sp), intent(inout) :: a(lda, *)
3251-
real(sp), intent(out) :: tau(*), work(*)
3252-
end subroutine sgeqp3
3253-
3254-
pure subroutine dgeqp3(m, n, a, lda, jpvt, tau, work, lwork, info)
3255-
import sp, dp, qp, ${ik}$, lk
3256-
implicit none
3257-
integer(${ik}$), intent(in) :: m, n, lda, lwork
3258-
integer(${ik}$), intent(out) :: info
3259-
integer(${ik}$), intent(inout) :: jpvt(*)
3260-
real(dp), intent(inout) :: a(lda, *)
3261-
real(dp), intent(out) :: tau(*), work(*)
3262-
end subroutine dgeqp3
3263-
3264-
pure subroutine cgeqp3(m, n, a, lda, jpvt, tau, work, lwork, rwork, info)
3265-
import sp, dp, qp, ${ik}$, lk
3266-
implicit none
3267-
integer(${ik}$), intent(in) :: m, n, lda, lwork
3268-
integer(${ik}$), intent(out) :: info
3269-
integer(${ik}$), intent(inout) :: jpvt(*)
3270-
complex(sp), intent(inout) :: a(lda, *)
3271-
complex(sp), intent(out) :: tau(*), work(*)
3272-
real(sp), intent(out) :: rwork(*)
3273-
end subroutine cgeqp3
3274-
3275-
pure subroutine zgeqp3(m, n, a, lda, jpvt, tau, work, lwork, rwork, info)
3253+
${rt}$, intent(inout) :: a(lda, *)
3254+
${rt}$, intent(out) :: tau(*), work(*)
3255+
end subroutine ${ri}$geqp3
3256+
#:else
3257+
pure subroutine ${ri}$geqp3(m, n, a, lda, jpvt, tau, work, lwork, rwork, info)
32763258
import sp, dp, qp, ${ik}$, lk
32773259
implicit none
32783260
integer(${ik}$), intent(in) :: m, n, lda, lwork
32793261
integer(${ik}$), intent(out) :: info
32803262
integer(${ik}$), intent(inout) :: jpvt(*)
3281-
complex(dp), intent(inout) :: a(lda, *)
3282-
complex(dp), intent(out) :: tau(*), work(*)
3283-
real(dp), intent(out) :: rwork(*)
3284-
end subroutine zgeqp3
3285-
#else
3286-
module procedure stdlib${ii}$_sgeqp3
3287-
module procedure stdlib${ii}$_dgeqp3
3288-
module procedure stdlib${ii}$_cgeqp3
3289-
module procedure stdlib${ii}$_zgeqp3
3290-
#endif
3291-
#:for rk, rt, ri in REAL_KINDS_TYPES
3292-
#:if not rk in ["sp", "dp"]
3263+
${rt}$, intent(inout) :: a(lda, *)
3264+
${rt}$, intent(out) :: tau(*), work(*)
3265+
real(${rk}$), intent(out) :: rwork(*)
3266+
end subroutine ${ri}$geqp3
3267+
#:endif
3268+
#:else
32933269
module procedure stdlib${ii}$_${ri}$geqp3
32943270
#:endif
3295-
#:endfor
3296-
#:for rk, rt, ri in CMPLX_KINDS_TYPES
3297-
#:if not rk in ["sp", "dp"]
3271+
#else
32983272
module procedure stdlib${ii}$_${ri}$geqp3
3299-
#:endif
3273+
#endif
33003274
#:endfor
33013275
#:endfor
33023276
end interface geqp3

0 commit comments

Comments
 (0)