154 SUBROUTINE cunbdb5( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2,
155 $ LDQ2, WORK, LWORK, INFO )
162 INTEGER INCX1, INCX2, INFO, LDQ1, LDQ2, LWORK, M1, M2,
166 COMPLEX Q1(LDQ1,*), Q2(LDQ2,*), WORK(*), X1(*), X2(*)
173 parameter( realzero = 0.0e0 )
175 parameter( one = (1.0e0,0.0e0), zero = (0.0e0,0.0e0) )
178 INTEGER CHILDINFO, I, J
179 REAL EPS, NORM, SCL, SSQ
186 EXTERNAL slamch, scnrm2
198 ELSE IF( m2 .LT. 0 )
THEN
200 ELSE IF( n .LT. 0 )
THEN
202 ELSE IF( incx1 .LT. 1 )
THEN
204 ELSE IF( incx2 .LT. 1 )
THEN
206 ELSE IF( ldq1 .LT. max( 1, m1 ) )
THEN
208 ELSE IF( ldq2 .LT. max( 1, m2 ) )
THEN
210 ELSE IF( lwork .LT. n )
THEN
214 IF( info .NE. 0 )
THEN
215 CALL xerbla(
'CUNBDB5', -info )
219 eps = slamch(
'Precision' )
225 CALL classq( m1, x1, incx1, scl, ssq )
226 CALL classq( m2, x2, incx2, scl, ssq )
227 norm = scl * sqrt( ssq )
229 IF( norm .GT. n * eps )
THEN
235 CALL cscal( m1, one / norm, x1, incx1 )
236 CALL cscal( m2, one / norm, x2, incx2 )
237 CALL cunbdb6( m1, m2, n, x1, incx1, x2, incx2, q1, ldq1, q2,
238 $ ldq2, work, lwork, childinfo )
242 IF( scnrm2(m1,x1,incx1) .NE. realzero
243 $ .OR. scnrm2(m2,x2,incx2) .NE. realzero )
THEN
259 CALL cunbdb6( m1, m2, n, x1, incx1, x2, incx2, q1, ldq1, q2,
260 $ ldq2, work, lwork, childinfo )
261 IF( scnrm2(m1,x1,incx1) .NE. realzero
262 $ .OR. scnrm2(m2,x2,incx2) .NE. realzero )
THEN
278 CALL cunbdb6( m1, m2, n, x1, incx1, x2, incx2, q1, ldq1, q2,
279 $ ldq2, work, lwork, childinfo )
280 IF( scnrm2(m1,x1,incx1) .NE. realzero
281 $ .OR. scnrm2(m2,x2,incx2) .NE. realzero )
THEN
subroutine xerbla(srname, info)
subroutine classq(n, x, incx, scale, sumsq)
CLASSQ updates a sum of squares represented in scaled form.
subroutine cscal(n, ca, cx, incx)
CSCAL
subroutine cunbdb5(m1, m2, n, x1, incx1, x2, incx2, q1, ldq1, q2, ldq2, work, lwork, info)
CUNBDB5
subroutine cunbdb6(m1, m2, n, x1, incx1, x2, incx2, q1, ldq1, q2, ldq2, work, lwork, info)
CUNBDB6