Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

?axpby

Scales two vectors, adds them to one another and stores result in the vector.

Syntax

call saxpby(n, a, x, incx, b, y, incy)

call daxpby(n, a, x, incx, b, y, incy)

call caxpby(n, a, x, incx, b, y, incy)

call zaxpby(n, a, x, incx, b, y, incy)

call axpby(x, y [,a] [,b])

Include Files
  • mkl.fi, blas.f90
Description

The ?axpby routines perform a vector-vector operation defined as

y := a*x + b*y

where:

a and b are scalars

x and y are vectors each with n elements.

Input Parameters
n

INTEGER. Specifies the number of elements in vectors x and y.

a

REAL for saxpby

DOUBLE PRECISION for daxpby

COMPLEX for caxpby

DOUBLE COMPLEX for zaxpby

Specifies the scalar a.

x

REAL for saxpby

DOUBLE PRECISION for daxpby

COMPLEX for caxpby

DOUBLE COMPLEX for zaxpby

Array, size at least (1 + (n-1)*abs(incx)).

incx

INTEGER. Specifies the increment for the elements of x.

b

REAL for saxpby

DOUBLE PRECISION for daxpby

COMPLEX for caxpby

DOUBLE COMPLEX for zaxpby

Specifies the scalar b.

y

REAL for saxpby

DOUBLE PRECISION for daxpby

COMPLEX for caxpby

DOUBLE COMPLEX for zaxpby

Array, size at least (1 + (n-1)*abs(incy)).

incy

INTEGER. Specifies the increment for the elements of y.

Output Parameters
y

Contains the updated vector y.

Example

For examples of routine usage, see these code examples in the Intel® oneAPI Math Kernel Library installation directory:

  • saxpby: examples\blas\source\saxpbyx.f

  • daxpby: examples\blas\source\daxpbyx.f

  • caxpby: examples\blas\source\caxpbyx.f

  • zaxpby: examples\blas\source\zaxpbyx.f

BLAS 95 Interface Notes

Routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or reconstructible arguments, see BLAS 95 Interface Conventions.

Specific details for the routine axpby interface are the following:

x

Holds the array of size n.

y

Holds the array of size n.

a

The default value is 1.

b

The default value is 1.