Sparse dot product

SDOTI/DDOTI/CDOTCI/CDOTUI/ZDOTCI/ZDOTUI

 

INTEGER*4

m, indx(m)

 

COMPLEX*16

s, ZDOTUI, x(m), y(n)

 

s = ZDOTUI(m, x, indx, y)

 

VECLIB8:

 

 

INTEGER*8

m, indx(m)

 

REAL*4

s, SDOTI, x(m), y(n)

 

s = SDOTI(m, x, indx, y)

 

INTEGER*8

m, indx(m)

 

REAL*8

s, DDOTI, x(m), y(n)

 

s = DDOTI(m, x, indx, y)

 

INTEGER*8

m, indx(m)

 

COMPLEX*8

s, CDOTCI, x(m), y(n)

 

s = CDOTCI(m, x, indx, y)

 

INTEGER*8

m, indx(m)

 

COMPLEX*8

s, CDOTUI, x(m), y(n)

 

s = CDOTUI(m, x, indx, y)

 

INTEGER*8

m, indx(m)

 

COMPLEX*16

s, ZDOTCI, x(m), y(n)

 

s = ZDOTCI(m, x, indx, y)

 

INTEGER*8

m, indx(m)

 

COMPLEX*16

s, ZDOTUI, x(m), y(n)

 

s = ZDOTUI(m, x, indx, y)

Input

m

Number of interesting elements of x, m n. If m ≤ 0,

 

 

the subprograms do not reference x, indx, or y.

 

x

Array of length m containing the interesting elements

 

 

of x. x is used in conjugated form by CDOTCI and

 

 

ZDOTCI and in unconjugated form by the other

 

 

subprograms.

 

indx

Array containing the indices {ki} of the interesting

 

 

elements of x. The indices must satisfy

 

 

1 indx(i) ≤ n, i = 1, 2, …, m,

 

 

where n is the length of y.

 

y

Array containing the elements of y, y(i) = yi .

Chapter 2 Basic Vector Operations 89