# NAG Library Routine Document

## 1Purpose

f06snf (zgerc) computes the rank-1 update of a complex general matrix using a conjugated vector.

## 2Specification

Fortran Interface
 Subroutine f06snf ( m, n, x, incx, y, incy, a, lda)
 Integer, Intent (In) :: m, n, incx, incy, lda Complex (Kind=nag_wp), Intent (In) :: alpha, x(*), y(*) Complex (Kind=nag_wp), Intent (Inout) :: a(lda,*)
#include nagmk26.h
 void f06snf_ (const Integer *m, const Integer *n, const Complex *alpha, const Complex x[], const Integer *incx, const Complex y[], const Integer *incy, Complex a[], const Integer *lda)
The routine may be called by its BLAS name zgerc.

## 3Description

f06snf (zgerc) performs the rank-1 update operation
 $A←αxyH + A ,$
where $A$ is an $m$ by $n$ complex matrix, $x$ is an $m$ element complex vector, $y$ is an $n$-element complex vector, and $\alpha$ is a complex scalar.

None.

## 5Arguments

1:     $\mathbf{m}$ – IntegerInput
On entry: $m$, the number of rows of the matrix $A$.
Constraint: ${\mathbf{m}}\ge 0$.
2:     $\mathbf{n}$ – IntegerInput
On entry: $n$, the number of columns of the matrix $A$.
Constraint: ${\mathbf{n}}\ge 0$.
3:     $\mathbf{alpha}$ – Complex (Kind=nag_wp)Input
On entry: the scalar $\alpha$.
4:     $\mathbf{x}\left(*\right)$ – 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{m}}-1\right)×\left|{\mathbf{incx}}\right|\right)$.
On entry: the $m$ element vector $x$.
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}}$.
Intermediate elements of X are not referenced.
5:     $\mathbf{incx}$ – IntegerInput
On entry: the increment in the subscripts of x between successive elements of $x$.
Constraint: ${\mathbf{incx}}\ne 0$.
6:     $\mathbf{y}\left(*\right)$ – Complex (Kind=nag_wp) arrayInput
Note: the dimension of the array y must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,1+\left({\mathbf{n}}-1\right)×\left|{\mathbf{incy}}\right|\right)$.
On entry: the $n$-element vector $y$.
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}}$.
Intermediate elements of y are not referenced.
7:     $\mathbf{incy}$ – IntegerInput
On entry: the increment in the subscripts of y between successive elements of $y$.
Constraint: ${\mathbf{incy}}\ne 0$.
8:     $\mathbf{a}\left({\mathbf{lda}},*\right)$ – Complex (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array a must be at least ${\mathbf{n}}$.
On entry: the $m$ by $n$ matrix $A$.
On exit: the updated matrix $A$.
9:     $\mathbf{lda}$ – IntegerInput
On entry: the first dimension of the array a as declared in the (sub)program from which f06snf (zgerc) is called.
Constraint: ${\mathbf{lda}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$.

None.

Not applicable.

## 8Parallelism and Performance

f06snf (zgerc) is not threaded in any implementation.