Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 11/07/2023
Public

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

Document Table of Contents

cblas_?axpyi

Adds a scalar multiple of compressed sparse vector to a full-storage vector.

Syntax

void cblas_saxpyi (const MKL_INT nz, const float a, const float *x, const MKL_INT *indx, float *y);

void cblas_daxpyi (const MKL_INT nz, const double a, const double *x, const MKL_INT *indx, double *y);

void cblas_caxpyi (const MKL_INT nz, const void *a, const void *x, const MKL_INT *indx, void *y);

void cblas_zaxpyi (const MKL_INT nz, const void *a, const void *x, const MKL_INT *indx, void *y);

Include Files

  • mkl.h

Description

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

y := a*x + y

where:

a is a scalar,

x is a sparse vector stored in compressed form,

y is a vector in full storage form.

The ?axpyi routines reference or modify only the elements of y whose indices are listed in the array indx.

The values in indx must be distinct.

Input Parameters

nz

The number of elements in x and indx.

a

Specifies the scalar a.

x

Array, size at least nz.

indx

Specifies the indices for the elements of x.

Array, size at least nz.

y

Array, size at least max(indx[i]).

Output Parameters

y

Contains the updated vector y.