154 SUBROUTINE zunbdb6( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2,
155 $ ldq2, work, lwork, info )
163 INTEGER INCX1, INCX2, INFO, LDQ1, LDQ2, LWORK, M1, M2,
167 COMPLEX*16 Q1(ldq1,*), Q2(ldq2,*), WORK(*), X1(*), X2(*)
173 DOUBLE PRECISION ALPHASQ, REALONE, REALZERO
174 parameter ( alphasq = 0.01d0, realone = 1.0d0,
176 COMPLEX*16 NEGONE, ONE, ZERO
177 parameter ( negone = (-1.0d0,0.0d0), one = (1.0d0,0.0d0),
178 $ zero = (0.0d0,0.0d0) )
182 DOUBLE PRECISION NORMSQ1, NORMSQ2, SCL1, SCL2, SSQ1, SSQ2
197 ELSE IF( m2 .LT. 0 )
THEN
199 ELSE IF( n .LT. 0 )
THEN
201 ELSE IF( incx1 .LT. 1 )
THEN
203 ELSE IF( incx2 .LT. 1 )
THEN
205 ELSE IF( ldq1 .LT. max( 1, m1 ) )
THEN
207 ELSE IF( ldq2 .LT. max( 1, m2 ) )
THEN
209 ELSE IF( lwork .LT. n )
THEN
213 IF( info .NE. 0 )
THEN
214 CALL xerbla(
'ZUNBDB6', -info )
223 CALL zlassq( m1, x1, incx1, scl1, ssq1 )
226 CALL zlassq( m2, x2, incx2, scl2, ssq2 )
227 normsq1 = scl1**2*ssq1 + scl2**2*ssq2
234 CALL zgemv(
'C', m1, n, one, q1, ldq1, x1, incx1, zero, work,
238 CALL zgemv(
'C', m2, n, one, q2, ldq2, x2, incx2, one, work, 1 )
240 CALL zgemv(
'N', m1, n, negone, q1, ldq1, work, 1, one, x1,
242 CALL zgemv(
'N', m2, n, negone, q2, ldq2, work, 1, one, x2,
247 CALL zlassq( m1, x1, incx1, scl1, ssq1 )
250 CALL zlassq( m2, x2, incx2, scl2, ssq2 )
251 normsq2 = scl1**2*ssq1 + scl2**2*ssq2
257 IF( normsq2 .GE. alphasq*normsq1 )
THEN
261 IF( normsq2 .EQ. zero )
THEN
276 CALL zgemv(
'C', m1, n, one, q1, ldq1, x1, incx1, zero, work,
280 CALL zgemv(
'C', m2, n, one, q2, ldq2, x2, incx2, one, work, 1 )
282 CALL zgemv(
'N', m1, n, negone, q1, ldq1, work, 1, one, x1,
284 CALL zgemv(
'N', m2, n, negone, q2, ldq2, work, 1, one, x2,
289 CALL zlassq( m1, x1, incx1, scl1, ssq1 )
292 CALL zlassq( m1, x1, incx1, scl1, ssq1 )
293 normsq2 = scl1**2*ssq1 + scl2**2*ssq2
299 IF( normsq2 .LT. alphasq*normsq1 )
THEN
subroutine zgemv(TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
ZGEMV
subroutine zunbdb6(M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2, LDQ2, WORK, LWORK, INFO)
ZUNBDB6
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine zlassq(N, X, INCX, SCALE, SUMSQ)
ZLASSQ updates a sum of squares represented in scaled form.