157 SUBROUTINE cunbdb6( 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 Q1(LDQ1,*), Q2(LDQ2,*), WORK(*), X1(*), X2(*)
175 REAL ALPHA, REALONE, REALZERO
176 parameter( alpha = 0.83e0, realone = 1.0e0,
178 COMPLEX NEGONE, ONE, ZERO
179 parameter( negone = (-1.0e0,0.0e0), one = (1.0e0,0.0e0),
180 $ zero = (0.0e0,0.0e0) )
184 REAL EPS, NORM, NORM_NEW, SCL, SSQ
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(
'CUNBDB6', -info )
223 eps = slamch(
'Precision' )
229 CALL classq( m1, x1, incx1, scl, ssq )
230 CALL classq( m2, x2, incx2, scl, ssq )
231 norm = scl * sqrt( ssq )
241 CALL cgemv(
'C', m1, n, one, q1, ldq1, x1, incx1, zero, work,
245 CALL cgemv(
'C', m2, n, one, q2, ldq2, x2, incx2, one, work, 1 )
247 CALL cgemv(
'N', m1, n, negone, q1, ldq1, work, 1, one, x1,
249 CALL cgemv(
'N', m2, n, negone, q2, ldq2, work, 1, one, x2,
254 CALL classq( m1, x1, incx1, scl, ssq )
255 CALL classq( 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 cgemv(
'C', m1, n, one, q1, ldq1, x1, incx1, zero, work,
291 CALL cgemv(
'C', m2, n, one, q2, ldq2, x2, incx2, one, work, 1 )
293 CALL cgemv(
'N', m1, n, negone, q1, ldq1, work, 1, one, x1,
295 CALL cgemv(
'N', m2, n, negone, q2, ldq2, work, 1, one, x2,
300 CALL classq( m1, x1, incx1, scl, ssq )
301 CALL classq( 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 cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
CGEMV
subroutine classq(n, x, incx, scale, sumsq)
CLASSQ updates a sum of squares represented in scaled form.
subroutine cunbdb6(m1, m2, n, x1, incx1, x2, incx2, q1, ldq1, q2, ldq2, work, lwork, info)
CUNBDB6