H2Lib  3.0
Macros
blas

This module servers as a wrapper for all calls to BLAS and LAPACK routines. More...

Macros

#define h2_dot(n, x, incx, y, incy)   zdotc_(n, x, incx, y, incy)
 Compute the dot product of two field vectors $\vec x$ and $\vec y$ of length n. More...
 
#define h2_rdot(n, x, incx, y, incy)   ddot_(n, x, incx, y, incy)
 Compute the dot product of two real vectors $\vec x$ and $\vec y$ of length n. More...
 
#define h2_axpy(n, alpha, x, incx, y, incy)   zaxpy_(n, alpha, x, incx, y, incy)
 Add a field vector $\alpha \vec x$ to another field vector $\vec y$. More...
 
#define h2_raxpy(n, alpha, x, incx, y, incy)   daxpy_(n, alpha, x, incx, y, incy)
 Add a real vector $\alpha \vec x$ to another field vector $\vec y$. More...
 
#define h2_scal(n, alpha, x, incx)   zscal_(n, alpha, x, incx)
 Scales a field vector $\vec x$ by a field scalar $\alpha$. More...
 
#define h2_rscal(n, alpha, x, incx)   zdscal_(n, alpha, x, incx)
 Scales a field vector $\vec x$ by a real scalar $\alpha$. More...
 
#define h2_nrm2(n, x, incx)   dznrm2_(n, x, incx)
 Computes the 2-norm $\|\vec x\|_2$ of a field vector $\vec x$. More...
 
#define h2_swap(n, x, incx, y, incy)   zswap_(n, x, incx, y, incy)
 Swaps to entries of two field vectors $\vec x$ and $\vec y$. More...
 
#define h2_gemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)   zgemv_(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
 Compute matrix vector product of a general matrix $A$ with input vector $\vec x$ and output vector $y$. More...
 
#define h2_trmv(uplo, trans, diag, n, a, lda, x, incx)   ztrmv_(uplo, trans, diag, n, a, lda, x, incx)
 Compute matrix vector product of a triangular matrix $A$ with input and output vector $\vec x$. More...
 
#define h2_ger(m, n, alpha, x, incx, y, incy, a, lda)   zgerc_(m, n, alpha, x, incx, y, incy, a, lda)
 Adds a rank-1-update $\vec x \vec{\bar y}^T$ to a matrix $A$. More...
 
#define h2_gerc(m, n, alpha, x, incx, y, incy, a, lda)   zgerc_(m, n, alpha, x, incx, y, incy, a, lda)
 Adds a rank-1-update $\vec x \vec{\bar y}^T$ to a matrix $A$. More...
 
#define h2_geru(m, n, alpha, x, incx, y, incy, a, lda)   zgeru_(m, n, alpha, x, incx, y, incy, a, lda)
 Adds a rank-1-update $\vec x \vec y^T$ to a matrix $A$. More...
 
#define h2_syr(uplo, n, alpha, x, incx, a, lda)   zher_(uplo, n, alpha, x, incx, a, lda)
 Adds a symmetric/hermetian rank-1-update $\vec x \vec{\bar x}^T$ to a matrix $A$. More...
 
#define h2_gemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)   zgemm_(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
 Compute matrix-matrix-multiplication for general matrices $A,B$ and $C$. More...
 
#define h2_trmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)   ztrmm_(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
 Compute matrix-matrix-multiplication for triangular matrices $A$ and a general matrix $B$. More...
 
#define h2_trsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)   ztrsm_(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
 Solves a linear system of equations with a triangular matrix $A$ and a right-hand-side matrix $B$. More...
 
#define h2_lacgv(n, x, incx)   zlacgv_(n, x, incx)
 Conjugates a vector of field $\vec x$. More...
 
#define h2_potrf(uplo, n, a, lda, info)   zpotrf_(uplo, n, a, lda, info)
 Computes the Cholesky factorization of symmetric/hermitian positive definite matrix $A$ in-place. More...
 
