Add scaled dot product

F_SDOT/F_DDOT/F_CDOT/F_ZDOT

Name

F_SDOT/F_DDOT/F_CDOT/F_ZDOT

 

Add scaled dot product

 

 

 

Purpose

F_xDOT adds the scaled dot product of two vectors x and y into a scaled

 

scalar r. The routine returns immediately if n is less than zero, or, if β is equal

 

to one and either α or n is equal to zero. If α is equal to zero then x and y are not

 

read. Similarly, if β is equal to zero, r is not referenced.

 

When x and y are complex vectors, the vector components xi are used

 

unconjugated or conjugated as specified by the operator argument conj. If x and

 

y are real vectors, the operator argument conj has no effect.

 

 

n – 1

 

 

r ← βr + αxT y= βr + α xi yi

 

 

i = 0

 

 

n – 1

 

 

r ← βr + αxH y= βr + α

 

 

 

 

xi yi

 

 

i = 0

Usage

VECLIB:

 

 

 

 

INTEGER*4

CONJ, INCX, INCY, N

 

REAL*4

ALPHA, BETA, R, X( * ), Y( * )

 

SUBROUTINE F_SDOT (CONJ, N, ALPHA, X, INCX, BETA, Y, INCY, R)

 

INTEGER*4

CONJ, INCX, INCY, N

 

REAL*8

ALPHA, BETA, R, X( * ), Y( * )

 

SUBROUTINE F_DDOT (CONJ, N, ALPHA, X, INCX, BETA, Y, INCY, R)

 

INTEGER*4

CONJ, INCX, INCY, N

 

COMPLEX*8

ALPHA, BETA, R, X( * ), Y( * )

 

SUBROUTINE F_CDOT (CONJ, N, ALPHA, X, INCX, BETA, Y, INCY, R)

 

INTEGER*4

CONJ, INCX, INCY, N

 

COMPLEX*16

ALPHA, BETA, R, X( * ), Y( * )

SUBROUTINE F_ZDOT (CONJ, N, ALPHA, X, INCX, BETA, Y, INCY, R)

VECLIB8:

INTEGER*8

CONJ, INCX, INCY, N

REAL*4

ALPHA, BETA, R, X( * ), Y( * )

SUBROUTINE F_SDOT (CONJ, N, ALPHA, X, INCX, BETA, Y, INCY, R)

Chapter 2 Basic Vector Operations 169