%
% To use:
% xdvi -paper a4r <fnam>
% dvips -tlandscape
%
\documentclass[10pt,landscape]{report}
\setlength{\parindent}{0in}
\setlength{\parskip}{0.1in}
\oddsidemargin=-.015in
\evensidemargin=-.015in
\textwidth=10in
\topmargin=-.2in
\textheight=8in
\voffset=-.75in
% \hoffset=-.6in
\pagestyle{empty}
\newcommand{\Wskip}[1]{ }
\newenvironment{routdef}[1]
{
   \begin{list}{BLANK}
   {
      \setlength{\parsep}{0in}
      \setlength{\itemsep}{.01in}
      \setlength{\partopsep}{0in}
      \setlength{\topsep}{0.1in}
      \setlength{\labelsep}{0in}
      \setlength{\labelwidth}{#1in}
      \setlength{\leftmargin}{#1in}
   }
} {\end{list}}
%\rditem{rout name}{parameters}
\newcommand{\rditem}[2]{\item[#1\hfill(~]#2 )}

% qritem{rout name}{rout parameters}{desc}{pref}
\newcommand{\qritem}[4]{\mbox{\parbox[t]{1in}{#1}\parbox[t]{5.75in}{(#2)}\hspace{.25in}\parbox[t]{2in}{#3}\hspace{.25in}\parbox[t]{.75in}{#4}} \\}

\newcommand{\Wpre}[0]{\diamondsuit}
\begin{document}

\scriptsize

\centerline{\Large \bf ATLAS ANSI/ISO C BLAS API REFERENCE}

\qritem{\bf ROUTINE}{\bf ARGUMENTS}{\bf DESCRIPTION}{\bf PREFIXES}

{\samepage
{\small\bf Level 1 BLAS}\\
\qritem{void cblas\_$\Wpre$rotg}{TYPE *a, TYPE *b, TYPE *c, TYPE *s}
       {Generate plane rotation}{S, D}
\qritem{\it void cblas\_$\Wpre$rotg}{TYPE *a, TYPE *b, TYPE *c, TYPE *s}
       {Generate plane rotation}{C, Z}
\qritem{void cblas\_$\Wpre$rotmg}
       {TYPE *d1, TYPE *d2, TYPE *b1, SCALAR b2, TYPE *P}
       {Generate modified plane rotation}{S,D}
\qritem{void cblas\_$\Wpre$rot}
       {const int N, TYPE *X, const int incX,
        TYPE *Y, const int incY, SCALAR c, SCALAR s}
       {Apply plane rotation}{S,D}
\qritem{\it void cblas\_$\Wpre$rot}
       {const int N, TYPE *X, const int incX,
        TYPE *Y, const int incY, const UTYPE c, const UTYPE s}
       {Apply plane rotation}{CS,ZD}
\qritem{void cblas\_$\Wpre$rotm}
       {const int N, TYPE *X, const int incX,
        TYPE *Y, const int incY, SCALAR c, TYPE *P}
       {Apply modified plane rotation}{S,D}
\qritem{void cblas\_$\Wpre$scal}
       {const int N, SCALAR alpha, TYPE *X, const int incX}
       {$x \leftrightarrow y$}
       {S,D,C,Z,CS,ZD}
\qritem{void cblas\_$\Wpre$copy}
       {const int N, const TYPE *X, const int incX, TYPE *Y, const int incY}
       {$ y \leftarrow x $}
       {S,D,C,Z}
\qritem{void cblas\_$\Wpre$axpy}
       {const int N, SCALAR alpha, const TYPE *X,
        const int incX, TYPE *Y, const int incY}
       {$ y \leftarrow \alpha x + y $}
       {S,D,C,Z}
\qritem{TYPE cblas\_$\Wpre$dot}
       {const int N, const TYPE *X, const int incX, 
        const TYPE *Y, const int incY}
       {$ cblas\_dot \leftarrow x ^ {T} y $}
       {S,D,DS}
\qritem{void cblas\_$\Wpre$dotu\_sub}
       {const int N, const TYPE *X, const int incX,
        const TYPE *Y, const int incY, TYPE *dotu}
       {$ dotu \leftarrow x ^ {T} y $}
       {C,Z}
\qritem{void cblas\_$\Wpre$dotc\_sub}
       {const int N, const TYPE *X, const int incX,
        const TYPE *Y, const int incY, TYPE *dotc}
       {$ dotc \leftarrow x ^ {H} y $}
       {C,Z}
\qritem{float cblas\_sdsdot}
       {const int N, const float alpha, const float *X,
        const int incX, const float *Y, const int incY}
       {$ dot \leftarrow \alpha + x ^ {T} y $}
       {SDS}
\qritem{UTYPE cblas\_$\Wpre$nrm2}
       {const int N, const TYPE *X, const int incX}
       {$ cblas\_nrm2 \leftarrow || x || _ {2} $}
       {S,D,SC,DZ}
\qritem{UTYPE cblas\_$\Wpre$asum}
       {const int N, const TYPE *X, const int incX}
       {$ cblas\_asum \leftarrow || re( x ) || _ {1}  + || im( x ) || _ {1} $}
       {S,D,SC,DZ}
\qritem{CBLAS\_INDEX cblas\_i$\Wpre$amax}
       {const int N, const TYPE *X, const int incX}
       {$ amax \leftarrow 1^{st} k \ni | re( x _ {k} ) |  + | im( x _ {k} ) | $}
       {S,D,C,Z}
}

{\samepage
{\small\bf Level 3 BLAS}\\
\qritem{void cblas\_$\Wpre$gemm}
{  const enum CBLAS\_ORDER Order, const enum CBLAS\_TRANSPOSE TransA,
   const enum CBLAS\_TRANSPOSE TransB, const int M, const int N,
   const int K, const SCALAR alpha, const TYPE *A,
   const int lda, const TYPE *B, const int ldb,
   const SCALAR beta, TYPE *C, const int ldc
}
{  ${C \leftarrow \alpha op(A)op(B) + \beta C}$, ${op(X) = X, X ^{T}, X ^{H}}$,
   ${C - m \times n}$
}
{S,D,C,Z}
\qritem{void cblas\_$\Wpre$symm}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_SIDE Side,
   const enum CBLAS\_UPLO Uplo, const int M, const int N,
   SCALAR alpha, const TYPE *A, const int lda,
   const TYPE *B, const int ldb, SCALAR beta, TYPE *C, const int ldc
}
{$C \leftarrow \alpha AB + \beta C$, $C \leftarrow \alpha BA + \beta C$, 
 $C - m \times n$, $A = A ^{T}$}
{S,D,C,Z}
\qritem{void cblas\_$\Wpre$hemm}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_SIDE Side,
   const enum CBLAS\_UPLO Uplo, const int M, const int N,
   const void *alpha, const void *A, const int lda,
   const void *B, const int ldb, const void *beta,
   void *C, const int ldc
}
{$C \leftarrow \alpha AB + \beta C$, $C \leftarrow \alpha BA + \beta C$, 
 $C - m \times n, A = A ^{H}$}
{C,Z}
\qritem{void cblas\_$\Wpre$syrk}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const enum CBLAS\_TRANSPOSE Trans, const int N, const int K,
   SCALAR alpha, const TYPE *A, const int lda,
   SCALAR beta, TYPE *C, const int ldc
}
{$C \leftarrow \alpha AA ^{T} + \beta C$, 
 $C \leftarrow \alpha A ^{T} A + \beta C$, $C - n \times n$}
{S,D,C,Z}
\qritem{void cblas\_$\Wpre$herk}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const enum CBLAS\_TRANSPOSE Trans, const int N, const int K,
   const UTYPE alpha, const void *A, const int lda,
   const UTYPE beta, void *C, const int ldc
}
{$C \leftarrow \alpha AA ^{H} + \beta C$, 
 $C \leftarrow \alpha A ^{H} A + \beta C$, $C - n \times n$}
{C,Z}
\qritem{void cblas\_$\Wpre$syr2k}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const enum CBLAS\_TRANSPOSE Trans, const int N, const int K,
   SCALAR alpha, const TYPE *A, const int lda,
   const TYPE *B, const int ldb, SCALAR beta, TYPE *C, const int ldc
}
{$C \leftarrow \alpha AB ^{T} + \bar{\alpha} BA ^{T} + \beta C$, 
 $C \leftarrow \alpha A ^{T} B + \bar{\alpha} B ^{T} A + \beta C$,
 $C - n \times n$}
{S,D,C,Z}
\qritem{void cblas\_$\Wpre$her2k}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const enum CBLAS\_TRANSPOSE Trans, const int N, const int K,
   const void *alpha, const void *A, const int lda,
   const void *B, const int ldb, const UTYPE beta, void *C, const int ldc
}
{$C \leftarrow \alpha AB ^{H} + \bar{\alpha} BA ^{H} + \beta C$, 
 $C \leftarrow \alpha A ^{H} B + \bar{\alpha} B ^{H} A + \beta C$, 
 $C - n \times n$}
{C,Z}
\qritem{void cblas\_$\Wpre$trmm}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_SIDE Side,
   const enum CBLAS\_UPLO Uplo, const enum CBLAS\_TRANSPOSE TransA,
   const enum CBLAS\_DIAG Diag, const int M, const int N,
   SCALAR alpha, const TYPE *A, const int lda,
   TYPE *B, const int ldb
}
{$B \leftarrow \alpha op(A)B$, $B \leftarrow \alpha B op(A)$, 
 $op(A) = A, A ^{T}, A ^{H}$, $B - m \times n$}
{S,D,C,Z}
\qritem{void cblas\_$\Wpre$trsm}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_SIDE Side,
   const enum CBLAS\_UPLO Uplo, const enum CBLAS\_TRANSPOSE TransA,
   const enum CBLAS\_DIAG Diag, const int M, const int N,
   SCALAR alpha, const TYPE *A, const int lda, TYPE *B, const int ldb
}
{$B \leftarrow \alpha op(A ^{-1} )B$, $B \leftarrow \alpha B op(A ^{-1} )$,
 $op(A) = A, A ^{T}, A ^{H}$, $B - m \times n$}
{S,D,C,Z}
}

