mkl_?csradd
mkl_?csradd
Computes the sum of two matrices stored in the CSR format (3-array variation) with one-based indexing (deprecated).
Syntax
void
mkl_dcsradd
(
const
char
*trans
,
const
MKL_INT
*request
,
const
MKL_INT
*sort
,
const
MKL_INT
*m
,
const
MKL_INT
*n
,
double
*a
,
MKL_INT
*ja
,
MKL_INT
*ia
,
const
double
*beta
,
double
*b
,
MKL_INT
*jb
,
MKL_INT
*ib
,
double
*c
,
MKL_INT
*jc
,
MKL_INT
*ic
,
const
MKL_INT
*nzmax
,
MKL_INT
*info
);
void
mkl_scsradd
(
const
char
*trans
,
const
MKL_INT
*request
,
const
MKL_INT
*sort
,
const
MKL_INT
*m
,
const
MKL_INT
*n
,
float
*a
,
MKL_INT
*ja
,
MKL_INT
*ia
,
const
float
*beta
,
float
*b
,
MKL_INT
*jb
,
MKL_INT
*ib
,
float
*c
,
MKL_INT
*jc
,
MKL_INT
*ic
,
const
MKL_INT
*nzmax
,
MKL_INT
*info
);
void
mkl_ccsradd
(
const
char
*trans
,
const
MKL_INT
*request
,
const
MKL_INT
*sort
,
const
MKL_INT
*m
,
const
MKL_INT
*n
,
MKL_Complex8
*a
,
MKL_INT
*ja
,
MKL_INT
*ia
,
const
MKL_Complex8
*beta
,
MKL_Complex8
*b
,
MKL_INT
*jb
,
MKL_INT
*ib
,
MKL_Complex8
*c
,
MKL_INT
*jc
,
MKL_INT
*ic
,
const
MKL_INT
*nzmax
,
MKL_INT
*info
);
void
mkl_zcsradd
(
const
char
*trans
,
const
MKL_INT
*request
,
const
MKL_INT
*sort
,
const
MKL_INT
*m
,
const
MKL_INT
*n
,
MKL_Complex16
*a
,
MKL_INT
*ja
,
MKL_INT
*ia
,
const
MKL_Complex16
*beta
,
MKL_Complex16
*b
,
MKL_INT
*jb
,
MKL_INT
*ib
,
MKL_Complex16
*c
,
MKL_INT
*jc
,
MKL_INT
*ic
,
const
MKL_INT
*nzmax
,
MKL_INT
*info
);
Include Files
- mkl.h
Description
This routine is deprecated. Use mkl_sparse_?_addfrom the Inspector-executor Sparse BLAS interface instead.
Intel® oneAPI Math Kernel Library
The
mkl_?csradd
routine performs a matrix-matrix operation defined as C := A+beta*op(B)
where:
A
, B
, C
are the sparse matrices in the CSR format (3-array variation).op(
is one of B
)op(
, or B
) = B
op(
, or B
) = B
T
op(
B
) = B
H
beta
is a scalar. The routine works correctly if and only if the column indices in sparse matrix representations of matrices
A
and B
are arranged in the increasing order for each row. If not, use the parameter sort
(see below) to reorder column indices and the corresponding elements of the input matrices.This routine supports only one-based indexing of the input arrays.
Input Parameters
- trans
- Specifies the operation.Ifortrans='N''n', thenC:=A+beta*BIfortrans='T''t', thenC:=A+beta*BTIftrans='C'or'c', then.C:=A+beta*BH
- request
- If, the routine performs addition. The memory for the output arraysrequest=0ic,jc,cmust be allocated beforehand.If, the routine only computes the values of the arrayrequest=1icof length. The memory for them+ 1icarray must be allocated beforehand. On exit the valueis the actual number of the elements in the arraysic[m] - 1candjc.If, after the routine is called previously with the parameterrequest=2and after the output arraysrequest=1jcandcare allocated in the calling program with length at least, the routine performs addition.ic[m] - 1
- sort
- Specifies the type of reordering. If this parameter is not set (default), the routine does not perform reordering.If, the routine arranges the column indicessort=1jafor each row in the increasing order and reorders the corresponding values of the matrixAin the arraya.If, the routine arranges the column indicessort=2jbfor each row in the increasing order and reorders the corresponding values of the matrixBin the arrayb.If, the routine performs reordering for both input matricessort=3AandB.
- m
- Number of rows of the matrixA.
- n
- Number of columns of the matrixA.
- a
- Array containing non-zero elements of the matrixA. Its length is equal to the number of non-zero elements in the matrixA. Refer tovaluesarray description in Sparse Matrix Storage Formats for more details.
- ja
- Array containing the column indicesplus onefor each non-zero element of the matrixA. For each row the column indices must be arranged in the increasing order.The length of this array is equal to the length of the arraya. Refer tocolumnsarray description in Sparse Matrix Storage Formats for more details.
- ia
- Array of length, containing indices of elements in the arraym+ 1a, such thatis the index in the arrayia[i] -ia[0]aof the first non-zero element from the rowi. The value of the last elementis equal to the number of non-zero elements of the matrixia[m]Aplus one. Refer torowIndexarray description in Sparse Matrix Storage Formats for more details.
- beta
- Specifies the scalarbeta.
- b
- Array containing non-zero elements of the matrixB. Its length is equal to the number of non-zero elements in the matrixB. Refer tovaluesarray description in Sparse Matrix Storage Formats for more details.
- jb
- Array containing the column indicesplus onefor each non-zero element of the matrixB. For each row the column indices must be arranged in the increasing order.The length of this array is equal to the length of the arrayb. Refer tocolumnsarray description in Sparse Matrix Storage Formats for more details.
- ib
- Array of lengthwhenm+ 1ortrans='N''n', orotherwise.n+ 1This array contains indices of elements in the arrayb, such thatis the index in the arrayib[i] -ib[0]bof the first non-zero element from the rowi. The value of the last elementorib[m]is equal to the number of non-zero elements of the matrixib[n]Bplus one. Refer torowIndexarray description in Sparse Matrix Storage Formats for more details.
- nzmax
- The length of the arrayscandjc.This parameter is used only if. The routine stops calculation if the number of elements in the result matrixrequest=0Cexceeds the specified value ofnzmax.
Output Parameters
- c
- Array containing non-zero elements of the result matrixC. Its length is equal to the number of non-zero elements in the matrixC. Refer tovaluesarray description in Sparse Matrix Storage Formats for more details.
- jc
- Array containing the column indicesplus onefor each non-zero element of the matrixC.The length of this array is equal to the length of the arrayc. Refer tocolumnsarray description in Sparse Matrix Storage Formats for more details.
- ic
- Array of length, containing indices of elements in the arraym+ 1c, such thatis the index in the arrayic[i] -ic[0]cof the first non-zero element from the rowi. The value of the last elementis equal to the number of non-zero elements of the matrixic[m]Cplus one. Refer torowIndexarray description in Sparse Matrix Storage Formats for more details.
- info
- If, the execution is successful.info=0If, the routine stops calculation in theinfo=I>0I-th row of the matrixCbecause number of elements inCexceedsnzmax.If, the routine calculates only the size of the arraysinfo=-1candjcand returns this value plus 1 as the last element of the arrayic.