155 SUBROUTINE zunbdb6( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1,
157 $ LDQ2, WORK, LWORK, INFO )
164 INTEGER INCX1, INCX2, INFO, LDQ1, LDQ2, LWORK, M1, M2,
168 COMPLEX*16 Q1(LDQ1,*), Q2(LDQ2,*), WORK(*), X1(*), X2(*)
174 DOUBLE PRECISION ALPHA, REALONE, REALZERO
175 PARAMETER ( ALPHA = 0.83d0, realone = 1.0d0,
177 COMPLEX*16 NEGONE, ONE, ZERO
178 PARAMETER ( NEGONE = (-1.0d0,0.0d0), one = (1.0d0,0.0d0),
179 $ zero = (0.0d0,0.0d0) )
183 DOUBLE PRECISION EPS, NORM, NORM_NEW, SCL, SSQ
186 DOUBLE PRECISION DLAMCH
201 ELSE IF( m2 .LT. 0 )
THEN
203 ELSE IF( n .LT. 0 )
THEN
205 ELSE IF( incx1 .LT. 1 )
THEN
207 ELSE IF( incx2 .LT. 1 )
THEN
209 ELSE IF( ldq1 .LT. max( 1, m1 ) )
THEN
211 ELSE IF( ldq2 .LT. max( 1, m2 ) )
THEN
213 ELSE IF( lwork .LT. n )
THEN
217 IF( info .NE. 0 )
THEN
218 CALL xerbla(
'ZUNBDB6', -info )
222 eps = dlamch(
'Precision' )
228 CALL zlassq( m1, x1, incx1, scl, ssq )
229 CALL zlassq( m2, x2, incx2, scl, ssq )
230 norm = scl * sqrt( ssq )
240 CALL zgemv(
'C', m1, n, one, q1, ldq1, x1, incx1, zero,
245 CALL zgemv(
'C', m2, n, one, q2, ldq2, x2, incx2, one, work,
248 CALL zgemv(
'N', m1, n, negone, q1, ldq1, work, 1, one, x1,
250 CALL zgemv(
'N', m2, n, negone, q2, ldq2, work, 1, one, x2,
255 CALL zlassq( m1, x1, incx1, scl, ssq )
256 CALL zlassq( m2, x2, incx2, scl, ssq )
257 norm_new = scl * sqrt(ssq)
263 IF( norm_new .GE. alpha * norm )
THEN
267 IF( norm_new .LE. n * eps * norm )
THEN
268 DO ix = 1, 1 + (m1-1)*incx1, incx1
271 DO ix = 1, 1 + (m2-1)*incx2, incx2
288 CALL zgemv(
'C', m1, n, one, q1, ldq1, x1, incx1, zero,
293 CALL zgemv(
'C', m2, n, one, q2, ldq2, x2, incx2, one, work,
296 CALL zgemv(
'N', m1, n, negone, q1, ldq1, work, 1, one, x1,
298 CALL zgemv(
'N', m2, n, negone, q2, ldq2, work, 1, one, x2,
303 CALL zlassq( m1, x1, incx1, scl, ssq )
304 CALL zlassq( m2, x2, incx2, scl, ssq )
305 norm_new = scl * sqrt(ssq)
311 IF( norm_new .LT. alpha * norm )
THEN
312 DO ix = 1, 1 + (m1-1)*incx1, incx1
315 DO ix = 1, 1 + (m2-1)*incx2, incx2