126 REAL FUNCTION clantp( NORM, UPLO, DIAG, N, AP, WORK )
134 CHARACTER diag, norm, uplo
146 parameter( one = 1.0e+0, zero = 0.0e+0 )
151 REAL scale, sum, value
167 ELSE IF(
lsame( norm,
'M' ) )
THEN
172 IF(
lsame( diag,
'U' ) )
THEN
174 IF(
lsame( uplo,
'U' ) )
THEN
176 DO 10 i = k, k + j - 2
178 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
184 DO 30 i = k + 1, k + n - j
186 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
193 IF(
lsame( uplo,
'U' ) )
THEN
195 DO 50 i = k, k + j - 1
197 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
203 DO 70 i = k, k + n - j
205 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
211 ELSE IF( (
lsame( norm,
'O' ) ) .OR. ( norm.EQ.
'1' ) )
THEN
217 udiag =
lsame( diag,
'U' )
218 IF(
lsame( uplo,
'U' ) )
THEN
222 DO 90 i = k, k + j - 2
223 sum = sum + abs( ap( i ) )
227 DO 100 i = k, k + j - 1
228 sum = sum + abs( ap( i ) )
232 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
238 DO 120 i = k + 1, k + n - j
239 sum = sum + abs( ap( i ) )
243 DO 130 i = k, k + n - j
244 sum = sum + abs( ap( i ) )
248 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
251 ELSE IF(
lsame( norm,
'I' ) )
THEN
256 IF(
lsame( uplo,
'U' ) )
THEN
257 IF(
lsame( diag,
'U' ) )
THEN
263 work( i ) = work( i ) + abs( ap( k ) )
274 work( i ) = work( i ) + abs( ap( k ) )
280 IF(
lsame( diag,
'U' ) )
THEN
287 work( i ) = work( i ) + abs( ap( k ) )
297 work( i ) = work( i ) + abs( ap( k ) )
306 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
308 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
312 IF(
lsame( uplo,
'U' ) )
THEN
313 IF(
lsame( diag,
'U' ) )
THEN
318 CALL
classq( j-1, ap( k ), 1, scale, sum )
326 CALL
classq( j, ap( k ), 1, scale, sum )
331 IF(
lsame( diag,
'U' ) )
THEN
336 CALL
classq( n-j, ap( k ), 1, scale, sum )
344 CALL
classq( n-j+1, ap( k ), 1, scale, sum )
349 value = scale*sqrt( sum )