1 *> \brief \b DLASDT creates a tree of subproblems for bidiagonal divide and conquer. Used by sbdsdc.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download DLASDT + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasdt.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasdt.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasdt.f">
21 * SUBROUTINE DLASDT( N, LVL, ND, INODE, NDIML, NDIMR, MSUB )
23 * .. Scalar Arguments ..
24 * INTEGER LVL, MSUB, N, ND
26 * .. Array Arguments ..
27 * INTEGER INODE( * ), NDIML( * ), NDIMR( * )
36 *> DLASDT creates a tree of subproblems for bidiagonal divide and
46 *> On entry, the number of diagonal elements of the
53 *> On exit, the number of levels on the computation tree.
59 *> On exit, the number of nodes on the tree.
64 *> INODE is INTEGER array, dimension ( N )
65 *> On exit, centers of subproblems.
70 *> NDIML is INTEGER array, dimension ( N )
71 *> On exit, row dimensions of left children.
76 *> NDIMR is INTEGER array, dimension ( N )
77 *> On exit, row dimensions of right children.
83 *> On entry, the maximum row dimension each subproblem at the
84 *> bottom of the tree can be of.
90 *> \author Univ. of Tennessee
91 *> \author Univ. of California Berkeley
92 *> \author Univ. of Colorado Denver
95 *> \date September 2012
97 *> \ingroup OTHERauxiliary
102 *> Ming Gu and Huan Ren, Computer Science Division, University of
103 *> California at Berkeley, USA
105 * =====================================================================
106 SUBROUTINE DLASDT( N, LVL, ND, INODE, NDIML, NDIMR, MSUB )
108 * -- LAPACK auxiliary routine (version 3.4.2) --
109 * -- LAPACK is a software package provided by Univ. of Tennessee, --
110 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
113 * .. Scalar Arguments ..
114 INTEGER LVL, MSUB, N, ND
116 * .. Array Arguments ..
117 INTEGER INODE( * ), NDIML( * ), NDIMR( * )
120 * =====================================================================
124 PARAMETER ( TWO = 2.0D+0 )
126 * .. Local Scalars ..
127 INTEGER I, IL, IR, LLST, MAXN, NCRNT, NLVL
128 DOUBLE PRECISION TEMP
130 * .. Intrinsic Functions ..
131 INTRINSIC DBLE, INT, LOG, MAX
133 * .. Executable Statements ..
135 * Find the number of levels on the tree.
138 TEMP = LOG( DBLE( MAXN ) / DBLE( MSUB+1 ) ) / LOG( TWO )
139 LVL = INT( TEMP ) + 1
144 NDIMR( 1 ) = N - I - 1
148 DO 20 NLVL = 1, LVL - 1
150 * Constructing the tree at (NLVL+1)-st level. The number of
151 * nodes created on this level is LLST * 2.
153 DO 10 I = 0, LLST - 1
157 NDIML( IL ) = NDIML( NCRNT ) / 2
158 NDIMR( IL ) = NDIML( NCRNT ) - NDIML( IL ) - 1
159 INODE( IL ) = INODE( NCRNT ) - NDIMR( IL ) - 1
160 NDIML( IR ) = NDIMR( NCRNT ) / 2
161 NDIMR( IR ) = NDIMR( NCRNT ) - NDIML( IR ) - 1
162 INODE( IR ) = INODE( NCRNT ) + NDIML( IR ) + 1