Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 3/22/2024
Public
Document Table of Contents

cblas_?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

Specifies the scalar a.

x

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

incx

Specifies the increment for the elements of x.

Output Parameters

x

Updated vector x.