#define h2_larf(side, m, n, v, incv, tau, c, ldc, work)   zlarf_(side, m, n, v, incv, tau, c, ldc, work)
 Applies an elementary reflector $H = I - \tau \vec v \vec v^T$ to a matrix $C$. More...
 
#define h2_larfg(n, alpha, x, incx, tau)   zlarfg_(n, alpha, x, incx, tau)
 Create an elementary reflector $H$. More...
 
#define h2_geqrf(m, n, a, lda, tau, work, lwork, info)   zgeqrf_(m, n, a, lda, tau, work, lwork, info)
 Compute a QR-decomposition of the matrix $A$. More...
 
#define h2_ormqr(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)   zunmqr_(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
 Apply orthogonal/unitary matrix $Q$ from "Left" or from "Right" to a matrix $C$. More...
 
#define h2_orgqr(m, n, k, a, lda, tau, work, lwork, info)   zungqr_(m, n, k, a, lda, tau, work, lwork, info)
 Generate the orthogonal/unitary matrix $Q$ out of its elementary reflectors $Q = H(1) \cdot \ldots \cdot H(k)$. More...
 
#define h2_steqr(compz, n, d, e, z, ldz, work, info)   zsteqr_(compz, n, d, e, z, ldz, work, info)
 Compute all eigenvalues and optionally all eigenvectors of a symmetric tridiagonal matrix $A$ using implicit QL or QR method. More...
 
#define h2_stev(jobz, n, d, e, z, ldz, work, info)   dstev_(jobz, n, d, e, z, ldz, work, info)
 Compute all eigenvalues and optionally all eigenvectors of a real symmetric tridiagonal matrix $A$. More...
 
#define h2_gesvd(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, rwork, info)   zgesvd_(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, rwork, info)
 Compute the SVD of a general matrix $A$. More...
 
#define h2_bdsqr(uplo, n, ncvt, nru, ncc, d, e, vt, ldvt, u, ldu, c, ldc, rwork, info)   zbdsqr_(uplo, n, ncvt, nru, ncc, d, e, vt, ldvt, u, ldu, c, ldc, rwork, info)
 Compute the SVD of a real "Lower" or "Upper" bidiagonal matrix $B$. More...
 
#define h2_heev(jobz, uplo, n, a, lda, w, work, lwork, rwork, info)   zheev_(jobz, uplo, n, a, lda, w, work, lwork, rwork, info)
 Compute all eigenvalues and optionally all eigenvectors of a hermitian / symmetric matrix $A$. More...
 

Detailed Description

This module servers as a wrapper for all calls to BLAS and LAPACK routines.

For more detailed information about the imported functions, please refer e.g. to http://www.netlib.org/lapack/explore-html/index.html

Macro Definition Documentation

#define h2_axpy (   n,
  alpha,
  x,
  incx,
  y,
  incy 
)    zaxpy_(n, alpha, x, incx, y, incy)

Add a field vector $\alpha \vec x$ to another field vector $\vec y$.

Parameters
nLength of both vectors x and y.
alphaField constant.
xFirst field vector of length n.
incxStride for elements of x.
ySecond field vector of length n.
incyStride for elements of y.
#define h2_bdsqr (   uplo,
  n,
  ncvt,
  nru,
  ncc,
  d,
  e,
  vt,
  ldvt,
  u,
  ldu,
  c,
  ldc,
  rwork,
  info 
)    zbdsqr_(uplo, n, ncvt, nru, ncc, d, e, vt, ldvt, u, ldu, c, ldc, rwork, info)

Compute the SVD of a real "Lower" or "Upper" bidiagonal matrix $B$.

$B$ is decomposed as $B = Q \Sigma \bar P^T$.

If unitary matrices $U$ ad $\bar V^T$ that reduce a matrix $A$ to bidiagonal form, then the SVD of $A$ is given by $A = (U Q) \Sigma (\bar P^T \bar V^T)$.

Optionally the function may also compute $\bar Q^T C$ for some input matrix $C$.

