OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
Auxiliary BLAS

Functions

integer function icamax (n, cx, incx)
 ICAMAX
integer function idamax (n, dx, incx)
 IDAMAX
integer function isamax (n, sx, incx)
 ISAMAX
integer function izamax (n, zx, incx)
 IZAMAX
logical function lsame (ca, cb)
 LSAME
subroutine xerbla (srname, info)
 XERBLA
subroutine xerbla_array (srname_array, srname_len, info)
 XERBLA_ARRAY

Detailed Description

This is the group of Auxiliary 3 BLAS routines.

Function Documentation

◆ icamax()

integer function icamax ( integer n,
complex, dimension(*) cx,
integer incx )

ICAMAX

Purpose:
!>
!>    ICAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)|
!> 
Parameters
[in]N
!>          N is INTEGER
!>         number of elements in input vector(s)
!> 
[in]CX
!>          CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
!> 
[in]INCX
!>          INCX is INTEGER
!>         storage spacing between elements of CX
!> 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Further Details:
!>
!>     jack dongarra, linpack, 3/11/78.
!>     modified 3/93 to return if incx .le. 0.
!>     modified 12/3/93, array(1) declarations changed to array(*)
!> 

Definition at line 70 of file icamax.f.

71*
72* -- Reference BLAS level1 routine --
73* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
74* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
75*
76* .. Scalar Arguments ..
77 INTEGER INCX,N
78* ..
79* .. Array Arguments ..
80 COMPLEX CX(*)
81* ..
82*
83* =====================================================================
84*
85* .. Local Scalars ..
86 REAL SMAX
87 INTEGER I,IX
88* ..
89* .. External Functions ..
90 REAL SCABS1
91 EXTERNAL scabs1
92* ..
93 icamax = 0
94 IF (n.LT.1 .OR. incx.LE.0) RETURN
95 icamax = 1
96 IF (n.EQ.1) RETURN
97 IF (incx.EQ.1) THEN
98*
99* code for increment equal to 1
100*
101 smax = scabs1(cx(1))
102 DO i = 2,n
103 IF (scabs1(cx(i)).GT.smax) THEN
104 icamax = i
105 smax = scabs1(cx(i))
106 END IF
107 END DO
108 ELSE
109*
110* code for increment not equal to 1
111*
112 ix = 1
113 smax = scabs1(cx(1))
114 ix = ix + incx
115 DO i = 2,n
116 IF (scabs1(cx(ix)).GT.smax) THEN
117 icamax = i
118 smax = scabs1(cx(ix))
119 END IF
120 ix = ix + incx
121 END DO
122 END IF
123 RETURN
124*
125* End of ICAMAX
126*
integer function icamax(n, cx, incx)
ICAMAX
Definition icamax.f:71
real function scabs1(z)
SCABS1
Definition scabs1.f:46

◆ idamax()

integer function idamax ( integer n,
double precision, dimension(*) dx,
integer incx )

IDAMAX

Purpose:
!>
!>    IDAMAX finds the index of the first element having maximum absolute value.
!> 
Parameters
[in]N
!>          N is INTEGER
!>         number of elements in input vector(s)
!> 
[in]DX
!>          DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
!> 
[in]INCX
!>          INCX is INTEGER
!>         storage spacing between elements of DX
!> 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Further Details:
!>
!>     jack dongarra, linpack, 3/11/78.
!>     modified 3/93 to return if incx .le. 0.
!>     modified 12/3/93, array(1) declarations changed to array(*)
!> 

Definition at line 70 of file idamax.f.

