• Keine Ergebnisse gefunden

These routines are available to users of both the COS and UNICOS operating systems

SR-0113 4-38

C

SCAITER(3SCI) SCA ITER (3SCI)

NAME

SCATTER - ScaUers a vector into another vector SYNOPSIS

CALL SCATTER(n,Q,index,b) DESCRIPTION

n

Number of elements in vectors

index

and b

a

Output vector

index

Vector of indexes

b Source vector

SCATTER is defined in the following way:

ajj = b; where i = I, 0 0 0 ' n In Fortran:

A(INDEX(I) )=B(I) where I

=

I, ... , N IMPLEMENTATION

This routine is available to users of both the COS and UNICOS operating systems.

SR-OI13 4-39

c

SCOPY(3SCI)

NAME

SCOPY, CCOPY - Copies a real or complex vector into another vector SYNOPSIS

CALL SCOPY(n,sx,incx,sy,incy) CALL CCOPY(n,cx,incx,cy,incy) DESCRIPTION

SCOPY(3SCI)

n

Number of elements in the vector to be copied. If

n

S 0, SCOPY and CCOPY return without any computation.

sx Real vector to be copied cx Complex vector to be copied

incx Increment between elements of sx or cx; for contiguous elements, incx=±l.

sy

Real result vector cy Complex result vector

incy Increment between elements of sy or cy; for contiguous elements, incy =±l.

These subroutines copy one vector into another.

SCOPY copies a real vector

