SDOT/DDOT/CDOTC/CDOTU/ZDOTC/ZDOTU |
|
|
| Dot product | |
| x | Array of length lenx = (n−1)⋅incx+1 containing the | |||
|
| ||||
|
| ZDOTC and in unconjugated form by the other | |||
|
| subprograms. |
| ||
| incx | Increment for the array x: | |||
|
| incx ≥ 0 | x is stored forward in array x; that is, | ||
|
|
|
|
| xi is stored in x((i−1)⋅incx+1). |
|
| incx < 0 | x is stored backward in array x; that | ||
|
|
|
|
| is, xi is stored in x((i−n)⋅incx+1). |
|
| Use incx = 1 if the vector x is stored contiguously in | |||
|
| array x; that is, if xi is stored in x(i). Refer to “BLAS | |||
|
| Indexing Conventions” in the introduction to this | |||
|
| chapter. |
| ||
| y | Array of length leny = (n−1)⋅incy+1 containing the | |||
|
|
| |||
| incy | Increment for the array y: | |||
|
| incy ≥ 0 | y is stored forward in array y; that is, | ||
|
|
|
|
| yi is stored in y((i−1)⋅incy+1). |
|
| incy < 0 | y is stored backward in array y; that | ||
|
|
|
|
| is, yi is stored in y((i−n)⋅incy+1). |
|
| Use incy = 1 if the vector y is stored contiguously in | |||
|
| array y; that is, if yi is stored in y(i). Refer to “BLAS | |||
|
| Indexing Conventions” in the introduction to this | |||
|
| chapter. |
| ||
| res | Pointer to output (for use with Intel compilers only). | |||
Output | s | The resulting value of the dot product. If n ≤ 0 , then | |||
|
| s = 0 . Otherwise, | |||
|
| n |
| ||
|
| s = ∑ xi yi |
| ||
|
| i = 1 |
| ||
|
| unless the subprogram name is CDOTC or ZDOTC, in | |||
|
| which case |
| ||
|
| n |
| ||
|
| s = ∑ | x | i yi |
|
|
| i = 1 |
| ||
Notes | If incx = 0, then xi = x(1) for all i. If incy = 0, then yi = y(1) for all i. In either | ||||
| of these cases, another VECLIB subprogram would be more efficient. |
86HP MLIB User’s Guide