181 SUBROUTINE sckcsd( NM, MVAL, PVAL, QVAL, NMATS, ISEED, THRESH,
182 $ MMAX, X, XF, U1, U2, V1T, V2T, THETA, IWORK,
183 $ WORK, RWORK, NIN, NOUT, INFO )
190 INTEGER INFO, NIN, NM, NMATS, MMAX, NOUT
194 INTEGER ISEED( 4 ), IWORK( * ), MVAL( * ), PVAL( * ),
196 REAL RWORK( * ), THETA( * )
197 REAL U1( * ), U2( * ), V1T( * ), V2T( * ),
198 $ work( * ), x( * ), xf( * )
205 PARAMETER ( NTESTS = 15 )
207 parameter( ntypes = 4 )
208 REAL GAPDIGIT, ONE, ORTH, TEN, ZERO
209 parameter( gapdigit = 10.0e0, one = 1.0e0,
210 $ orth = 1.0e-4, ten = 10.0e0, zero = 0.0e0 )
212 PARAMETER ( PIOVER2 = 1.57079632679489661923132169163975144210e0 )
217 INTEGER I, IINFO, IM, IMAT, J, LDU1, LDU2, LDV1T,
218 $ ldv2t, ldx, lwork, m, nfail, nrun, nt, p, q, r
221 LOGICAL DOTYPE( NTYPES )
222 REAL RESULT( NTESTS )
233 EXTERNAL SLARAN, SLARND
244 CALL alareq( path, nmats, dotype, ntypes, nin, nout )
259 DO 20 imat = 1, ntypes
263 IF( .NOT.dotype( imat ) )
269 CALL slaror(
'L',
'I', m, m, x, ldx, iseed, work, iinfo )
270 IF( m .NE. 0 .AND. iinfo .NE. 0 )
THEN
271 WRITE( nout, fmt = 9999 ) m, iinfo
275 ELSE IF( imat.EQ.2 )
THEN
276 r = min( p, m-p, q, m-q )
278 theta(i) = piover2 * slarnd( 1, iseed )
280 CALL slacsg( m, p, q, theta, iseed, x, ldx, work )
283 x(i+(j-1)*ldx) = x(i+(j-1)*ldx) +
284 $ orth*slarnd(2,iseed)
287 ELSE IF( imat.EQ.3 )
THEN
288 r = min( p, m-p, q, m-q )
290 theta(i) = ten**(-slarnd(1,iseed)*gapdigit)
293 theta(i) = theta(i-1) + theta(i)
296 theta(i) = piover2 * theta(i) / theta(r+1)
298 CALL slacsg( m, p, q, theta, iseed, x, ldx, work )
300 CALL slaset(
'F', m, m, zero, one, x, ldx )
302 j = int( slaran( iseed ) * m ) + 1
304 CALL srot( m, x(1+(i-1)*ldx), 1, x(1+(j-1)*ldx), 1,
312 CALL scsdts( m, p, q, x, xf, ldx, u1, ldu1, u2, ldu2, v1t,
313 $ ldv1t, v2t, ldv2t, theta, iwork, work, lwork,
320 IF( result( i ).GE.thresh )
THEN
321 IF( nfail.EQ.0 .AND. firstt )
THEN
325 WRITE( nout, fmt = 9998 )m, p, q, imat, i,
336 CALL alasum( path, nout, nfail, nrun, 0 )
338 9999
FORMAT(
' SLAROR in SCKCSD: M = ', i5,
', INFO = ', i15 )
339 9998
FORMAT(
' M=', i4,
' P=', i4,
', Q=', i4,
', type ', i2,
340 $
', test ', i2,
', ratio=', g13.6 )
349 SUBROUTINE slacsg( M, P, Q, THETA, ISEED, X, LDX, WORK )
355 REAL WORK( * ), X( LDX, * )
358 PARAMETER ( ONE = 1.0e0, zero = 0.0e0 )
362 r = min( p, m-p, q, m-q )
364 CALL slaset(
'Full', m, m, zero, zero, x, ldx )
370 x(min(p,q)-r+i,min(p,q)-r+i) = cos(theta(i))
372 DO i = 1, min(p,m-q)-r
373 x(p-i+1,m-i+1) = -one
376 x(p-(min(p,m-q)-r)+1-i,m-(min(p,m-q)-r)+1-i) =
379 DO i = 1, min(m-p,q)-r
383 x(m-(min(m-p,q)-r)+1-i,q-(min(m-p,q)-r)+1-i) =
386 DO i = 1, min(m-p,m-q)-r
390 x(p+(min(m-p,m-q)-r)+i,q+(min(m-p,m-q)-r)+i) =
393 CALL slaror(
'Left',
'No init', p, m, x, ldx, iseed, work, info )
394 CALL slaror(
'Left',
'No init', m-p, m, x(p+1,1), ldx,
395 $ iseed, work, info )
396 CALL slaror(
'Right',
'No init', m, q, x, ldx, iseed,
398 CALL slaror(
'Right',
'No init', m, m-q,
399 $ x(1,q+1), ldx, iseed, work, info )
subroutine alareq(path, nmats, dotype, ntypes, nin, nout)
ALAREQ
subroutine alasum(type, nout, nfail, nrun, nerrs)
ALASUM
subroutine alahdg(iounit, path)
ALAHDG
subroutine slaset(uplo, m, n, alpha, beta, a, lda)
SLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine srot(n, sx, incx, sy, incy, c, s)
SROT
subroutine slacsg(m, p, q, theta, iseed, x, ldx, work)
subroutine sckcsd(nm, mval, pval, qval, nmats, iseed, thresh, mmax, x, xf, u1, u2, v1t, v2t, theta, iwork, work, rwork, nin, nout, info)
SCKCSD
subroutine scsdts(m, p, q, x, xf, ldx, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, theta, iwork, work, lwork, rwork, result)
SCSDTS
subroutine slaror(side, init, m, n, a, lda, iseed, x, info)
SLAROR