Parameters
uploDetermines whether an "Upper" or a "Lower" bidiagonal matrix $B$ is given.
nThe order of the matrix $B$.
ncvtNumber of columns of the matrix $\bar V^T$.
nruNumber of row of the matrix $U$.
nccNumber of columns of the matrix $C$.
dReal vector of length n containing the diagonal entries of $B$ on entry and the singular values in descending order on exit.
eReal vector of length n - 1 containing the offdiagonal entries of $B$.
vtMatrix of fields $\bar V^T$ on entry, on exit the matrix $\bar P^T \bar V^T$.
ldvtLeading dimension of the matrix $\bar V^T$.
uMatrix of fields $U$ on entry, on exit the matrix $U Q$.
lduLeading dimension of the matrix $U$.
cMatrix of fields $C$ on entry, on exit the matrix $\bar Q^T C$.
ldcLeading dimension of the matrix $C$.
rworkIntermediate storage of size 2 n or max(1, 4*n - 4).
infoReturn value for the computation. Equals zero if everything worked fine, otherwise a return code that indicates the problem is returned.
#define h2_dot (   n,
  x,
  incx,
  y,
  incy 
)    zdotc_(n, x, incx, y, incy)

Compute the dot product of two field vectors $\vec x$ and $\vec y$ of length n.

Parameters
nLength of both vectors x and y.
xFirst field vector of length n.
incxStride for elements of x.
ySecond field vector of length n.
incyStride for elements of y.
Returns
Dot product of x and y: $ \langle \vec x, \vec y \rangle_2 = \sum_{i=1}^n \bar x_i y_i$
#define h2_gemm (   transa,
  transb,
  m,
  n,
  k,
  alpha,
  a,
  lda,
  b,
  ldb,
  beta,
  c,
  ldc 
)    zgemm_(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)

Compute matrix-matrix-multiplication for general matrices $A,B$ and $C$.

Depending on the values of transa and transb one of the following operations is performed: $C \gets \beta C + \alpha A B$ or $C \gets \beta C + \alpha \bar A^T B$ or $C \gets \beta C + \alpha A \bar B^T$ or $C \gets \beta C + \alpha \bar A^T \bar B^T$.

Parameters
transaIf set to "Conjugate transposed" $\bar A^T$ will be used.
If set to "Transposed" $A^T$ will be used.
In all other cases $A$ will be used for the computation.
transbIf set to "Conjugate transposed" $\bar B^T$ will be used.
If set to "Transposed" $B^T$ will be used.
In all other cases $B$ will be used for the computation.
mNumber of rows for the matrix a and matrix c.
nNumber of columns for the matrix b and the matrix c.
kNumber of columns for the matrix a and rows of the matrix b.
alphaField scalar value used in the above mentioned computation.
aThe matrix $A$.
ldaLeading dimension of the matrix $A$
bThe matrix $B$.
ldbLeading dimension of the matrix $B$
betaField scalar value used in the above mentioned computation.
cThe matrix $C$.
ldcLeading dimension of the matrix $C$
#define h2_gemv (   trans,
  m,
  n,
  alpha,
  a,
  lda,
  x,
  incx,
  beta,
  y,
  incy 
)    zgemv_(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)

Compute matrix vector product of a general matrix $A$ with input vector $\vec x$ and output vector $y$.

The operation $\vec y \gets \beta \vec y + \alpha A \vec x$ or $\vec y \gets \beta \vec y + \alpha A^T \vec x$ or $\vec y \gets \beta \vec y + \alpha \bar A^T \vec x$ will be performed depending on the value of trans and the current type of field.

Parameters
transIf set to "Conjugate transposed" $\bar A^T$ will be used.
If set to "Transposed" $A^T$ will be used.
In all other cases $A$ will be used for the computation.
mNumber of rows for the matrix a.
nNumber of columns for the matrix a.
alphaField scalar value used in the above mentioned computation.
aThe matrix $A$.
ldaLeading dimension of the matrix $A$
xInput field vector $\vec x$. Dimension of x should be at least n.
incxStride for elements of x.
betaField scalar value used in the above mentioned computation.
yOutput field vector $\vec y$. Dimension of y should be at least m.
incyStride for elements of y.
#define h2_geqrf (   m,
  n,
  a,
  lda,
  tau,
  work,
  lwork,
  info 
)    zgeqrf_(m, n, a, lda, tau, work, lwork, info)

