LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ slaorhr_col_getrfnp()

subroutine slaorhr_col_getrfnp ( integer m,
integer n,
real, dimension( lda, * ) a,
integer lda,
real, dimension( * ) d,
integer info )

SLAORHR_COL_GETRFNP

Download SLAORHR_COL_GETRFNP + dependencies [TGZ] [ZIP] [TXT]

Purpose:
!>
!> SLAORHR_COL_GETRFNP computes the modified LU factorization without
!> pivoting of a real general M-by-N matrix A. The factorization has
!> the form:
!>
!>     A - S = L * U,
!>
!> where:
!>    S is a m-by-n diagonal sign matrix with the diagonal D, so that
!>    D(i) = S(i,i), 1 <= i <= min(M,N). The diagonal D is constructed
!>    as D(i)=-SIGN(A(i,i)), where A(i,i) is the value after performing
!>    i-1 steps of Gaussian elimination. This means that the diagonal
!>    element at each step of  Gaussian elimination is
!>    at least one in absolute value (so that division-by-zero not
!>    not possible during the division by the diagonal element);
!>
!>    L is a M-by-N lower triangular matrix with unit diagonal elements
!>    (lower trapezoidal if M > N);
!>
!>    and U is a M-by-N upper triangular matrix
!>    (upper trapezoidal if M < N).
!>
!> This routine is an auxiliary routine used in the Householder
!> reconstruction routine SORHR_COL. In SORHR_COL, this routine is
!> applied to an M-by-N matrix A with orthonormal columns, where each
!> element is bounded by one in absolute value. With the choice of
!> the matrix S above, one can show that the diagonal element at each
!> step of Gaussian elimination is the largest (in absolute value) in
!> the column on or below the diagonal, so that no pivoting is required
!> for numerical stability [1].
!>
!> For more details on the Householder reconstruction algorithm,
!> including the modified LU factorization, see [1].
!>
!> This is the blocked right-looking version of the algorithm,
!> calling Level 3 BLAS to update the submatrix. To factorize a block,
!> this routine calls the recursive routine SLAORHR_COL_GETRFNP2.
!>
!> [1] ,
!>     G. Ballard, J. Demmel, L. Grigori, M. Jacquelin, H.D. Nguyen,
!>     E. Solomonik, J. Parallel Distrib. Comput.,
!>     vol. 85, pp. 3-31, 2015.
!> 
Parameters
[in]M
!>          M is INTEGER
!>          The number of rows of the matrix A.  M >= 0.
!> 
[in]N
!>          N is INTEGER
!>          The number of columns of the matrix A.  N >= 0.
!> 
[in,out]A
!>          A is REAL array, dimension (LDA,N)
!>          On entry, the M-by-N matrix to be factored.
!>          On exit, the factors L and U from the factorization
!>          A-S=L*U; the unit diagonal elements of L are not stored.
!> 
[in]LDA
!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!> 
[out]D
!>          D is REAL array, dimension min(M,N)
!>          The diagonal elements of the diagonal M-by-N sign matrix S,
!>          D(i) = S(i,i), where 1 <= i <= min(M,N). The elements can
!>          be only plus or minus one.
!> 
[out]INFO
!>          INFO is INTEGER
!>          = 0:  successful exit
!>          < 0:  if INFO = -i, the i-th argument had an illegal value
!> 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Contributors:
!>
!> November 2019, Igor Kozachenko,
!>                Computer Science Division,
!>                University of California, Berkeley
!>
!> 

Definition at line 143 of file slaorhr_col_getrfnp.f.

144 IMPLICIT NONE
145*
146* -- LAPACK computational routine --
147* -- LAPACK is a software package provided by Univ. of Tennessee, --
148* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
149*
150* .. Scalar Arguments ..
151 INTEGER INFO, LDA, M, N
152* ..
153* .. Array Arguments ..
154 REAL A( LDA, * ), D( * )
155* ..
156*
157* =====================================================================
158*
159* .. Parameters ..
160 REAL ONE
161 parameter( one = 1.0e+0 )
162* ..
163* .. Local Scalars ..
164 INTEGER IINFO, J, JB, NB
165* ..
166* .. External Subroutines ..
168 $ xerbla
169* ..
170* .. External Functions ..
171 INTEGER ILAENV
172 EXTERNAL ilaenv
173* ..
174* .. Intrinsic Functions ..
175 INTRINSIC max, min
176* ..
177* .. Executable Statements ..
178*
179* Test the input parameters.
180*
181 info = 0
182 IF( m.LT.0 ) THEN
183 info = -1
184 ELSE IF( n.LT.0 ) THEN
185 info = -2
186 ELSE IF( lda.LT.max( 1, m ) ) THEN
187 info = -4
188 END IF
189 IF( info.NE.0 ) THEN
190 CALL xerbla( 'SLAORHR_COL_GETRFNP', -info )
191 RETURN
192 END IF
193*
194* Quick return if possible
195*
196 IF( min( m, n ).EQ.0 )
197 $ RETURN
198*
199* Determine the block size for this environment.
200*
201
202 nb = ilaenv( 1, 'SLAORHR_COL_GETRFNP', ' ', m, n, -1, -1 )
203
204 IF( nb.LE.1 .OR. nb.GE.min( m, n ) ) THEN
205*
206* Use unblocked code.
207*
208 CALL slaorhr_col_getrfnp2( m, n, a, lda, d, info )
209 ELSE
210*
211* Use blocked code.
212*
213 DO j = 1, min( m, n ), nb
214 jb = min( min( m, n )-j+1, nb )
215*
216* Factor diagonal and subdiagonal blocks.
217*
218 CALL slaorhr_col_getrfnp2( m-j+1, jb, a( j, j ), lda,
219 $ d( j ), iinfo )
220*
221 IF( j+jb.LE.n ) THEN
222*
223* Compute block row of U.
224*
225 CALL strsm( 'Left', 'Lower', 'No transpose', 'Unit',
226 $ jb,
227 $ n-j-jb+1, one, a( j, j ), lda, a( j, j+jb ),
228 $ lda )
229 IF( j+jb.LE.m ) THEN
230*
231* Update trailing submatrix.
232*
233 CALL sgemm( 'No transpose', 'No transpose',
234 $ m-j-jb+1,
235 $ n-j-jb+1, jb, -one, a( j+jb, j ), lda,
236 $ a( j, j+jb ), lda, one, a( j+jb, j+jb ),
237 $ lda )
238 END IF
239 END IF
240 END DO
241 END IF
242 RETURN
243*
244* End of SLAORHR_COL_GETRFNP
245*
subroutine xerbla(srname, info)
Definition cblat2.f:3285
subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
SGEMM
Definition sgemm.f:188
integer function ilaenv(ispec, name, opts, n1, n2, n3, n4)
ILAENV
Definition ilaenv.f:160
recursive subroutine slaorhr_col_getrfnp2(m, n, a, lda, d, info)
SLAORHR_COL_GETRFNP2
subroutine strsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
STRSM
Definition strsm.f:181
Here is the call graph for this function:
Here is the caller graph for this function: