Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 7/13/2023
Public

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

Document Table of Contents

?scal

Computes the product of a vector by a scalar.

Syntax

call sscal(n, a, x, incx)

call dscal(n, a, x, incx)

call cscal(n, a, x, incx)

call zscal(n, a, x, incx)

call csscal(n, a, x, incx)

call zdscal(n, a, x, incx)

call scal(x, a)

Include Files

  • mkl.fi, blas.f90

Description

The ?scal routines perform a vector operation defined as

x = a*x

where:

a is a scalar, x is an n-element vector.

Input Parameters

n

INTEGER. Specifies the number of elements in vector x.

a

REAL for sscal and csscal

DOUBLE PRECISION for dscal and zdscal

COMPLEX for cscal

DOUBLE COMPLEX for zscal

Specifies the scalar a.

x

REAL for sscal

DOUBLE PRECISION for dscal

COMPLEX for cscal and csscal

DOUBLE COMPLEX for zscal and zdscal

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

incx

INTEGER. Specifies the increment for the elements of x.

Output Parameters

x

Updated vector x.

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

x

Holds the vector with the number of elements n.