Compute a QR-decomposition of the matrix $A$.

$A$ will be factorized into an orthogonal/unitary matrix $Q$ and an upper triangular matrix $R$.
Both matrices will be stored into the original matrix $A$ and an additional vector of field $\vec \tau$.

Parameters
mRows of the matrix $A$.
nColumns of the matrix $A$.
aThe matrix $A$.
ldaLeading dimension of the matrix $A$
tauField vector containing the scaling factors for the elementary reflectors.
workIntermediate storage of size lwork.
lworkSize of the intermediate storage work. For a detailed description of this parameter, please refer to LAPACK documentation.
infoReturn value for the computation. Equals zero if everything worked fine, otherwise a return code that indicates the problem is returned.
#define h2_ger (   m,
  n,
  alpha,
  x,
  incx,
  y,
  incy,
  a,
  lda 
)    zgerc_(m, n, alpha, x, incx, y, incy, a, lda)

Adds a rank-1-update $\vec x \vec{\bar y}^T$ to a matrix $A$.

The Computation $A \gets A + \alpha \vec x \vec{\bar y}^T$ is performed.

Parameters
mNumber of rows for the matrix a.
nNumber of columns for the matrix a.
alphaField scalar value used in the above mentioned computation.
xFirst field vector $\vec x$. Dimension of x should be m.
incxStride for elements of x.
ySecond field vector $\vec y$. Dimension of y should be n.
incyStride for elements of y.
aThe matrix $A$.
ldaLeading dimension of the matrix $A$
#define h2_gerc (   m,
  n,
  alpha,
  x,
  incx,
  y,
  incy,
  a,
  lda 
)    zgerc_(m, n, alpha, x, incx, y, incy, a, lda)

Adds a rank-1-update $\vec x \vec{\bar y}^T$ to a matrix $A$.

The Computation $A \gets A + \alpha \vec x \vec{\bar y}^T$ is performed.

Parameters
mNumber of rows for the matrix a.
nNumber of columns for the matrix a.
alphaField scalar value used in the above mentioned computation.
xFirst field vector $\vec x$. Dimension of x should be m.
incxStride for elements of x.
ySecond field vector $\vec y$. Dimension of y should be n.
incyStride for elements of y.
aThe matrix $A$.
ldaLeading dimension of the matrix $A$
#define h2_geru (   m,
  n,
  alpha,
  x,
  incx,
  y,
  incy,
  a,
  lda 
)    zgeru_(m, n, alpha, x, incx, y, incy, a, lda)

Adds a rank-1-update $\vec x \vec y^T$ to a matrix $A$.

The Computation $A \gets A + \alpha \vec x \vec y^T$ is performed.

Parameters
mNumber of rows for the matrix a.
nNumber of columns for the matrix a.
alphaField scalar value used in the above mentioned computation.
xFirst field vector $\vec x$. Dimension of x should be m.
incxStride for elements of x.
ySecond field vector $\vec y$. Dimension of y should be n.
incyStride for elements of y.
aThe matrix $A$.
ldaLeading dimension of the matrix $A$
#define h2_gesvd (   jobu,
  jobvt,
  m,
  n,
  a,
  lda,
  s,
  u,
  ldu,
  vt,
  ldvt,
  work,
  lwork,
  rwork,
  info 
)    zgesvd_(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, rwork, info)

Compute the SVD of a general matrix $A$.

$A$ is decomposed as $A = U \Sigma \bar V^T$.

