201 SUBROUTINE dorbdb1( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI,
202 $ TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO )
212 DOUBLE PRECISION (*), THETA(*)
213 DOUBLE PRECISION TAUP1(*), TAUP2(*), TAUQ1(*), WORK(*),
214 $ x11(ldx11,*), x21(ldx21,*)
221 parameter( one = 1.0d0 )
224 DOUBLE PRECISION C, S
225 INTEGER CHILDINFO, I, ILARF, , LLARF, LORBDB5,
233 DOUBLE PRECISION DNRM2
237 INTRINSIC atan2, cos,
max, sin, sqrt
244 lquery = lwork .EQ. -1
248 ELSE IF( p .LT. q .OR. m-p .LT. q )
THEN
250 ELSE IF( q .LT. 0 .OR. m-q .LT. q )
THEN
252 ELSE IF( ldx11 .LT.
max( 1, p ) )
THEN
254 ELSE IF( ldx21 .LT.
max( 1, m-p ) )
THEN
260 IF( info .EQ. 0 )
THEN
262 llarf =
max( p-1, m-p-1, q-1 )
265 lworkopt =
max( ilarf+llarf-1, iorbdb5+lorbdb5-1 )
268 IF( lwork .LT. lworkmin .AND. .NOT.lquery )
THEN
272 IF( info .NE. 0 )
THEN
273 CALL xerbla(
'DORBDB1', -info )
275 ELSE IF( lquery )
THEN
283 CALL dlarfgp( p-i+1, x11(i,i), x11(i+1,i), 1, taup1(i) )
284 CALL dlarfgp( m-p-i+1, x21(i,i), x21(i+1,i), 1, taup2(i) )
285 theta(i) = atan2( x21(i,i), x11(i,i) )
290 CALL dlarf(
'L', p-i+1, q-i, x11(i,i), 1, taup1(i), x11(i,i+1),
291 $ ldx11, work(ilarf) )
292 CALL dlarf(
'L', m-p-i+1, q-i, x21(i,i), 1, taup2(i),
293 $ x21(i,i+1), ldx21, work(ilarf) )
296 CALL drot( q-i, x11(i,i+1), ldx11, x21(i,i+1), ldx21, c, s )
297 CALL dlarfgp( q-i, x21(i,i+1), x21(i,i+2), ldx21, tauq1(i) )
300 CALL dlarf(
'R', p-i, q-i, x21(i,i+1), ldx21, tauq1(i),
301 $ x11(i+1,i+1), ldx11, work(ilarf) )
302 CALL dlarf(
'R', m-p-i, q-i, x21(i,i+1), ldx21, tauq1(i),
303 $ x21(i+1,i+1), ldx21, work(ilarf) )
304 c = sqrt( dnrm2( p-i, x11(i+1,i+1), 1 )**2
305 $ + dnrm2( m-p-i, x21(i+1,i+1), 1 )**2 )
306 phi(i) = atan2( s, c )
307 CALL dorbdb5( p-i, m-p-i, q-i-1, x11(i+1,i+1), 1,
308 $ x21(i+1,i+1), 1, x11(i+1,i+2), ldx11,
309 $ x21(i+1,i+2), ldx21, work(iorbdb5), lorbdb5,
subroutine dorbdb1(m, p, q, x11, ldx11, x21, ldx21, theta, phi, taup1, taup2, tauq1, work, lwork, info)
DORBDB1