CXML

sgthrs, dgthrs, cgthrs, zgthrs 


FORMAT

  {S,D,C,Z}GTHRS ( nz, alpha, y, x, indx )

Arguments

  nz                  integer*4
                      On entry, the number of elements to be gathered into
                      the compressed form.
                      On exit, nz is unchanged.

  alpha               real*4 | real*8 | complex*8 | complex*16
                      On entry, the scalar multiplier for the elements of
                      vector y.
                      On exit, alpha is unchanged.

  y                   real*4 | real*8 | complex*8 | complex*16
                      On entry, an array of the elements of vector y stored
                      in full form.
                      On exit, y is unchanged.  Only the elements in the
                      vector y corresponding to the indices in the INDX array
                      are accessed.

  x                   real*4 | real*8 | complex*8 | complex*16
                      On entry, an array that receives the specified elements
                      of vector y after scaling.
                      On exit, if nz <= 0, x is unchanged. If nz > 0,  the
                      array X contains the specified elements of vector y
                      after scaling by the scalar, alpha.

  indx                integer*4
                      On entry, an array containing the indices of the values
                      to be gathered into compressed form.
                      On exit, indx is unchanged.

Description

  The _GTHRS subprograms gather specified elements of vector y in full form,
  multiply the elements by alpha, and store the result as elements of a
  sparse vector x in compressed form.

  For i=1,..., nz:

  x(i)  =  alpha * y(indx(i))

  If nz <= 0, x is unchanged.

  SGTHRS and DGTHRS gather the elements from a real vector in full storage
  and scale them into a real vector in compressed storage.  CGTHRS and ZGTHRS
  gather the specified elements from a complex vector in full storage and
  scale them into a complex vector in compressed storage.

  The _GTHRS subprograms are not part of the original set of Sparse BLAS
  Level 1 subprograms.

Example

  INTEGER NZ, INDX(10)
  REAL*8 Y(40), X(10), ALPHA
  NZ = 10
  ALPHA = 1.5D0
  CALL DGTHRS(NZ, ALPHA, Y, X, INDX)

  This FORTRAN code shows how the nz  elements  of  the  vector y,
  corresponding to the indices in  the INDX array, are scaled by the scalar
  alpha and gathered in a compressed form into the vector x.

CXML Home Page

Index of CXML Routines