Parameters
jobuIf set to "All" all m columns of $U$ are computed.
If set to "Skinny" only the first min(m, n) columns of $U$ are computed.
If set to "Overwrite" only the first min(m, n) columns of $U$ are computed and overwrite the entries of $A$.
If set to "No Vectors" no left singular vectors will be computed.
jobvtIf set to "All" all n columns of $\bar V^T$ are computed.
If set to "Skinny" only the first min(m, n) columns of $\bar V^T$ are computed.
If set to "Overwrite" only the first min(m, n) columns of $\bar V^T$ are computed and overwrite the entries of $A$.
If set to "No Vectors" no right singular vectors will be computed.
mNumber of rows of the matrix $A$.
nNumber of rows of the matrix $A$.
aThe matrix $A$.
ldaLeading dimension of $A$.
sVector of reals containing the singular vectors on exit.
uMatrix containing the left singular vectors depending on the choice of jobu on exit.
lduLeading dimension of $U$.
vtMatrix containing the right singular vectors depending on the choice of jobvt on exit.
ldvtLeading dimension of $\bar V^T$.
workIntermediate storage of size lwork.
lworkSize of the intermediate storage work. For a detailed description of this parameter, please refer to LAPACK documentation.
rworkIntermediate storage of size 5*min(m, n).
infoReturn value for the computation. Equals zero if everything worked fine, otherwise a return code that indicates the problem is returned.
#define h2_heev (   jobz,
  uplo,
  n,
  a,
  lda,
  w,
  work,
  lwork,
  rwork,
  info 
)    zheev_(jobz, uplo, n, a, lda, w, work, lwork, rwork, info)

Compute all eigenvalues and optionally all eigenvectors of a hermitian / symmetric matrix $A$.

Parameters
jobzIs equal to "No Vectors" if only the eigenvalues should be computed and equal to "Vectors" if also eigenvectors should be computed.
uploDetermines whether the lower triangular or the upper triangular part of the matrix $A$ should be used. The value "Lower" refers to the first and the value "Upper" refers to the latter case.
nNumber of rows and columns of the matrix $A$.
aThe matrix $A$.
ldaLeading dimension of the matrix $A$
wOn exit the field vector $w$ contains the eigenvalues in ascending order.
workIntermediate storage of size lwork.
lworkSize of the intermediate storage work. For a detailed description of this parameter, please refer to LAPACK documentation.
rworkIntermediate storage of size max(1, 3*n-2).
infoReturn value for the computation. Equals zero if everything worked fine, otherwise a return code that indicates the problem is returned.
#define h2_lacgv (   n,
  x,
  incx 
)    zlacgv_(n, x, incx)

Conjugates a vector of field $\vec x$.

$\vec x \gets \vec \bar{x}$.

Parameters
nLength of the vector $\vec x$.
xField vector $\vec x$.
incxStride for elements of x.
#define h2_larf (   side,
  m,
  n,
  v,
  incv,
  tau,
  c,
  ldc,
  work 
)    zlarf_(side, m, n, v, incv, tau, c, ldc, work)

Applies an elementary reflector $H = I - \tau \vec v \vec v^T$ to a matrix $C$.

Depending on the value of side either $C \gets H C$ or $C \gets C H$ is being performed.

Parameters
sideDetermines if the matrix $H$ should be multiplied from "Left" or from "Right" to the matrix $C$.
mNumber of rows for the matrix $C$.
nNumber of columns for the matrix $C$.
vVector of fields $\vec v$ representing the matrix $H$.
incvStride for the vector v.
tauField scalar value used in the above mentioned computation of $H$.
cThe matrix $C$.
ldcLeading dimension of the matrix $C$
workIntermediate storage of size n if side is equal to "Left" or of size m if side is equal to "Right".
#define h2_larfg (   n,
  alpha,
  x,
  incx,
  tau 
)    zlarfg_(n, alpha, x, incx, tau)

Create an elementary reflector $H$.

The properties of $H$ are defined as

\[\bar H^T \begin{pmatrix} \alpha \\ \vec x \end{pmatrix} = \begin{pmatrix} \beta \\ \vec 0 \end{pmatrix}, \qquad \bar H^T H = I. \]

$H$ will be computed as

\[H = I - \tau \begin{pmatrix} 1 \\ \vec v \end{pmatrix} \begin{pmatrix} 1 & \bar \vec v^T \end{pmatrix}. \]

Parameters
nDimension of the elementary reflector.
alphaOn entry the scalar field value $\alpha$, on exit the scalar field value $\beta$.
xOn entry the field vector $\vec x$, on exit the field vector $\vec v$.
incxStride for the vector x.
tauThe field scalar $\tau$.
#define h2_nrm2 (   n,
  x,
  incx 
)    dznrm2_(n, x, incx)