71*
72* -- Reference BLAS level1 routine --
73* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
74* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
75*
76* .. Scalar Arguments ..
77 INTEGER INCX,N
78* ..
79* .. Array Arguments ..
80 DOUBLE PRECISION DX(*)
81* ..
82*
83* =====================================================================
84*
85* .. Local Scalars ..
86 DOUBLE PRECISION DMAX
87 INTEGER I,IX
88* ..
89* .. Intrinsic Functions ..
90 INTRINSIC dabs
91* ..
92 idamax = 0
93 IF (n.LT.1 .OR. incx.LE.0) RETURN
94 idamax = 1
95 IF (n.EQ.1) RETURN
96 IF (incx.EQ.1) THEN
97*
98* code for increment equal to 1
99*
100 dmax = dabs(dx(1))
101 DO i = 2,n
102 IF (dabs(dx(i)).GT.dmax) THEN
103 idamax = i
104 dmax = dabs(dx(i))
105 END IF
106 END DO
107 ELSE
108*
109* code for increment not equal to 1
110*
111 ix = 1
112 dmax = dabs(dx(1))
113 ix = ix + incx
114 DO i = 2,n
115 IF (dabs(dx(ix)).GT.dmax) THEN
116 idamax = i
117 dmax = dabs(dx(ix))
118 END IF
119 ix = ix + incx
120 END DO
121 END IF
122 RETURN
123*
124* End of IDAMAX
125*
integer function idamax(n, dx, incx)
IDAMAX
Definition idamax.f:71

◆ isamax()

integer function isamax ( integer n,
real, dimension(*) sx,
integer incx )

ISAMAX

Purpose:
!>
!>    ISAMAX finds the index of the first element having maximum absolute value.
!> 
Parameters
[in]N
!>          N is INTEGER
!>         number of elements in input vector(s)
!> 
[in]SX
!>          SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
!> 
[in]INCX
!>          INCX is INTEGER
!>         storage spacing between elements of SX
!> 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Further Details:
!>
!>     jack dongarra, linpack, 3/11/78.
!>     modified 3/93 to return if incx .le. 0.
!>     modified 12/3/93, array(1) declarations changed to array(*)
!> 

Definition at line 70 of file isamax.f.

71*
72* -- Reference BLAS level1 routine --
73* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
74* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
75*
76* .. Scalar Arguments ..
77 INTEGER INCX,N
78* ..
79* .. Array Arguments ..
80 REAL SX(*)
81* ..
82*
83* =====================================================================
84*
85* .. Local Scalars ..
86 REAL SMAX
87 INTEGER I,IX
88* ..
89* .. Intrinsic Functions ..
90 INTRINSIC abs
91* ..
92 isamax = 0
93 IF (n.LT.1 .OR. incx.LE.0) RETURN
94 isamax = 1
95 IF (n.EQ.1) RETURN
96 IF (incx.EQ.1) THEN
97*
98* code for increment equal to 1
99*
100 smax = abs(sx(1))
101 DO i = 2,n
102 IF (abs(sx(i)).GT.smax) THEN
103 isamax = i
104 smax = abs(sx(i))
105 END IF
106 END DO
107 ELSE
108*
109* code for increment not equal to 1
110*
111 ix = 1
112 smax = abs(sx(1))
113 ix = ix + incx
114 DO i = 2,n
115 IF (abs(sx(ix)).GT.smax) THEN
116 isamax = i
117 smax = abs(sx(ix))
118 END IF
119 ix = ix + incx
120 END DO
121 END IF
122 RETURN
123*
124* End of ISAMAX
125*
integer function isamax(n, sx, incx)
ISAMAX
Definition isamax.f:71

◆ izamax()

integer function izamax ( integer n,
complex*16, dimension(*) zx,
integer incx )

IZAMAX

Purpose:
!>
!>    IZAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)|
!> 
Parameters
[in]N
!>          N is INTEGER
!>         number of elements in input vector(s)
!> 
[in]ZX
!>          ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
!> 
[in]INCX
!>          INCX is INTEGER
!>         storage spacing between elements of ZX
!> 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Further Details:
!>
!>     jack dongarra, 1/15/85.
!>     modified 3/93 to return if incx .le. 0.
!>     modified 12/3/93, array(1) declarations changed to array(*)
!> 

Definition at line 70 of file izamax.f.

