Scaled vector accumulation

F_SAXPBY/F_DAXPBY/F_CAXPBY/F_ZAXPBY

Name

F_SAXPBY/F_DAXPBY/F_CAXPBY/F_ZAXPBY

 

Scaled vector accumulation

Purpose

F_xAXPBY scales the vector x by α and the vector y by β, adds these two

 

vectors, and stores the result in the vector y. If n is less than or equal to zero, or

 

if α is equal to zero and β is equal to one, the routine returns immediately.

 

 

y ← αx + βy

Usage

VECLIB:

 

 

INTEGER*4

INCX, INCY, N

 

REAL*4

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

 

SUBROUTINE F_SAXPBY (N, ALPHA, X, INCX, BETA, Y, INCY)

 

INTEGER*4

INCX, INCY, N

 

REAL*8

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

 

SUBROUTINE F_DAXPBY (N, ALPHA, X, INCX, BETA, Y, INCY)

 

INTEGER*4

INCX, INCY, N

 

COMPLEX*8

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

 

SUBROUTINE F_CAXPBY (N, ALPHA, X, INCX, BETA, Y, INCY)

 

INTEGER*4

INCX, INCY, N

 

COMPLEX*16

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

 

SUBROUTINE F_ZAXPBY (N, ALPHA, X, INCX, BETA, Y, INCY)

 

VECLIB8:

 

 

INTEGER*8

INCX, INCY, N

 

REAL*4

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

 

SUBROUTINE F_SAXPBY (N, ALPHA, X, INCX, BETA, Y, INCY)

 

INTEGER*8

INCX, INCY, N

 

REAL*8

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

 

SUBROUTINE F_DAXPBY (N, ALPHA, X, INCX, BETA, Y, INCY)

 

INTEGER*8

INCX, INCY, N

 

COMPLEX*8

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

 

SUBROUTINE F_CAXPBY (N, ALPHA, X, INCX, BETA, Y, INCY)

 

INTEGER*8

INCX, INCY, N

 

COMPLEX*16

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

 

SUBROUTINE F_ZAXPBY (N, ALPHA, X, INCX, BETA, Y, INCY)

Input

N

Number of elements of vector x.

Chapter 2 Basic Vector Operations 161