Developer Reference for Intel® oneAPI Math Kernel Library for C
A newer version of this document is available. Customers should click here to go to the newest version.
?scal
Computes the product of a vector by a scalar.
Syntax
void cblas_sscal(const MKL_INT n, const float a, float *x, const MKL_INT incx);
void cblas_dscal(const MKL_INT n, const double a, double *x, const MKL_INT incx);
void cblas_cscal(const MKL_INT n, const void *a, void *x, const MKL_INT incx);
void cblas_zscal(const MKL_INT n, const void *a, void *x, const MKL_INT incx);
void cblas_csscal(const MKL_INT n, const float a, void *x, const MKL_INT incx);
void cblas_zdscal(const MKL_INT n, const double a, void *x, const MKL_INT incx);
Include Files
mkl.h
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
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
Specifies the increment for the elements of x .
Output Parameters
- x
-
Updated vector x .
BLAS 95 Interface Notes
There exist FORTRAN 77 and FORTRAN 95 interfaces for this routine. See the Intel® oneMKL Fortran Developer Reference for details.