208 DOUBLE PRECISION FUNCTION dlansf( NORM, TRANSR, UPLO, N, A, WORK )
215 CHARACTER norm, transr, uplo
219 DOUBLE PRECISION a( 0: * ), work( 0: * )
225 DOUBLE PRECISION one, zero
226 parameter( one = 1.0d+0, zero = 0.0d+0 )
229 INTEGER i, j, ifm, ilu, noe, n1, k, l, lda
230 DOUBLE PRECISION scale, s,
VALUE, aa, temp
240 INTRINSIC abs, max, sqrt
247 ELSE IF( n.EQ.1 )
THEN
255 IF( mod( n, 2 ).EQ.0 )
261 IF(
lsame( transr,
'T' ) )
267 IF(
lsame( uplo,
'U' ) )
286 IF(
lsame( norm,
'M' ) )
THEN
298 temp = abs( a( i+j*lda ) )
299 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
307 temp = abs( a( i+j*lda ) )
308 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
319 temp = abs( a( i+j*lda ) )
320 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
328 temp = abs( a( i+j*lda ) )
329 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
335 ELSE IF( (
lsame( norm,
'I' ) ) .OR. (
lsame( norm,
'O' ) ) .OR.
336 $ ( norm.EQ.
'1' ) )
THEN
351 aa = abs( a( i+j*lda ) )
354 work( i ) = work( i ) + aa
356 aa = abs( a( i+j*lda ) )
362 aa = abs( a( i+j*lda ) )
364 work( j ) = work( j ) + aa
368 aa = abs( a( i+j*lda ) )
371 work( l ) = work( l ) + aa
373 work( j ) = work( j ) + s
379 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
392 aa = abs( a( i+j*lda ) )
395 work( i+k ) = work( i+k ) + aa
398 aa = abs( a( i+j*lda ) )
401 work( i+k ) = work( i+k ) + s
405 aa = abs( a( i+j*lda ) )
411 aa = abs( a( i+j*lda ) )
414 work( l ) = work( l ) + aa
416 work( j ) = work( j ) + s
421 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
434 aa = abs( a( i+j*lda ) )
437 work( i ) = work( i ) + aa
439 aa = abs( a( i+j*lda ) )
443 aa = abs( a( i+j*lda ) )
445 work( j ) = work( j ) + aa
449 aa = abs( a( i+j*lda ) )
452 work( l ) = work( l ) + aa
454 work( j ) = work( j ) + s
459 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
470 aa = abs( a( i+j*lda ) )
473 work( i+k ) = work( i+k ) + aa
475 aa = abs( a( i+j*lda ) )
478 work( i+k ) = work( i+k ) + s
481 aa = abs( a( i+j*lda ) )
487 aa = abs( a( i+j*lda ) )
490 work( l ) = work( l ) + aa
492 work( j ) = work( j ) + s
497 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
518 aa = abs( a( i+j*lda ) )
520 work( i+n1 ) = work( i+n1 ) + aa
526 s = abs( a( 0+j*lda ) )
529 aa = abs( a( i+j*lda ) )
531 work( i+n1 ) = work( i+n1 ) + aa
534 work( j ) = work( j ) + s
538 aa = abs( a( i+j*lda ) )
540 work( i ) = work( i ) + aa
544 aa = abs( a( i+j*lda ) )
547 work( j-k ) = work( j-k ) + s
549 s = abs( a( i+j*lda ) )
553 aa = abs( a( i+j*lda ) )
555 work( l ) = work( l ) + aa
558 work( j ) = work( j ) + s
563 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
577 aa = abs( a( i+j*lda ) )
579 work( i ) = work( i ) + aa
582 aa = abs( a( i+j*lda ) )
589 aa = abs( a( i+j*lda ) )
591 DO l = k + j + 1, n - 1
593 aa = abs( a( i+j*lda ) )
596 work( l ) = work( l ) + aa
598 work( k+j ) = work( k+j ) + s
603 aa = abs( a( i+j*lda ) )
605 work( i ) = work( i ) + aa
609 aa = abs( a( i+j*lda ) )
618 aa = abs( a( i+j*lda ) )
620 work( i ) = work( i ) + aa
623 work( j ) = work( j ) + s
628 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
641 aa = abs( a( i+j*lda ) )
643 work( i+k ) = work( i+k ) + aa
649 aa = abs( a( 0+j*lda ) )
653 aa = abs( a( i+j*lda ) )
655 work( i+k ) = work( i+k ) + aa
658 work( j ) = work( j ) + s
662 aa = abs( a( i+j*lda ) )
664 work( i ) = work( i ) + aa
668 aa = abs( a( i+j*lda ) )
671 work( j-k-1 ) = work( j-k-1 ) + s
673 aa = abs( a( i+j*lda ) )
678 aa = abs( a( i+j*lda ) )
680 work( l ) = work( l ) + aa
683 work( j ) = work( j ) + s
688 aa = abs( a( i+j*lda ) )
690 work( i ) = work( i ) + aa
694 aa = abs( a( i+j*lda ) )
697 work( i ) = work( i ) + s
701 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
715 work( i+k ) = work( i+k ) + aa
718 work( k ) = work( k ) + s
723 aa = abs( a( i+j*lda ) )
725 work( i ) = work( i ) + aa
728 aa = abs( a( i+j*lda ) )
735 aa = abs( a( i+j*lda ) )
737 DO l = k + j + 1, n - 1
739 aa = abs( a( i+j*lda ) )
742 work( l ) = work( l ) + aa
744 work( k+j ) = work( k+j ) + s
749 aa = abs( a( i+j*lda ) )
751 work( i ) = work( i ) + aa
755 aa = abs( a( i+j*lda ) )
764 aa = abs( a( i+j*lda ) )
766 work( i ) = work( i ) + aa
769 work( j-1 ) = work( j-1 ) + s
774 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
780 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
794 CALL dlassq( k-j-2, a( k+j+1+j*lda ), 1, scale, s )
798 CALL dlassq( k+j-1, a( 0+j*lda ), 1, scale, s )
803 CALL dlassq( k-1, a( k ), lda+1, scale, s )
805 CALL dlassq( k, a( k-1 ), lda+1, scale, s )
810 CALL dlassq( n-j-1, a( j+1+j*lda ), 1, scale, s )
814 CALL dlassq( j, a( 0+( 1+j )*lda ), 1, scale, s )
819 CALL dlassq( k, a( 0 ), lda+1, scale, s )
821 CALL dlassq( k-1, a( 0+lda ), lda+1, scale, s )
829 CALL dlassq( j, a( 0+( k+j )*lda ), 1, scale, s )
833 CALL dlassq( k, a( 0+j*lda ), 1, scale, s )
837 CALL dlassq( k-j-1, a( j+1+( j+k-1 )*lda ), 1,
843 CALL dlassq( k-1, a( 0+k*lda ), lda+1, scale, s )
845 CALL dlassq( k, a( 0+( k-1 )*lda ), lda+1, scale, s )
850 CALL dlassq( j, a( 0+j*lda ), 1, scale, s )
854 CALL dlassq( k, a( 0+j*lda ), 1, scale, s )
858 CALL dlassq( k-j-2, a( j+2+j*lda ), 1, scale, s )
863 CALL dlassq( k, a( 0 ), lda+1, scale, s )
865 CALL dlassq( k-1, a( 1 ), lda+1, scale, s )
876 CALL dlassq( k-j-1, a( k+j+2+j*lda ), 1, scale, s )
880 CALL dlassq( k+j, a( 0+j*lda ), 1, scale, s )
885 CALL dlassq( k, a( k+1 ), lda+1, scale, s )
887 CALL dlassq( k, a( k ), lda+1, scale, s )
892 CALL dlassq( n-j-1, a( j+2+j*lda ), 1, scale, s )
896 CALL dlassq( j, a( 0+j*lda ), 1, scale, s )
901 CALL dlassq( k, a( 1 ), lda+1, scale, s )
903 CALL dlassq( k, a( 0 ), lda+1, scale, s )
911 CALL dlassq( j, a( 0+( k+1+j )*lda ), 1, scale, s )
915 CALL dlassq( k, a( 0+j*lda ), 1, scale, s )
919 CALL dlassq( k-j-1, a( j+1+( j+k )*lda ), 1, scale,
925 CALL dlassq( k, a( 0+( k+1 )*lda ), lda+1, scale, s )
927 CALL dlassq( k, a( 0+k*lda ), lda+1, scale, s )
932 CALL dlassq( j, a( 0+( j+1 )*lda ), 1, scale, s )
936 CALL dlassq( k, a( 0+j*lda ), 1, scale, s )
940 CALL dlassq( k-j-1, a( j+1+j*lda ), 1, scale, s )
945 CALL dlassq( k, a( lda ), lda+1, scale, s )
947 CALL dlassq( k, a( 0 ), lda+1, scale, s )
952 VALUE = scale*sqrt( s )
logical function disnan(din)
DISNAN tests input for NaN.
double precision function dlansf(norm, transr, uplo, n, a, work)
DLANSF returns the value of the 1-norm, or the Frobenius norm, or the infinity norm,...
subroutine dlassq(n, x, incx, scale, sumsq)
DLASSQ updates a sum of squares represented in scaled form.
logical function lsame(ca, cb)
LSAME