# mkl_dbsrsv

Solves a system of linear equations for a sparse matrix in the BSR format.

## Syntax

Fortran:

call mkl_dbsrsv(transa, m, lb, alpha, matdescra, val, indx, pntrb, pntre, x, y)

C:

mkl_dbsrsv(&transa, &m, &lb, &alpha, matdescra, val, indx, pntrb, pntre, x, y);

## Description

The mkl_dcsrsv routine solves a system of linear equations with matrix-vector operations for a sparse matrix in the BSR format:
`y := alpha*inv(A)*x`

or
`y := alpha*inv(A')* x,`

where:

alpha is scalar, x and y are vectors, A is a sparse upper or lower triangular matrix with unit or non-unit main diagonal, A' is the transpose of A.

### Note

This routine supports BSR format both with one-based indexing and zero-based indexing.

## Input Parameters

Parameter descriptions are common for all implemented interfaces with the exception of data types that refer here to the FORTRAN 77 standard types. Data types specific to the different interfaces are described in the section “Interfaces” below.

transa

  CHARACTER*1. Specifies the operation.

  If `transa = 'N'` or 'n', then `y := alpha*inv(A)*x`

  If `transa = 'T'` or 't' or 'C' or 'c', then `y := alpha*inv(A')* x`,

m

  INTEGER. Number of block columns of the matrix A.

lb

  INTEGER. Size of the block in the matrix A.

alpha

  REAL*8. Specifies the scalar alpha.

matdescra

  CHARACTER. Array of six elements, specifies properties of the matrix used for operation. Only first four array elements are used, their possible values are given in the “Possible Values of the Parameter matdescra (descra)”.

val

  REAL*8. Array containing elements of non-zero blocks of the matrix A. Its length is equal to the number of non-zero blocks in the matrix A multiplied by `lb*lb`.

  Refer to the values array description in BSR Format for more details.

indx

  INTEGER. Array containing the column indices for each non-zero block in the matrix A. Its length is equal to the number of non-zero blocks in the matrix A.

  Refer to the columns array description in BSR Format for more details.

pntrb

  INTEGER. Array of length m.

  For one-based indexing: this array contains row indices, such that `pntrb(i) - pntrb(1)+1` is the first index of block row i in the array indx.

  For zero-based indexing: this array contains row indices, such that `pntrb(i) - pntrb(0)` is the first index of block row i in the array indx

  Refer to pointerB array description in BSR Format for more details.

pntre

  INTEGER. Array of length m.

  For one-based intexing this array contains row indices, such that `pntre(i) - pntrb(1)` is the last index of block row i in the array indx.

  For zero-based intexing this array contains row indices, such that `pntre(i) - pntrb(0)-1` is the last index of block row i in the array indx.

  Refer to pointerE array description in BSR Format for more details.

x

  REAL*8.

  Array, DIMENSION at least `(m*lb)`.

  On entry, the array x must contain the vector x. The elements are accessed with unit increment.

y

  REAL*8.

  Array, DIMENSION at least `(m*lb)`.

  On entry, the array y must contain the vector y. The elements are accessed with unit increment.

## Output Parameters

y

  Contains solution vector x.

## Interfaces

## FORTRAN 77:

SUBROUTINE mkl_dbsrsv(transa, m, lb, alpha, matdescra, val, indx, pntrb, pntre, x, y)

CHARACTER*1 transa

CHARACTER matdescra(*)

INTEGER m, lb

INTEGER indx(*), pntrb(m), pntre(m)

REAL*8 alpha

REAL*8 val(*)

REAL*8 x(*), y(*)

## C:

`void mkl_dbsrsv(char *transa, int *m, int *lb, double *alpha, char *matdescra,`
`double *val, int *indx, int *pntrb, int *pntre, double *x, double *y);`

Parent topic: Sparse BLAS Level 2 and Level 3 Routines.