\mbox{
\parbox[t]{4.75in}
{
\normalsize
\centerline{\bf NOTES:}
\begin{itemize}
\item Routines in {\it italics} are not mandated by the BLAS standard.
\item Calling routines should include the standard header file,
{\tt cblas.h}.
\item More information available at
{\tt http://math-atlas.sourceforge.net/}.
\end{itemize}
}
\hspace*{.5in}
\parbox[t]{4.75in}{
\begin{center}
{\normalsize \bf PREFIX RELATED DEFINITIONS :}
\vspace{.1in}
\
\begin{tabular}{||l|l|l|l|l||}\hline\hline
\tt
$\Wpre${\rm is} & {\rm Data operated }          & TYPE  & UTYPE & SCALAR\\\hline\hline
  s            & {\rm single precision real}    & float & float & const float\\\hline
  d            & {\rm double precision real}    & double & double & const double\\\hline
  c            & {\rm single precision complex} & void   & float  & const void*\\\hline
  z            & {\rm double precision complex} & void   & double & const void*\\\hline\hline
\end{tabular}
\end{center}
}
}

\newpage

\centerline{\Large \bf ATLAS ANSI/ISO C BLAS API REFERENCE}

\qritem{\bf ROUTINE}{\bf ARGUMENTS}{\bf DESCRIPTION}{\bf PREFIXES}

{\samepage
{\small\bf Level 2 BLAS}\\
\qritem{void cblas\_$\Wpre$gemv}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_TRANSPOSE TransA,
   const int M, const int N, SCALAR alpha, const TYPE *A,
   const int lda, const TYPE *X, const int incX, SCALAR beta,
   TYPE *Y, const int incY
}
{
   ${y \leftarrow \alpha A x + \beta y}$, 
   ${y \leftarrow \alpha A ^ {T} x + \beta y}$, 
   ${y \leftarrow \alpha A ^{H} x + \beta y}$, ${A - m \times n}$
}
{S,D,C,Z}
\qritem{void cblas\_$\Wpre$gbmv}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_TRANSPOSE TransA,
   const int M, const int N, const int KL, const int KU,
   SCALAR alpha, const TYPE *A, const int lda, const TYPE *X,
   const int incX, SCALAR beta, TYPE *Y, const int incY
}
{
   ${y \leftarrow \alpha A x + \beta y}$, 
   ${y \leftarrow \alpha A ^ {T} x + \beta y}$, 
   ${y \leftarrow \alpha A ^{H} x + \beta y}$, ${A - m \times n}$
}
{S,D,C,Z}
\qritem{void cblas\_$\Wpre$hemv}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo, const int N, 
   const void *alpha, const void *A, const int lda, const void *X,
   const int incX, const void *beta, void *Y, const int incY
}
{$ y \leftarrow \alpha A x + \beta y $}{C,Z}
\qritem{void cblas\_$\Wpre$hbmv}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo, const int N,
   const int K, const void *alpha, const void *A, const int lda,
   const void *X, const int incX, const void *beta, void *Y, const int incY
}
{$ y \leftarrow \alpha A x + \beta y $}{C,Z}
\qritem{void cblas\_$\Wpre$hpmv}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo, const int N,
   const void *alpha, const void *Ap, const void *X, const int incX,
   const void *beta, void *Y, const int incY
}
{$ y \leftarrow \alpha A x + \beta y $}{C,Z}
\qritem{void cblas\_$\Wpre$symv}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const int N, SCALAR alpha, const TYPE *A,
   const int lda, const TYPE *X, const int incX,
   SCALAR beta, TYPE *Y, const int incY
}
{$ y \leftarrow \alpha A x + \beta y $}{S,D}
\qritem{void cblas\_$\Wpre$sbmv}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const int N, const int K, SCALAR alpha, const TYPE *A,
   const int lda, const TYPE *X, const int incX,
   SCALAR beta, TYPE *Y, const int incY
}
{$ y \leftarrow \alpha A x + \beta y $}{S,D}
\qritem{void cblas\_$\Wpre$spmv}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const int N, SCALAR alpha, const TYPE *Ap,
   const TYPE *X, const int incX,
   SCALAR beta, TYPE *Y, const int incY
}
{$ y \leftarrow \alpha A x + \beta y $}{S,D}
\qritem{void cblas\_$\Wpre$trmv}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const enum CBLAS\_TRANSPOSE TransA, const enum CBLAS\_DIAG Diag,
   const int N, const TYPE *A, const int lda,
   TYPE *X, const int incX
}
{${x \leftarrow A x}$, ${x \leftarrow A ^{T} x}$, ${x \leftarrow A ^ {H} x}$}
{S,D,C,Z}
\qritem{void cblas\_$\Wpre$tbmv}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const enum CBLAS\_TRANSPOSE TransA, const enum CBLAS\_DIAG Diag,
   const int N, const int K, const TYPE *A, const int lda,
   TYPE *X, const int incX
}
{${x \leftarrow A x}$, ${x \leftarrow A ^{T} x}$, ${x \leftarrow A ^ {H} x}$}
{S,D,C,Z}
\qritem{void cblas\_$\Wpre$tpmv}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const enum CBLAS\_TRANSPOSE TransA, const enum CBLAS\_DIAG Diag,
   const int N, const TYPE *Ap, TYPE *X, const int incX
}
{${x \leftarrow A x}$, ${x \leftarrow A ^{T} x}$, ${x \leftarrow A ^ {H} x}$}
{S,D,C,Z}
\qritem{void cblas\_$\Wpre$trsv}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const enum CBLAS\_TRANSPOSE TransA, const enum CBLAS\_DIAG Diag,
   const int N, const TYPE *A, const int lda, TYPE *X,
   const int incX
}
{$ x \leftarrow A ^{-1} x$, $x \leftarrow A ^{-T} x$, $x \leftarrow A ^ {-H} x$}
{S,D,C,Z}
\qritem{void cblas\_$\Wpre$tbsv}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const enum CBLAS\_TRANSPOSE TransA, const enum CBLAS\_DIAG Diag,
   const int N, const int K, const TYPE *A, const int lda,
   TYPE *X, const int incX
}
{$ x \leftarrow A ^{-1} x$, $x \leftarrow A ^{-T} x$, $x \leftarrow A ^ {-H} x$}
{S,D,C,Z}
\qritem{void cblas\_$\Wpre$tpsv}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const enum CBLAS\_TRANSPOSE TransA, const enum CBLAS\_DIAG Diag,
   const int N, const TYPE *Ap, TYPE *X, const int incX
}
{$ x \leftarrow A ^{-1} x$, $x \leftarrow A ^{-T} x$, $x \leftarrow A ^ {-H} x$}
{S,D,C,Z}

