F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentF06SBF (ZGBMV)

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

## 1  Purpose

F06SBF (ZGBMV) computes the matrix-vector product for a complex general band matrix, its transpose or its conjugate transpose.

## 2  Specification

 SUBROUTINE F06SBF ( TRANS, M, N, KL, KU, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
 INTEGER M, N, KL, KU, LDA, INCX, INCY COMPLEX (KIND=nag_wp) ALPHA, A(LDA,*), X(*), BETA, Y(*) CHARACTER(1) TRANS
The routine may be called by its BLAS name zgbmv.

## 3  Description

F06SBF (ZGBMV) performs one of the matrix-vector operations
 $y←αAx+βy , y←αATx+βy or y←αAHx+βy ,$
where $A$ is an $m$ by $n$ complex band matrix with ${k}_{l}$ subdiagonals and ${k}_{u}$ superdiagonals, $x$ and $y$ are complex vectors, and $\alpha$ and $\beta$ are complex scalars.
If $m=0$ or $n=0$, no operation is performed.

None.

## 5  Parameters

1:     TRANS – CHARACTER(1)Input
On entry: specifies the operation to be performed.
${\mathbf{TRANS}}=\text{'N'}$
$y←\alpha Ax+\beta y$.
${\mathbf{TRANS}}=\text{'T'}$
$y←\alpha {A}^{\mathrm{T}}x+\beta y$.
${\mathbf{TRANS}}=\text{'C'}$
$y←\alpha {A}^{\mathrm{H}}x+\beta y$.
Constraint: ${\mathbf{TRANS}}=\text{'N'}$, $\text{'T'}$ or $\text{'C'}$.
2:     M – INTEGERInput
On entry: $m$, the number of rows of the matrix $A$.
Constraint: ${\mathbf{M}}\ge 0$.
3:     N – INTEGERInput
On entry: $n$, the number of columns of the matrix $A$.
Constraint: ${\mathbf{N}}\ge 0$.
4:     KL – INTEGERInput
On entry: ${k}_{l}$, the number of subdiagonals within the band of $A$.
Constraint: ${\mathbf{KL}}\ge 0$.
5:     KU – INTEGERInput
On entry: ${k}_{u}$, the number of superdiagonals within the band of $A$.
Constraint: ${\mathbf{KU}}\ge 0$.
6:     ALPHA – COMPLEX (KIND=nag_wp)Input
On entry: the scalar $\alpha$.
7:     A(LDA,$*$) – COMPLEX (KIND=nag_wp) arrayInput
Note: the second dimension of the array A must be at least ${\mathbf{N}}$.
On entry: the $m$ by $n$ band matrix $A$.
The matrix is stored in rows $1$ to ${k}_{l}+{k}_{u}+1$, more precisely, the element ${A}_{ij}$ must be stored in
 $Aku+1+i-jj for ​max1,j-ku≤i≤minm,j+kl.$
8:     LDA – INTEGERInput
On entry: the first dimension of the array A as declared in the (sub)program from which F06SBF (ZGBMV) is called.
Constraint: ${\mathbf{LDA}}\ge {\mathbf{KL}}+{\mathbf{KU}}+1$.
9:     X($*$) – COMPLEX (KIND=nag_wp) arrayInput
Note: the dimension of the array X must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,1+\left({\mathbf{N}}-1\right)×\left|{\mathbf{INCX}}\right|\right)$ if ${\mathbf{TRANS}}=\text{'N'}$ and at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,1+\left({\mathbf{M}}-1\right)×\left|{\mathbf{INCX}}\right|\right)$ if ${\mathbf{TRANS}}=\text{'T'}$ or $\text{'C'}$.
On entry: the vector $x$.
If ${\mathbf{TRANS}}=\text{'N'}$,
• if ${\mathbf{INCX}}>0$, ${x}_{\mathit{i}}$ must be stored in ${\mathbf{X}}\left(1+\left(\mathit{i}-1\right)×{\mathbf{INCX}}\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{N}}$;
• if ${\mathbf{INCX}}<0$, ${x}_{\mathit{i}}$ must be stored in ${\mathbf{X}}\left(1-\left({\mathbf{N}}-\mathit{i}\right)×{\mathbf{INCX}}\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{N}}$.
If ${\mathbf{TRANS}}=\text{'T'}$ or $\text{'C'}$,
• if ${\mathbf{INCX}}>0$, ${x}_{\mathit{i}}$ must be stored in ${\mathbf{X}}\left(1+\left(\mathit{i}-1\right)×{\mathbf{INCX}}\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{M}}$;
• if ${\mathbf{INCX}}<0$, ${x}_{\mathit{i}}$ must be stored in ${\mathbf{X}}\left(1-\left({\mathbf{M}}-\mathit{i}\right)×{\mathbf{INCX}}\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{M}}$.
10:   INCX – INTEGERInput
On entry: the increment in the subscripts of X between successive elements of $x$.
Constraint: ${\mathbf{INCX}}\ne 0$.
11:   BETA – COMPLEX (KIND=nag_wp)Input
On entry: the scalar $\beta$.
12:   Y($*$) – COMPLEX (KIND=nag_wp) arrayInput/Output
Note: the dimension of the array Y must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,1+\left({\mathbf{M}}-1\right)×\left|{\mathbf{INCY}}\right|\right)$ if ${\mathbf{TRANS}}=\text{'N'}$ and at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,1+\left({\mathbf{N}}-1\right)×\left|{\mathbf{INCY}}\right|\right)$ if ${\mathbf{TRANS}}=\text{'T'}$ or $\text{'C'}$.
On entry: the vector $y$, if ${\mathbf{BETA}}=0.0$, Y need not be set.
If ${\mathbf{TRANS}}=\text{'N'}$,
• if ${\mathbf{INCY}}>0$, ${y}_{\mathit{i}}$ must be stored in ${\mathbf{Y}}\left(1+\left(\mathit{i}-1\right)×{\mathbf{INCY}}\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{M}}$;
• if ${\mathbf{INCY}}<0$, ${y}_{\mathit{i}}$ must be stored in ${\mathbf{Y}}\left(1-\left({\mathbf{M}}-\mathit{i}\right)×{\mathbf{INCY}}\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{M}}$.
If ${\mathbf{TRANS}}=\text{'T'}$ or $\text{'C'}$,
• if ${\mathbf{INCY}}>0$, ${y}_{\mathit{i}}$ must be stored in ${\mathbf{Y}}\left(1+\left(\mathit{i}-1\right)×{\mathbf{INCY}}\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{N}}$;
• if ${\mathbf{INCY}}<0$, ${y}_{\mathit{i}}$ must be stored in ${\mathbf{Y}}\left(1-\left({\mathbf{N}}-\mathit{i}\right)×{\mathbf{INCY}}\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{N}}$.
On exit: the updated vector $y$ stored in the array elements used to supply the original vector $y$.
13:   INCY – INTEGERInput
On entry: the increment in the subscripts of Y between successive elements of $y$.
Constraint: ${\mathbf{INCY}}\ne 0$.

None.

Not applicable.