{

l+(i-l)(inCX), incx>O {l+(i-l)(incy ), incy>O Ylj

=

Xkj , i

=

1, ... ,n where ki = 1 +(n -i ) I incx I , incx <0 and Ii = 1 +(n -i ) I incy I , incy <0 and Xk. and y,. are elements of real vectors.

I I

CCOPY copies a complex vector

y,.

= Xk. , i= 1, ...

,n

where ki and Ii are as defined above and Xk. and

y,.

are elements of complex

I I I I

vectors.

IMPLEMENTATION

These routines are available to users of both the COS and UNICOS systems.

SR-0113 4-40 C

SGBMV(3SCI) SGBMV (3SCI)

SGBMV performs one of the matrix-vector operations y:=alpha*a*x+beta*y or y:=alpha*d*x+beta*y

Arguments alpha and beta are scalars, x and y are vectors, a is an m-by-n band matrix, with kl sub-diagonals and ku super-sub-diagonals, and a' denotes the transpose of a.

trans Character*1. On entry, trans specifies the operation to be performed. If trans='N' or 'n',

alpha Real. On entry, alpha specifies the scalar alpha. The alpha argument is unchanged on exit.

a Real array of dimension (lda,n). Before entry, the leading (kl + ku + l)-by-n part of the array a must contain the matrix of coefficients, supplied column-by-column, with the leading diago-nal of the matrix in row (ku + 1) of the array, the first superdiagonal starting at position 2 in row ku, the first subdiagonal starting at position 1 in row (ku + 2), and so on. Elements in the array a that do not correspond to elements in the band matrix (such as the top left ku-by-ku tri-angle) are not referenced. The following program segment will transfer a band matrix from conventional full matrix storage to band storage:

DO 20, I=I,N (l+(m-l)*abs(incx» otherwise. Before entry, the incremented array x must contain the vector

x.

The

x

argument is unchanged on exit.

4-41 C

SGBMV(3SCI) SGBMV(3SCI)

NOTE

SR-Ol13

incx Integer. On entry, incx specifies the increment for the elements of x. incx must not be zero.

The incx argument is unchanged on exit

beta Real. On entry, beta specifies the scalar beta. When beta is supplied as zero, y need not be set on input The beta argument is unchanged on exit.

y Real array of dimension at least (l+(m-l)*abs(incy» when trans='N' or 'n' and at least (l+(n-l)* abs(incy» otherwise. Before entry, the incremented array y must contain the vector y. On exit, y is overwritten by the updated vector y.

incy Integer. On entry, incy specifies the increment for the elements of y. incy must not be zero.

The incy argument is unchanged on exit.

The SGBMV routine is a level 2 Basic Linear Algebra Subroutine (BLAS2).

4-42

c

SGEMV(3SCI) SGEMV (3SCI)

SGEMV performs one of the matrix-vector operations

y:= alpha*a*x

+

beta*y,

or

y:= alpha*a'*x

+

bela*y,

alpha

Real. On entry,

alpha

specifies the scalar alpha. The

alpha

argument is unchanged on exit.

a

Real array of dimension

(lda,n).

Before entry, the leading

m

by n part of the array

a

must contain the matrix of coefficients. The a argument is unchanged on exit.

Ida

Integer. On entry,

Ida

specifies the first dimension of

a

as declared in the calling subprogram.

Ida

must be at least max(l,m). The

Ida

argument is unchanged on exit.

x

Real array of dimension at least ( 1 +

(n - l)*abs(incx»

when

trans='N'

or 'n' and at least ( 1 +

(m-l)*abs(incx»

otherwise. Before entry, the incremented array

x

must contain the vector

x.

The

x

argument is unchanged on exit.

incx

Integer. On entry,

incx

specifies the increment for the elements of

x. incx

must not be zero. The

incx

argument is unchanged on exit.

beta

Real. On entry,

beta

specifies the scalar beta. When

beta

is supplied as zero then

y

need not be set on input. The

beta

argument is unchanged on exit.

y Real array of dimension at least ( 1 + (m - 1 )*absCincy» when trans='N' or 'n' and at least ( 1 + (n - 1

)*abs(incy»

otherwise. Before entry with

beta

nonzero, the incremented array

y

must contain the vector

y.

On exit,

y

is overwritten by the updated vector

y.

incy

Integer. On entry,

incy

specifies the increment for the elements of

y. incy

must not be zero. The

incy

argument is unchanged on exit.

The SGEMV routine is a level 2 Basic Linear Algebra Subroutine (BLAS2).

4-43 C

SGER(3SCI) SGER(3SCI)

alpha

Real. On entry,

alpha

specifies the scalar alpha. Unchanged on exit.

x

Real. Array of dimension at least ( 1 +

(m -

1

)*abs(incx».

Before entry, the incremented array

x

a

Real array of dimension

(/da,n).

Before entry, the leading m-by-n part of the array

a

must contain the matrix of coefficients. On exit, a is overwritten by the updated matrix.

Ida Integer. On entry, Ida specifies the first dimension of a as declared in the calling subprogram. Ida must be at least max(1,m). Unchanged on exit

The SGER routine is a level 2 Basic Linear Algebra Subroutine (BLAS2).

4-44

c

SMXPY (3SCI) SMXPY(3SCI)

NAME

SMXPY - Computes the product of a column vector and a matrix and adds the result to another column vector

SYNOPSIS

CALL SMXPY(nl,y,n2,ldm,x,m) DESCRIPTION

nl Number of elements in the vector y

y

Real vector

n2 Number of elements in the vector x ldm Leading dimension of matrix m

x

Real vector

m Matrix

SMXPY executes an operation equivalent to the following Fortran code:

SUBROUTINE SMXPY(Nl,Y,N2,LDM,X,M) REAL Y(1), X(l), M(LDM,l)

DO 20 J=1,N2

DO 20 I=l,Nl

Y(I)=Y(I) + X(J)

*

M(lJ)

20 CONTINUE RETURN

END

IMPLEMENTATION

This routine is available to users of both the COS and UNICOS operating systems.

SR-0113 4-45 C

SNRM2 (3SCI)

NAME

SNRM2, SCNRM2 - Computes the Euclidean norm of a vector SYNOPSIS

euenorm=SNRM2(n,sx,inex) euenorm=SCNRM2(n,cx,incx) DESCRIPTION

SNRM2 (3SCI)

n

Number of elements in the vector. If n ~ 0, SNRM2 and SCNRM2 return without any com-putation.

sx Real vector operand ex Complex vector operand

incx Skip distance between elements of sx or ex

These real functions compute the Euclidean or

12

norm of a vector.

SNRM2 computes

eucnorm

=

[~ x 7]t

where Xi is an element of a real vector. SCNRM2 computes

[

n

]1

eucnorm = ~ Xi

Xi

2

&=1

where Xi is a complex vector and

Xi

is the complex conjugate of Xi.

IMPLEMENTATION

These routines are available to users of both the COS and UNICOS operating systems.

SR-Ol13 4-46 C

SOLR(3SCI) SOLR(3SCI)

NAME

SOLR, SOLRN, SOLR3 -

Solves second-order linear recurrences