164 SUBROUTINE ssfrk( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA,
174 CHARACTER TRANS, TRANSR, UPLO
177 REAL A( LDA, * ), C( * )
184 parameter( one = 1.0e+0, zero = 0.0e+0 )
187 LOGICAL LOWER, NORMALTRANSR, NISODD, NOTRANS
188 INTEGER INFO, NROWA, J, NK, N1, N2
205 normaltransr = lsame( transr,
'N' )
206 lower = lsame( uplo,
'L' )
207 notrans = lsame( trans,
'N' )
215 IF( .NOT.normaltransr .AND. .NOT.lsame( transr,
'T' ) )
THEN
217 ELSE IF( .NOT.lower .AND. .NOT.lsame( uplo,
'U' ) )
THEN
219 ELSE IF( .NOT.notrans .AND. .NOT.lsame( trans,
'T' ) )
THEN
221 ELSE IF( n.LT.0 )
THEN
223 ELSE IF( k.LT.0 )
THEN
225 ELSE IF( lda.LT.max( 1, nrowa ) )
THEN
229 CALL xerbla(
'SSFRK ', -info )
238 IF( ( n.EQ.0 ) .OR. ( ( ( alpha.EQ.zero ) .OR. ( k.EQ.0 ) ) .AND.
239 $ ( beta.EQ.one ) ) )
RETURN
241 IF( ( alpha.EQ.zero ) .AND. ( beta.EQ.zero ) )
THEN
242 DO j = 1, ( ( n*( n+1 ) ) / 2 )
252 IF( mod( n, 2 ).EQ.0 )
THEN
270 IF( normaltransr )
THEN
282 CALL ssyrk(
'L',
'N', n1, k, alpha, a( 1, 1 ), lda,
284 CALL ssyrk(
'U',
'N', n2, k, alpha, a( n1+1, 1 ), lda,
285 $ beta, c( n+1 ), n )
286 CALL sgemm(
'N',
'T', n2, n1, k, alpha, a( n1+1, 1 ),
287 $ lda, a( 1, 1 ), lda, beta, c( n1+1 ), n )
293 CALL ssyrk(
'L',
'T', n1, k, alpha, a( 1, 1 ), lda,
295 CALL ssyrk(
'U',
'T', n2, k, alpha, a( 1, n1+1 ), lda,
296 $ beta, c( n+1 ), n )
297 CALL sgemm(
'T',
'N', n2, n1, k, alpha, a( 1, n1+1 ),
298 $ lda, a( 1, 1 ), lda, beta, c( n1+1 ), n )
310 CALL ssyrk(
'L',
'N', n1, k, alpha, a( 1, 1 ), lda,
311 $ beta, c( n2+1 ), n )
312 CALL ssyrk(
'U',
'N', n2, k, alpha, a( n2, 1 ), lda,
313 $ beta, c( n1+1 ), n )
314 CALL sgemm(
'N',
'T', n1, n2, k, alpha, a( 1, 1 ),
315 $ lda, a( n2, 1 ), lda, beta, c( 1 ), n )
321 CALL ssyrk(
'L',
'T', n1, k, alpha, a( 1, 1 ), lda,
322 $ beta, c( n2+1 ), n )
323 CALL ssyrk(
'U',
'T', n2, k, alpha, a( 1, n2 ), lda,
324 $ beta, c( n1+1 ), n )
325 CALL sgemm(
'T',
'N', n1, n2, k, alpha, a( 1, 1 ),
326 $ lda, a( 1, n2 ), lda, beta, c( 1 ), n )
344 CALL ssyrk(
'U',
'N', n1, k, alpha, a( 1, 1 ), lda,
346 CALL ssyrk(
'L',
'N', n2, k, alpha, a( n1+1, 1 ), lda,
348 CALL sgemm(
'N',
'T', n1, n2, k, alpha, a( 1, 1 ),
349 $ lda, a( n1+1, 1 ), lda, beta,
356 CALL ssyrk(
'U',
'T', n1, k, alpha, a( 1, 1 ), lda,
358 CALL ssyrk(
'L',
'T', n2, k, alpha, a( 1, n1+1 ), lda,
360 CALL sgemm(
'T',
'N', n1, n2, k, alpha, a( 1, 1 ),
361 $ lda, a( 1, n1+1 ), lda, beta,
374 CALL ssyrk(
'U',
'N', n1, k, alpha, a( 1, 1 ), lda,
375 $ beta, c( n2*n2+1 ), n2 )
376 CALL ssyrk(
'L',
'N', n2, k, alpha, a( n1+1, 1 ), lda,
377 $ beta, c( n1*n2+1 ), n2 )
378 CALL sgemm(
'N',
'T', n2, n1, k, alpha, a( n1+1, 1 ),
379 $ lda, a( 1, 1 ), lda, beta, c( 1 ), n2 )
385 CALL ssyrk(
'U',
'T', n1, k, alpha, a( 1, 1 ), lda,
386 $ beta, c( n2*n2+1 ), n2 )
387 CALL ssyrk(
'L',
'T', n2, k, alpha, a( 1, n1+1 ), lda,
388 $ beta, c( n1*n2+1 ), n2 )
389 CALL sgemm(
'T',
'N', n2, n1, k, alpha, a( 1, n1+1 ),
390 $ lda, a( 1, 1 ), lda, beta, c( 1 ), n2 )
402 IF( normaltransr )
THEN
414 CALL ssyrk(
'L',
'N', nk, k, alpha, a( 1, 1 ), lda,
415 $ beta, c( 2 ), n+1 )
416 CALL ssyrk(
'U',
'N', nk, k, alpha, a( nk+1, 1 ), lda,
417 $ beta, c( 1 ), n+1 )
418 CALL sgemm(
'N',
'T', nk, nk, k, alpha, a( nk+1, 1 ),
419 $ lda, a( 1, 1 ), lda, beta, c( nk+2 ),
426 CALL ssyrk(
'L',
'T', nk, k, alpha, a( 1, 1 ), lda,
427 $ beta, c( 2 ), n+1 )
428 CALL ssyrk(
'U',
'T', nk, k, alpha, a( 1, nk+1 ), lda,
429 $ beta, c( 1 ), n+1 )
430 CALL sgemm(
'T',
'N', nk, nk, k, alpha, a( 1, nk+1 ),
431 $ lda, a( 1, 1 ), lda, beta, c( nk+2 ),
444 CALL ssyrk(
'L',
'N', nk, k, alpha, a( 1, 1 ), lda,
445 $ beta, c( nk+2 ), n+1 )
446 CALL ssyrk(
'U',
'N', nk, k, alpha, a( nk+1, 1 ), lda,
447 $ beta, c( nk+1 ), n+1 )
448 CALL sgemm(
'N',
'T', nk, nk, k, alpha, a( 1, 1 ),
449 $ lda, a( nk+1, 1 ), lda, beta, c( 1 ),
456 CALL ssyrk(
'L',
'T', nk, k, alpha, a( 1, 1 ), lda,
457 $ beta, c( nk+2 ), n+1 )
458 CALL ssyrk(
'U',
'T', nk, k, alpha, a( 1, nk+1 ), lda,
459 $ beta, c( nk+1 ), n+1 )
460 CALL sgemm(
'T',
'N', nk, nk, k, alpha, a( 1, 1 ),
461 $ lda, a( 1, nk+1 ), lda, beta, c( 1 ),
480 CALL ssyrk(
'U',
'N', nk, k, alpha, a( 1, 1 ), lda,
481 $ beta, c( nk+1 ), nk )
482 CALL ssyrk(
'L',
'N', nk, k, alpha, a( nk+1, 1 ), lda,
484 CALL sgemm(
'N',
'T', nk, nk, k, alpha, a( 1, 1 ),
485 $ lda, a( nk+1, 1 ), lda, beta,
486 $ c( ( ( nk+1 )*nk )+1 ), nk )
492 CALL ssyrk(
'U',
'T', nk, k, alpha, a( 1, 1 ), lda,
493 $ beta, c( nk+1 ), nk )
494 CALL ssyrk(
'L',
'T', nk, k, alpha, a( 1, nk+1 ), lda,
496 CALL sgemm(
'T',
'N', nk, nk, k, alpha, a( 1, 1 ),
497 $ lda, a( 1, nk+1 ), lda, beta,
498 $ c( ( ( nk+1 )*nk )+1 ), nk )
510 CALL ssyrk(
'U',
'N', nk, k, alpha, a( 1, 1 ), lda,
511 $ beta, c( nk*( nk+1 )+1 ), nk )
512 CALL ssyrk(
'L',
'N', nk, k, alpha, a( nk+1, 1 ), lda,
513 $ beta, c( nk*nk+1 ), nk )
514 CALL sgemm(
'N',
'T', nk, nk, k, alpha, a( nk+1, 1 ),
515 $ lda, a( 1, 1 ), lda, beta, c( 1 ), nk )
521 CALL ssyrk(
'U',
'T', nk, k, alpha, a( 1, 1 ), lda,
522 $ beta, c( nk*( nk+1 )+1 ), nk )
523 CALL ssyrk(
'L',
'T', nk, k, alpha, a( 1, nk+1 ), lda,
524 $ beta, c( nk*nk+1 ), nk )
525 CALL sgemm(
'T',
'N', nk, nk, k, alpha, a( 1, nk+1 ),
526 $ lda, a( 1, 1 ), lda, beta, c( 1 ), nk )
subroutine xerbla(srname, info)
subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
SGEMM
subroutine ssyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
SSYRK
subroutine ssfrk(transr, uplo, trans, n, k, alpha, a, lda, beta, c)
SSFRK performs a symmetric rank-k operation for matrix in RFP format.