Computes the 2-norm $\|\vec x\|_2$ of a field vector $\vec x$.

Parameters
nLength of vector x.
xField vector of length n.
incxStride for elements of x.
Returns
$\|x\|_2$.
#define h2_orgqr (   m,
  n,
  k,
  a,
  lda,
  tau,
  work,
  lwork,
  info 
)    zungqr_(m, n, k, a, lda, tau, work, lwork, info)

Generate the orthogonal/unitary matrix $Q$ out of its elementary reflectors $Q = H(1) \cdot \ldots \cdot H(k)$.

The matrix $Q$ will overwrite the matrix $A$ on exit.

Parameters
mNumber of rows for the matrix C.
nNumber of columns for the matrix C.
kNumber of elementary reflectors.
aMatrix that contains the elementary reflectors of $Q$ as returned by h2_geqrf on entry and will contain the matrix $Q$ at exit.
ldaLeading dimension of the matrix $A$
tauField vector that contains the scaling factors of the elementary reflectors.
workIntermediate storage of size lwork.
lworkSize of the intermediate storage work. For a detailed description of this parameter, please refer to LAPACK documentation.
infoReturn value for the computation. Equals zero if everything worked fine, otherwise a return code that indicates the problem is returned.
#define h2_ormqr (   side,
  trans,
  m,
  n,
  k,
  a,
  lda,
  tau,
  c,
  ldc,
  work,
  lwork,
  info 
)    zunmqr_(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)

Apply orthogonal/unitary matrix $Q$ from "Left" or from "Right" to a matrix $C$.

Depending on the values of side and trans one of the following operations is performed: $C \gets Q C$ or $C \gets \bar Q^T C$ or $C \gets C Q$ or $C \gets C \bar Q^T$.

$Q$ is represented as product of elementary reflectors $H(1) \cdot \ldots \cdot H(k)$.

Parameters
sideDetermines if the matrix $H$ should be multiplied from "Left" or from "Right" to the matrix $C$.
transIf set to "Conjugate transposed" $\bar Q^T$ will be used.
If set to "Transposed" $Q^T$ will be used.
In all other cases $Q$ will be used for the computation.
mNumber of rows for the matrix C.
nNumber of columns for the matrix C.
kNumber of elementary reflectors.
aMatrix that contains the elementary reflectors of $Q$ as returned by h2_geqrf.
ldaLeading dimension of the matrix $A$
tauField vector that contains the scaling factors of the elementary reflectors.
cMatrix $C$ that will be overwritten by the above mentioned computation.
ldcLeading dimension of the matrix $C$
workIntermediate storage of size lwork.
lworkSize of the intermediate storage work. For a detailed description of this parameter, please refer to LAPACK documentation.
infoReturn value for the computation. Equals zero if everything worked fine, otherwise a return code that indicates the problem is returned.
#define h2_potrf (   uplo,
  n,
  a,
  lda,
  info 
)    zpotrf_(uplo, n, a, lda, info)

Computes the Cholesky factorization of symmetric/hermitian positive definite matrix $A$ in-place.

The matrix a gets partially overwritten by either a lower triangular matrix $L$ if uplo is set to "Lower" or by an upper triangular matrix $U$, if uplo is set to "Upper". In either cases it holds $A = L \bar L^T$ or $A = \bar U^T U$.

Parameters
uploDetermines whether the lower triangular matrix $L$ or the upper triangular matrix $U$ should be stored in the matrix a. The value "Lower" refers to the first and the value "Upper" refers to the latter case.
nNumber of rows and columns of the matrix $A$.
aThe matrix $A$.
ldaLeading dimension of the matrix $A$
infoReturn value for the computation. Equals zero if everything worked fine, otherwise a return code that indicates the problem is returned.
#define h2_raxpy (   n,
  alpha,
  x,
  incx,
  y,
  incy 
)    daxpy_(n, alpha, x, incx, y, incy)