\qritem{void cblas\_$\Wpre$ger}
{
   const enum CBLAS\_ORDER Order, const int M, const int N,
   SCALAR alpha, const TYPE *X, const int incX,
   const TYPE *Y, const int incY, TYPE *A, const int lda
}
{$A \leftarrow \alpha x y ^{T} + A$, $A - m \times n$}{S,D}
\qritem{void cblas\_$\Wpre$geru}
{
   const enum CBLAS\_ORDER Order, const int M, const int N,
   const void *alpha, const void *X, const int incX,
   const void *Y, const int incY, void *A, const int lda
}
{$A \leftarrow \alpha x y ^{T} + A$, $A - m \times n$}{C,Z}
\qritem{void cblas\_$\Wpre$gerc}
{
   const enum CBLAS\_ORDER Order, const int M, const int N,
   const void *alpha, const void *X, const int incX,
   const void *Y, const int incY, void *A, const int lda
}
{$A \leftarrow \alpha x y ^{H} + A$, $A - m \times n$}{C,Z}
\qritem{void cblas\_$\Wpre$her}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const int N, const UTYPE alpha, const void *X, const int incX,
   void *A, const int lda
}
{$A \leftarrow \alpha x x ^{H} + A$}{C,Z}
\qritem{void cblas\_$\Wpre$hpr}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const int N, const UTYPE alpha, const void *X, const int incX, void *A
}
{$A \leftarrow \alpha x x ^{H} + A$}{C,Z}
\qritem{void cblas\_$\Wpre$her2}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo, const int N,
   const void *alpha, const void *X, const int incX,
   const void *Y, const int incY, void *A, const int lda
}
{$A \leftarrow \alpha x y ^{H} + y ( \alpha x ) ^ {H} + A$}{C,Z}
\qritem{void cblas\_$\Wpre$hpr2}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo, const int N,
   const void *alpha, const void *X, const int incX,
   const void *Y, const int incY, void *Ap
}
{$A \leftarrow \alpha x y ^{H} + y ( \alpha x ) ^ {H} + A$}
{C,Z}
\qritem{void cblas\_$\Wpre$syr}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const int N, SCALAR alpha, const TYPE *X,
   const int incX, TYPE *A, const int lda
}
{$A \leftarrow \alpha x x ^{T} + A$}{S,D}
\qritem{void cblas\_$\Wpre$spr}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const int N, SCALAR alpha, const TYPE *X, const int incX, TYPE *Ap
}
{$A \leftarrow \alpha x x ^{T} + A$}{S,D}
\qritem{void cblas\_$\Wpre$syr2}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const int N, SCALAR alpha, const TYPE *X,
   const int incX, const TYPE *Y, const int incY, TYPE *A, const int lda
}
{$A \leftarrow \alpha x y ^{T} + \alpha y x ^ {T} + A$}{S,D}
\qritem{void cblas\_$\Wpre$spr2}
{
   const enum CBLAS\_ORDER Order, const enum CBLAS\_UPLO Uplo,
   const int N, SCALAR alpha, const TYPE *X,
   const int incX, const TYPE *Y, const int incY, TYPE *A
}
{$A \leftarrow \alpha x y ^{T} + \alpha y x ^ {T} + A$}{S,D}
}


\end{document}
