SDOTI/DDOTI/CDOTCI/CDOTUI/ZDOTCI/ZDOTUI

Sparse dot product

Output

s

The resulting value of the dot product. If m 0 , then

 

 

s = 0 . Otherwise,

 

m

s= x(i) ⋅ y(indx(i))

i= 1

unless the subprogram name is CDOTCI or ZDOTCI, in which case

Fortran Equivalent

m

s= CONJG(x(i)) ⋅ y(indx(i))

i= 1

REAL*4 FUNCTION SDOTI (M, X,INDX, Y) REAL*4 X(*),Y(*)

INTEGER*4 INDX(*) SDOTI = 0.0

IF ( M .LE. 0 ) RETURN DO 10 I = 1, M

SDOTI = SDOTI + X(I) * Y(INDX(I))

10CONTINUE RETURN END

90HP MLIB User’s Guide