Add a real vector $\alpha \vec x$ to another field vector $\vec y$.

Parameters
nLength of both vectors x and y.
alphaReal constant.
xFirst real vector of length n.
incxStride for elements of x.
ySecond real vector of length n.
incyStride for elements of y.
#define h2_rdot (   n,
  x,
  incx,
  y,
  incy 
)    ddot_(n, x, incx, y, incy)

Compute the dot product of two real vectors $\vec x$ and $\vec y$ of length n.

Parameters
nLength of both vectors x and y.
xFirst real vector of length n.
incxStride for elements of x.
ySecond real vector of length n.
incyStride for elements of y.
Returns
Dot product of x and y: $ \langle \vec x, \vec y \rangle_2 = \sum_{i=1}^n x_i y_i$
#define h2_rscal (   n,
  alpha,
  x,
  incx 
)    zdscal_(n, alpha, x, incx)

Scales a field vector $\vec x$ by a real scalar $\alpha$.

Parameters
nLength of vector x.
alphaReal constant.
xField vector of length n.
incxStride for elements of x.
#define h2_scal (   n,
  alpha,
  x,
  incx 
)    zscal_(n, alpha, x, incx)

Scales a field vector $\vec x$ by a field scalar $\alpha$.

Parameters
nLength of vector x.
alphaField constant.
xField vector of length n.
incxStride for elements of x.
#define h2_steqr (   compz,
  n,
  d,
  e,
  z,
  ldz,
  work,
  info 
)    zsteqr_(compz, n, d, e, z, ldz, work, info)

Compute all eigenvalues and optionally all eigenvectors of a symmetric tridiagonal matrix $A$ using implicit QL or QR method.

Parameters
compzIs equal to "No Vectors" if only the eigenvalues should be computed and equal to "Vectors" if also eigenvectors should be computed. Otherwise compz should be equal to "Identity" if $Z$ was initialized by an identity matrix and both eigenvalues and eigenvectors should be computed.
nOrder of the matrix $A$.
dCoefficients for the diagonal of $A$.
eCoefficients for the subdiagonals of $A$.
zIf Eigenvectors should be computed, the columns of the matrix $Z$ will contain them at exit.
ldzLeading dimension of the matrix $Z$.
workIntermediate storage of size lwork.
infoReturn value for the computation. Equals zero if everything worked fine, otherwise a return code that indicates the problem is returned.
#define h2_stev (   jobz,
  n,
  d,
  e,
  z,
  ldz,
  work,
  info 
)    dstev_(jobz, n, d, e, z, ldz, work, info)

Compute all eigenvalues and optionally all eigenvectors of a real symmetric tridiagonal matrix $A$.

Parameters
jobzIs equal to "No Vectors" if only the eigenvalues should be computed and equal to "Vectors" if also eigenvectors should be computed.
nOrder of the matrix $A$.
dCoefficients for the diagonal of $A$.
eCoefficients for the subdiagonals of $A$.
zIf Eigenvectors should be computed, the columns of the matrix $Z$ will contain them at exit.
ldzLeading dimension of the matrix $Z$.
workIntermediate storage of size lwork.
infoReturn value for the computation. Equals zero if everything worked fine, otherwise a return code that indicates the problem is returned.
#define h2_swap (   n,
  x,
  incx,
  y,
  incy 
)    zswap_(n, x, incx, y, incy)

Swaps to entries of two field vectors $\vec x$ and $\vec y$.

Parameters
nLength of both vectors x and y.
xFirst field vector of length n.
incxStride for elements of x.
ySecond field vector of length n.
incyStride for elements of y.
#define h2_syr (   uplo,
  n,
  alpha,
  x,
  incx,
  a,
  lda 
)    zher_(uplo, n, alpha, x, incx, a, lda)

Adds a symmetric/hermetian rank-1-update $\vec x \vec{\bar x}^T$ to a matrix $A$.

The Computation $A \gets A + \alpha \vec x \vec{\bar x}^T$ is performed.