71*
72* -- Reference BLAS level1 routine --
73* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
74* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
75*
76* .. Scalar Arguments ..
77 INTEGER INCX,N
78* ..
79* .. Array Arguments ..
80 COMPLEX*16 ZX(*)
81* ..
82*
83* =====================================================================
84*
85* .. Local Scalars ..
86 DOUBLE PRECISION DMAX
87 INTEGER I,IX
88* ..
89* .. External Functions ..
90 DOUBLE PRECISION DCABS1
91 EXTERNAL dcabs1
92* ..
93 izamax = 0
94 IF (n.LT.1 .OR. incx.LE.0) RETURN
95 izamax = 1
96 IF (n.EQ.1) RETURN
97 IF (incx.EQ.1) THEN
98*
99* code for increment equal to 1
100*
101 dmax = dcabs1(zx(1))
102 DO i = 2,n
103 IF (dcabs1(zx(i)).GT.dmax) THEN
104 izamax = i
105 dmax = dcabs1(zx(i))
106 END IF
107 END DO
108 ELSE
109*
110* code for increment not equal to 1
111*
112 ix = 1
113 dmax = dcabs1(zx(1))
114 ix = ix + incx
115 DO i = 2,n
116 IF (dcabs1(zx(ix)).GT.dmax) THEN
117 izamax = i
118 dmax = dcabs1(zx(ix))
119 END IF
120 ix = ix + incx
121 END DO
122 END IF
123 RETURN
124*
125* End of IZAMAX
126*
integer function izamax(n, zx, incx)
IZAMAX
Definition izamax.f:71
double precision function dcabs1(z)
DCABS1
Definition dcabs1.f:47

◆ lsame()

logical function lsame ( character ca,
character cb )

LSAME

Purpose:
!>
!> LSAME returns .TRUE. if CA is the same letter as CB regardless of
!> case.
!> 
Parameters
[in]CA
!>          CA is CHARACTER*1
!> 
[in]CB
!>          CB is CHARACTER*1
!>          CA and CB specify the single characters to be compared.
!> 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 52 of file lsame.f.

53*
54* -- Reference BLAS level1 routine --
55* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
56* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
57*
58* .. Scalar Arguments ..
59 CHARACTER CA,CB
60* ..
61*
62* =====================================================================
63*
64* .. Intrinsic Functions ..
65 INTRINSIC ichar
66* ..
67* .. Local Scalars ..
68 INTEGER INTA,INTB,ZCODE
69* ..
70*
71* Test if the characters are equal
72*
73 lsame = ca .EQ. cb
74 IF (lsame) RETURN
75*
76* Now test for equivalence if both characters are alphabetic.
77*
78 zcode = ichar('Z')
79*
80* Use 'Z' rather than 'A' so that ASCII can be detected on Prime
81* machines, on which ICHAR returns a value with bit 8 set.
82* ICHAR('A') on Prime machines returns 193 which is the same as
83* ICHAR('A') on an EBCDIC machine.
84*
85 inta = ichar(ca)
86 intb = ichar(cb)
87*
88 IF (zcode.EQ.90 .OR. zcode.EQ.122) THEN
89*
90* ASCII is assumed - ZCODE is the ASCII code of either lower or
91* upper case 'Z'.
92*
93 IF (inta.GE.97 .AND. inta.LE.122) inta = inta - 32
94 IF (intb.GE.97 .AND. intb.LE.122) intb = intb - 32
95*
96 ELSE IF (zcode.EQ.233 .OR. zcode.EQ.169) THEN
97*
98* EBCDIC is assumed - ZCODE is the EBCDIC code of either lower or
99* upper case 'Z'.
100*
101 IF (inta.GE.129 .AND. inta.LE.137 .OR.
102 + inta.GE.145 .AND. inta.LE.153 .OR.
103 + inta.GE.162 .AND. inta.LE.169) inta = inta + 64
104 IF (intb.GE.129 .AND. intb.LE.137 .OR.
105 + intb.GE.145 .AND. intb.LE.153 .OR.
106 + intb.GE.162 .AND. intb.LE.169) intb = intb + 64
107*
108 ELSE IF (zcode.EQ.218 .OR. zcode.EQ.250) THEN
109*
110* ASCII is assumed, on Prime machines - ZCODE is the ASCII code
111* plus 128 of either lower or upper case 'Z'.
112*
113 IF (inta.GE.225 .AND. inta.LE.250) inta = inta - 32
114 IF (intb.GE.225 .AND. intb.LE.250) intb = intb - 32
115 END IF
116 lsame = inta .EQ. intb
117*
118* RETURN
119*
120* End of LSAME
121*
logical function lsame(ca, cb)
LSAME
Definition lsame.f:53

◆ xerbla()

