164 SUBROUTINE dsfrk( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA,
172 DOUBLE PRECISION ALPHA, BETA
174 CHARACTER TRANS, TRANSR, UPLO
177 DOUBLE PRECISION A( LDA, * ), C( * )
184 DOUBLE PRECISION ONE, ZERO
185 parameter( one = 1.0d+0, zero = 0.0d+0 )
188 LOGICAL LOWER, NORMALTRANSR, NISODD, NOTRANS
189 INTEGER INFO, NROWA, J, NK, N1, N2
206 normaltransr = lsame( transr,
'N' )
207 lower = lsame( uplo,
'L' )
208 notrans = lsame( trans,
'N' )
216 IF( .NOT.normaltransr .AND. .NOT.lsame( transr,
'T' ) )
THEN
218 ELSE IF( .NOT.lower .AND. .NOT.lsame( uplo,
'U' ) )
THEN
220 ELSE IF( .NOT.notrans .AND. .NOT.lsame( trans,
'T' ) )
THEN
222 ELSE IF( n.LT.0 )
THEN
224 ELSE IF( k.LT.0 )
THEN
226 ELSE IF( lda.LT.max( 1, nrowa ) )
THEN
230 CALL xerbla(
'DSFRK ', -info )
239 IF( ( n.EQ.0 ) .OR. ( ( ( alpha.EQ.zero ) .OR. ( k.EQ.0 ) ) .AND.
240 $ ( beta.EQ.one ) ) )
RETURN
242 IF( ( alpha.EQ.zero ) .AND. ( beta.EQ.zero ) )
THEN
243 DO j = 1, ( ( n*( n+1 ) ) / 2 )
253 IF( mod( n, 2 ).EQ.0 )
THEN
271 IF( normaltransr )
THEN
283 CALL dsyrk(
'L',
'N', n1, k, alpha, a( 1, 1 ), lda,
285 CALL dsyrk(
'U',
'N', n2, k, alpha, a( n1+1, 1 ), lda,
286 $ beta, c( n+1 ), n )
287 CALL dgemm(
'N',
'T', n2, n1, k, alpha, a( n1+1, 1 ),
288 $ lda, a( 1, 1 ), lda, beta, c( n1+1 ), n )
294 CALL dsyrk(
'L',
'T', n1, k, alpha, a( 1, 1 ), lda,
296 CALL dsyrk(
'U',
'T', n2, k, alpha, a( 1, n1+1 ), lda,
297 $ beta, c( n+1 ), n )
298 CALL dgemm(
'T',
'N', n2, n1, k, alpha, a( 1, n1+1 ),
299 $ lda, a( 1, 1 ), lda, beta, c( n1+1 ), n )
311 CALL dsyrk(
'L',
'N', n1, k, alpha, a( 1, 1 ), lda,
312 $ beta, c( n2+1 ), n )
313 CALL dsyrk(
'U',
'N', n2, k, alpha, a( n2, 1 ), lda,
314 $ beta, c( n1+1 ), n )
315 CALL dgemm(
'N',
'T', n1, n2, k, alpha, a( 1, 1 ),
316 $ lda, a( n2, 1 ), lda, beta, c( 1 ), n )
322 CALL dsyrk(
'L',
'T', n1, k, alpha, a( 1, 1 ), lda,
323 $ beta, c( n2+1 ), n )
324 CALL dsyrk(
'U',
'T', n2, k, alpha, a( 1, n2 ), lda,
325 $ beta, c( n1+1 ), n )
326 CALL dgemm(
'T',
'N', n1, n2, k, alpha, a( 1, 1 ),
327 $ lda, a( 1, n2 ), lda, beta, c( 1 ), n )
345 CALL dsyrk(
'U',
'N', n1, k, alpha, a( 1, 1 ), lda,
347 CALL dsyrk(
'L',
'N', n2, k, alpha, a( n1+1, 1 ), lda,
349 CALL dgemm(
'N',
'T', n1, n2, k, alpha, a( 1, 1 ),
350 $ lda, a( n1+1, 1 ), lda, beta,
357 CALL dsyrk(
'U',
'T', n1, k, alpha, a( 1, 1 ), lda,
359 CALL dsyrk(
'L',
'T', n2, k, alpha, a( 1, n1+1 ), lda,
361 CALL dgemm(
'T',
'N', n1, n2, k, alpha, a( 1, 1 ),
362 $ lda, a( 1, n1+1 ), lda, beta,
375 CALL dsyrk(
'U',
'N', n1, k, alpha, a( 1, 1 ), lda,
376 $ beta, c( n2*n2+1 ), n2 )
377 CALL dsyrk(
'L',
'N', n2, k, alpha, a( n1+1, 1 ), lda,
378 $ beta, c( n1*n2+1 ), n2 )
379 CALL dgemm(
'N',
'T', n2, n1, k, alpha, a( n1+1, 1 ),
380 $ lda, a( 1, 1 ), lda, beta, c( 1 ), n2 )
386 CALL dsyrk(
'U',
'T', n1, k, alpha, a( 1, 1 ), lda,
387 $ beta, c( n2*n2+1 ), n2 )
388 CALL dsyrk(
'L',
'T', n2, k, alpha, a( 1, n1+1 ), lda,
389 $ beta, c( n1*n2+1 ), n2 )
390 CALL dgemm(
'T',
'N', n2, n1, k, alpha, a( 1, n1+1 ),
391 $ lda, a( 1, 1 ), lda, beta, c( 1 ), n2 )
403 IF( normaltransr )
THEN
415 CALL dsyrk(
'L',
'N', nk, k, alpha, a( 1, 1 ), lda,
416 $ beta, c( 2 ), n+1 )
417 CALL dsyrk(
'U',
'N', nk, k, alpha, a( nk+1, 1 ), lda,
418 $ beta, c( 1 ), n+1 )
419 CALL dgemm(
'N',
'T', nk, nk, k, alpha, a( nk+1, 1 ),
420 $ lda, a( 1, 1 ), lda, beta, c( nk+2 ),
427 CALL dsyrk(
'L',
'T', nk, k, alpha, a( 1, 1 ), lda,
428 $ beta, c( 2 ), n+1 )
429 CALL dsyrk(
'U',
'T', nk, k, alpha, a( 1, nk+1 ), lda,
430 $ beta, c( 1 ), n+1 )
431 CALL dgemm(
'T',
'N', nk, nk, k, alpha, a( 1, nk+1 ),
432 $ lda, a( 1, 1 ), lda, beta, c( nk+2 ),
445 CALL dsyrk(
'L',
'N', nk, k, alpha, a( 1, 1 ), lda,
446 $ beta, c( nk+2 ), n+1 )
447 CALL dsyrk(
'U',
'N', nk, k, alpha, a( nk+1, 1 ), lda,
448 $ beta, c( nk+1 ), n+1 )
449 CALL dgemm(
'N',
'T', nk, nk, k, alpha, a( 1, 1 ),
450 $ lda, a( nk+1, 1 ), lda, beta, c( 1 ),
457 CALL dsyrk(
'L',
'T', nk, k, alpha, a( 1, 1 ), lda,
458 $ beta, c( nk+2 ), n+1 )
459 CALL dsyrk(
'U',
'T', nk, k, alpha, a( 1, nk+1 ), lda,
460 $ beta, c( nk+1 ), n+1 )
461 CALL dgemm(
'T',
'N', nk, nk, k, alpha, a( 1, 1 ),
462 $ lda, a( 1, nk+1 ), lda, beta, c( 1 ),
481 CALL dsyrk(
'U',
'N', nk, k, alpha, a( 1, 1 ), lda,
482 $ beta, c( nk+1 ), nk )
483 CALL dsyrk(
'L',
'N', nk, k, alpha, a( nk+1, 1 ), lda,
485 CALL dgemm(
'N',
'T', nk, nk, k, alpha, a( 1, 1 ),
486 $ lda, a( nk+1, 1 ), lda, beta,
487 $ c( ( ( nk+1 )*nk )+1 ), nk )
493 CALL dsyrk(
'U',
'T', nk, k, alpha, a( 1, 1 ), lda,
494 $ beta, c( nk+1 ), nk )
495 CALL dsyrk(
'L',
'T', nk, k, alpha, a( 1, nk+1 ), lda,
497 CALL dgemm(
'T',
'N', nk, nk, k, alpha, a( 1, 1 ),
498 $ lda, a( 1, nk+1 ), lda, beta,
499 $ c( ( ( nk+1 )*nk )+1 ), nk )
511 CALL dsyrk(
'U',
'N', nk, k, alpha, a( 1, 1 ), lda,
512 $ beta, c( nk*( nk+1 )+1 ), nk )
513 CALL dsyrk(
'L',
'N', nk, k, alpha, a( nk+1, 1 ), lda,
514 $ beta, c( nk*nk+1 ), nk )
515 CALL dgemm(
'N',
'T', nk, nk, k, alpha, a( nk+1, 1 ),
516 $ lda, a( 1, 1 ), lda, beta, c( 1 ), nk )
522 CALL dsyrk(
'U',
'T', nk, k, alpha, a( 1, 1 ), lda,
523 $ beta, c( nk*( nk+1 )+1 ), nk )
524 CALL dsyrk(
'L',
'T', nk, k, alpha, a( 1, nk+1 ), lda,
525 $ beta, c( nk*nk+1 ), nk )
526 CALL dgemm(
'T',
'N', nk, nk, k, alpha, a( 1, nk+1 ),
527 $ lda, a( 1, 1 ), lda, beta, c( 1 ), nk )
subroutine xerbla(srname, info)
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
subroutine dsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
DSYRK
subroutine dsfrk(transr, uplo, trans, n, k, alpha, a, lda, beta, c)
DSFRK performs a symmetric rank-k operation for matrix in RFP format.