Parameters
uploDetermines if an "upper" right or a "lower" left triangular matrix $A$ should be used.
nNumber of rows and columns for the matrix a.
alphaField scalar value used in the above mentioned computation.
xFirst field vector $\vec x$. Dimension of x should be m.
incxStride for elements of x.
aThe matrix $A$.
ldaLeading dimension of the matrix $A$
#define h2_trmm (   side,
  uplo,
  transa,
  diag,
  m,
  n,
  alpha,
  a,
  lda,
  b,
  ldb 
)    ztrmm_(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)

Compute matrix-matrix-multiplication for triangular matrices $A$ and a general matrix $B$.

Depending on the values of transa and side one of the following operations is performed: $B \gets \alpha A B$ or $B \gets \alpha \bar A^T B$ or $B \gets \alpha B A$ or $B \gets \alpha B \bar A^T$.

The operation is performed in-place, i.e. matrix $B$ will be overwritten by the product of the both matrices.

Parameters
sideDetermines if the matrix $A$ should be multiplied from "Left" or from "Right" to the matrix $B$.
uploDetermines if an "upper" right or a "lower" left triangular matrix $A$ should be used.
transaIf set to "Conjugate transposed" $\bar A^T$ will be used.
If set to "Transposed" $A^T$ will be used.
In all other cases $A$ will be used for the computation.
diagDetermines if a "Unit" diagonal should be used or "Non-unit" matrix coefficients stored within the matrix $A$.
mNumber of rows for the matrix b.
nNumber of columns for the matrix b.
alphaField scalar value used in the above mentioned computation.
aThe matrix $A$.
ldaLeading dimension of the matrix $A$
bThe matrix $B$.
ldbLeading dimension of the matrix $B$
#define h2_trmv (   uplo,
  trans,
  diag,
  n,
  a,
  lda,
  x,
  incx 
)    ztrmv_(uplo, trans, diag, n, a, lda, x, incx)

Compute matrix vector product of a triangular matrix $A$ with input and output vector $\vec x$.

The operation $\vec x \gets A \vec x$ or $\vec x \gets A^T \vec x$ or $\vec x \gets \bar A^T \vec x$ will be performed depending on the value of trans and the current type of field.

Parameters
uploDetermines if an "upper" right or a "lower" left triangular matrix $A$ should be used.
transIf set to "Conjugate transposed" $\bar A^T$ will be used.
If set to "Transposed" $A^T$ will be used.
In all other cases $A$ will be used for the computation.
diagDetermines if a "Unit" diagonal should be used or "Non-unit" matrix coefficients stored within the matrix $A$.
nNumber of row and columns for the matrix a.
aThe matrix $A$.
ldaLeading dimension of the matrix $A$
xInput/output field vector $\vec x$. Dimension of x should be at least n.
incxStride for elements of x.
#define h2_trsm (   side,
  uplo,
  transa,
  diag,
  m,
  n,
  alpha,
  a,
  lda,
  b,
  ldb 
)    ztrsm_(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)

Solves a linear system of equations with a triangular matrix $A$ and a right-hand-side matrix $B$.

Depending on the values of side and transa one of the following systems is being solved for a right-hand-side $B$ in-place:
$B \gets \alpha A^{-1} B$ or $B \gets \alpha \bar A^{-T} B$ or $B \gets \alpha B A^{-1}$ or $B \gets \alpha B \bar A^{-T}$.

Parameters
sideDetermines if the matrix $A^{-1}$ should be multiplied from "Left" or from "Right" to the matrix $B$.
uploDetermines if an "upper" right or a "lower" left triangular matrix $A$ should be used.
transaIf set to "Conjugate transposed" $\bar A^T$ will be used.
If set to "Transposed" $A^T$ will be used.
In all other cases $A$ will be used for the computation.
diagDetermines if a "Unit" diagonal should be used or "Non-unit" matrix coefficients stored within the matrix $A$.
mNumber of rows for the matrix b.
nNumber of columns for the matrix b.
alphaField scalar value used in the above mentioned computation.
aThe matrix $A$.
ldaLeading dimension of the matrix $A$
bThe matrix $B$.
ldbLeading dimension of the matrix $B$