subroutine xerbla ( character*(*) srname,
integer info )

XERBLA

Purpose:
!>
!> XERBLA  is an error handler for the LAPACK routines.
!> It is called by an LAPACK routine if an input parameter has an
!> invalid value.  A message is printed and execution stops.
!>
!> Installers may consider modifying the STOP statement in order to
!> call system-specific exception-handling facilities.
!> 
Parameters
[in]SRNAME
!>          SRNAME is CHARACTER*(*)
!>          The name of the routine which called XERBLA.
!> 
[in]INFO
!>          INFO is INTEGER
!>          The position of the invalid parameter in the parameter list
!>          of the calling routine.
!> 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 59 of file xerbla.f.

60*
61* -- Reference BLAS level1 routine --
62* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
63* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
64*
65* .. Scalar Arguments ..
66 CHARACTER*(*) SRNAME
67 INTEGER INFO
68* ..
69*
70* =====================================================================
71*
72* .. Intrinsic Functions ..
73 INTRINSIC len_trim
74* ..
75* .. Executable Statements ..
76*
77 WRITE( *, fmt = 9999 )srname( 1:len_trim( srname ) ), info
78*
79 stop
80*
81 9999 FORMAT( ' ** On entry to ', a, ' parameter number ', i2, ' had ',
82 $ 'an illegal value' )
83*
84* End of XERBLA
85*

◆ xerbla_array()

subroutine xerbla_array ( character(1), dimension(srname_len) srname_array,
integer srname_len,
integer info )

XERBLA_ARRAY

Purpose:
!>
!> XERBLA_ARRAY assists other languages in calling XERBLA, the LAPACK
!> and BLAS error handler.  Rather than taking a Fortran string argument
!> as the function's name, XERBLA_ARRAY takes an array of single
!> characters along with the array's length.  XERBLA_ARRAY then copies
!> up to 32 characters of that array into a Fortran string and passes
!> that to XERBLA.  If called with a non-positive SRNAME_LEN,
!> XERBLA_ARRAY will call XERBLA with a string of all blank characters.
!>
!> Say some macro or other device makes XERBLA_ARRAY available to C99
!> by a name lapack_xerbla and with a common Fortran calling convention.
!> Then a C99 program could invoke XERBLA via:
!>    {
!>      int flen = strlen(__func__);
!>      lapack_xerbla(__func__, &flen, &info);
!>    }
!>
!> Providing XERBLA_ARRAY is not necessary for intercepting LAPACK
!> errors.  XERBLA_ARRAY calls XERBLA.
!> 
Parameters
[in]SRNAME_ARRAY
!>          SRNAME_ARRAY is CHARACTER(1) array, dimension (SRNAME_LEN)
!>          The name of the routine which called XERBLA_ARRAY.
!> 
[in]SRNAME_LEN
!>          SRNAME_LEN is INTEGER
!>          The length of the name in SRNAME_ARRAY.
!> 
[in]INFO
!>          INFO is INTEGER
!>          The position of the invalid parameter in the parameter list
!>          of the calling routine.
!> 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 79 of file xerbla_array.f.

80*
81* -- Reference BLAS level1 routine --
82* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
83* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
84*
85* .. Scalar Arguments ..
86 INTEGER SRNAME_LEN, INFO
87* ..
88* .. Array Arguments ..
89 CHARACTER(1) SRNAME_ARRAY(SRNAME_LEN)
90* ..
91*
92* =====================================================================
93*
94* ..
95* .. Local Scalars ..
96 INTEGER I
97* ..
98* .. Local Arrays ..
99 CHARACTER*32 SRNAME
100* ..
101* .. Intrinsic Functions ..
102 INTRINSIC min, len
103* ..
104* .. External Functions ..
105 EXTERNAL xerbla
106* ..
107* .. Executable Statements ..
108 srname = ''
109 DO i = 1, min( srname_len, len( srname ) )
110 srname( i:i ) = srname_array( i )
111 END DO
112
113 CALL xerbla( srname, info )
114
115 RETURN
116*
117* End of XERBLA_ARRAY
118*
subroutine xerbla(srname, info)
XERBLA
Definition xerbla.f:60
#define min(a, b)
Definition macros.h:20