157 SUBROUTINE zunbdb6( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2,
158 $ LDQ2, WORK, LWORK, INFO )
165 INTEGER INCX1, INCX2, INFO, LDQ1, LDQ2, LWORK, M1, M2,
169 COMPLEX*16 Q1(LDQ1,*), Q2(LDQ2,*), WORK(*), X1(*), X2(*)
175 DOUBLE PRECISION ALPHA, REALONE, REALZERO
176 parameter( alpha = 0.83d0, realone = 1.0d0,
178 COMPLEX*16 NEGONE, ONE, ZERO
179 parameter( negone = (-1.0d0,0.0d0), one = (1.0d0,0.0d0),
180 $ zero = (0.0d0,0.0d0) )
184 DOUBLE PRECISION EPS, NORM, NORM_NEW, SCL, SSQ
187 DOUBLE PRECISION DLAMCH
202 ELSE IF( m2 .LT. 0 )
THEN
204 ELSE IF( n .LT. 0 )
THEN
206 ELSE IF( incx1 .LT. 1 )
THEN
208 ELSE IF( incx2 .LT. 1 )
THEN
210 ELSE IF( ldq1 .LT. max( 1, m1 ) )
THEN
212 ELSE IF( ldq2 .LT. max( 1, m2 ) )
THEN
214 ELSE IF( lwork .LT. n )
THEN
218 IF( info .NE. 0 )
THEN
219 CALL xerbla(
'ZUNBDB6', -info )
223 eps = dlamch(
'Precision' )
229 CALL zlassq( m1, x1, incx1, scl, ssq )
230 CALL zlassq( m2, x2, incx2, scl, ssq )
231 norm = scl * sqrt( ssq )
241 CALL zgemv(
'C', m1, n, one, q1, ldq1, x1, incx1, zero, work,
245 CALL zgemv(
'C', m2, n, one, q2, ldq2, x2, incx2, one, work, 1 )
247 CALL zgemv(
'N', m1, n, negone, q1, ldq1, work, 1, one, x1,
249 CALL zgemv(
'N', m2, n, negone, q2, ldq2, work, 1, one, x2,
254 CALL zlassq( m1, x1, incx1, scl, ssq )
255 CALL zlassq( m2, x2, incx2, scl, ssq )
256 norm_new = scl * sqrt(ssq)
262 IF( norm_new .GE. alpha * norm )
THEN
266 IF( norm_new .LE. n * eps * norm )
THEN
267 DO ix = 1, 1 + (m1-1)*incx1, incx1
270 DO ix = 1, 1 + (m2-1)*incx2, incx2
287 CALL zgemv(
'C', m1, n, one, q1, ldq1, x1, incx1, zero, work,
291 CALL zgemv(
'C', m2, n, one, q2, ldq2, x2, incx2, one, work, 1 )
293 CALL zgemv(
'N', m1, n, negone, q1, ldq1, work, 1, one, x1,
295 CALL zgemv(
'N', m2, n, negone, q2, ldq2, work, 1, one, x2,
300 CALL zlassq( m1, x1, incx1, scl, ssq )
301 CALL zlassq( m2, x2, incx2, scl, ssq )
302 norm_new = scl * sqrt(ssq)
308 IF( norm_new .LT. alpha * norm )
THEN
309 DO ix = 1, 1 + (m1-1)*incx1, incx1
312 DO ix = 1, 1 + (m2-1)*incx2, incx2
subroutine xerbla(srname, info)
subroutine zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
ZGEMV
subroutine zlassq(n, x, incx, scale, sumsq)
ZLASSQ updates a sum of squares represented in scaled form.
subroutine zunbdb6(m1, m2, n, x1, incx1, x2, incx2, q1, ldq1, q2, ldq2, work, lwork, info)
ZUNBDB6