Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 3/31/2023
Public

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

Document Table of Contents

?axpy

Computes a vector-scalar product and adds the result to a vector.

Syntax

call saxpy(n, a, x, incx, y, incy)

call daxpy(n, a, x, incx, y, incy)

call caxpy(n, a, x, incx, y, incy)

call zaxpy(n, a, x, incx, y, incy)

call axpy(x, y [,a])

Include Files
  • mkl.fi, blas.f90
Description

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

y := a*x + y

where:

a is a scalar

x and y are vectors each with a number of elements that equals n.

Input Parameters
n

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

a

REAL for saxpy

DOUBLE PRECISION for daxpy

COMPLEX for caxpy

DOUBLE COMPLEX for zaxpy

Specifies the scalar a.

x

REAL for saxpy

DOUBLE PRECISION for daxpy

COMPLEX for caxpy

DOUBLE COMPLEX for zaxpy

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

incx

INTEGER. Specifies the increment for the elements of x.

y

REAL for saxpy

DOUBLE PRECISION for daxpy

COMPLEX for caxpy

DOUBLE COMPLEX for zaxpy

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.

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 axpy interface are the following:

x

Holds the array of size n.

y

Holds the array of size n.

a

The default value is 1.