?scal

Computes the product of a vector by a scalar.

Syntax

FORTRAN 77:

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)

Fortran 95:

call scal(x, a)

Include Files

The FORTRAN 77 interfaces are specified in the mkl_blas.fi include file, the Fortran 95 interfaces are specified in the blas.f90 include file, and the C interfaces are specified in the mkl_blas.h include file.

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, DIMENSION at least (1 + (n -1)*abs(incx)).

incx

INTEGER. Specifies the increment for the elements of x.

Output Parameters

x

Updated vector x.

Fortran 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 Fortran 95 Interface Conventions.

Specific details for the routine scal interface are the following:

x

Holds the vector with the number of elements n.


Submit feedback on this help topic

Copyright © 1994 - 2011, Intel Corporation. All rights reserved.