@@ -46,6 +46,7 @@ module stdlib_linalg_lapack_aux
4646 public :: handle_gesv_info
4747 public :: handle_gees_info
4848 public :: handle_geqrf_info
49+ public :: handle_geqp3_info
4950 public :: handle_orgqr_info
5051 public :: handle_gelsd_info
5152 public :: handle_geev_info
@@ -1462,6 +1463,27 @@ module stdlib_linalg_lapack_aux
14621463
14631464 end subroutine handle_geqrf_info
14641465
1466+ elemental subroutine handle_geqp3_info(this, info, m, n, lwork, err)
1467+ character(len=*), intent(in) :: this
1468+ integer(ilp), intent(in) :: info, m, n, lwork
1469+ type(linalg_state_type), intent(out) :: err
1470+ ! Process output
1471+ select case (info)
1472+ case(0)
1473+ ! Success
1474+ case(-1)
1475+ err = linalg_state_type(this, LINALG_VALUE_ERROR, 'invalid matrix size m=', m)
1476+ case(-2)
1477+ err = linalg_state_type(this, LINALG_VALUE_ERROR, 'invalid matrix size n=', n)
1478+ case(-4)
1479+ err = linalg_state_type(this, LINALG_VALUE_ERROR, 'invalid matrix size a=', [m, n])
1480+ case(-7)
1481+ err = linalg_state_type(this, LINALG_VALUE_ERROR, 'invalid input for lwork=', lwork)
1482+ case default
1483+ err = linalg_state_type(this, LINALG_VALUE_ERROR, 'catastrophic error')
1484+ end select
1485+ end subroutine handle_geqp3_info
1486+
14651487 elemental subroutine handle_orgqr_info(this,info,m,n,k,lwork,err)
14661488 character(len=*), intent(in) :: this
14671489 integer(ilp), intent(in) :: info,m,n,k,lwork
0 commit comments