%
% To use:
% xdvi -paper a4r <fnam>
% dvips -tlandscape
%
\documentstyle[11pt]{report}
\setlength{\parindent}{0in}
\setlength{\parskip}{0.1in}
\oddsidemargin=-.015in
\evensidemargin=-.015in
\textwidth=10in
\topmargin=-1.2in
\textheight=7.4in
% \textheight=6in
\hoffset=-.8in

\begin{document}

\scriptsize

\begin{tabular}{ l l }
\begin{tabular}{ l l l }
{\small\bf Level 1 BLAS}\\
\verb+                   dim scalar vector   vector   scalars              5-element array+ &
                        & prefixes \\
\verb+SUBROUTINE xROTG (                                      A, B, C, S )+ &
      Generate plane rotation & S, D \\
\verb+SUBROUTINE xROTMG(                              D1, D2, A, B,        PARAM )+ &
                       Generate modified plane rotation & S, D \\
\verb+SUBROUTINE xROT  ( N,         X, INCX, Y, INCY,               C, S )+ &
                       Apply plane rotation & S, D \\
\verb+SUBROUTINE xROTM ( N,         X, INCX, Y, INCY,                      PARAM )+ &
                       Apply modified plane rotation & S, D \\
\verb+SUBROUTINE xSWAP ( N,         X, INCX, Y, INCY )+ &
                       $ x \leftrightarrow y $ & S, D, C, Z \\
\verb+SUBROUTINE xSCAL ( N,  ALPHA, X, INCX )+ &
                       $ x \leftarrow \alpha x $ & S, D, C, Z, CS, ZD \\
\verb+SUBROUTINE xCOPY ( N,         X, INCX, Y, INCY )+ &
                       $ y \leftarrow x $ & S, D, C, Z \\
\verb+SUBROUTINE xAXPY ( N,  ALPHA, X, INCX, Y, INCY )+ &
                       $ y \leftarrow \alpha x + y $ & S, D, C, Z \\
\verb+FUNCTION   xDOT  ( N,         X, INCX, Y, INCY )+ &
                       $ dot \leftarrow x ^ {T} y $ & S, D, DS \\
\verb+FUNCTION   xDOTU ( N,         X, INCX, Y, INCY )+ &
                       $ dot \leftarrow x ^ {T} y $ & C, Z \\
\verb+FUNCTION   xDOTC ( N,         X, INCX, Y, INCY )+ &
                       $ dot \leftarrow x ^ {H} y $ & C, Z \\
\verb+FUNCTION   xxDOT ( N,         X, INCX, Y, INCY )+ &
                       $ dot \leftarrow \alpha + x ^ {T} y $ & SDS \\
\verb+FUNCTION   xNRM2 ( N,         X, INCX )+ &
                       $ nrm2 \leftarrow || x || _ {2} $ & S, D, SC, DZ \\
\verb+FUNCTION   xASUM ( N,         X, INCX )+ &
                       $ asum \leftarrow || re( x ) || _ {1}  + || im( x ) || _ {1} $ & S, D, SC, DZ \\
\verb+FUNCTION   IxAMAX( N,         X, INCX )+ &
                       $ amax \leftarrow 1^{st} k \ni | re( x _ {k} ) |  + | im( x _ {k} ) | $ & S, D, C, Z \\
                       & \verb+            + $ = max( | re( x _ {i} ) |  + | im( x _ {i} ) | ) $ \\ 

{\small\bf Level 2 BLAS}\\
\verb+        options            dim   b-width scalar matrix  vector   scalar vector+ &\\
\verb+xGEMV (        TRANS,      M, N,         ALPHA, A, LDA, X, INCX, BETA,  Y, 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 \\
\verb+xGBMV (        TRANS,      M, N, KL, KU, ALPHA, A, LDA, X, INCX, BETA,  Y, 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 \\
\verb+xHEMV ( UPLO,                 N,         ALPHA, A, LDA, X, INCX, BETA,  Y, INCY )+ &
$ y \leftarrow \alpha A x + \beta y $
   & C, Z \\
\verb+xHBMV ( UPLO,                 N, K,      ALPHA, A, LDA, X, INCX, BETA,  Y, INCY )+ &
$ y \leftarrow \alpha A x + \beta y $
   & C, Z \\
\verb+xHPMV ( UPLO,                 N,         ALPHA, AP,     X, INCX, BETA,  Y, INCY )+ &
$ y \leftarrow \alpha A x + \beta y $
   & C, Z \\
\verb+xSYMV ( UPLO,                 N,         ALPHA, A, LDA, X, INCX, BETA,  Y, INCY )+ &
$ y \leftarrow \alpha A x + \beta y $
   & S, D \\
\verb+xSBMV ( UPLO,                 N, K,      ALPHA, A, LDA, X, INCX, BETA,  Y, INCY )+ &
$ y \leftarrow \alpha A x + \beta y $
   & S, D \\
\verb+xSPMV ( UPLO,                 N,         ALPHA, AP,     X, INCX, BETA,  Y, INCY )+ &
$ y \leftarrow \alpha A x + \beta y $
   & S, D \\
\verb+xTRMV ( UPLO, TRANS, DIAG,    N,                A, LDA, X, INCX )+ &
$ x \leftarrow A x, x \leftarrow A ^{T} x, x \leftarrow A ^ {H} x $
   & S, D, C, Z \\
\verb+xTBMV ( UPLO, TRANS, DIAG,    N, K,             A, LDA, X, INCX )+ &
$ x \leftarrow A x, x \leftarrow A ^{T} x, x \leftarrow A ^ {H} x $
   & S, D, C, Z \\
\verb+xTPMV ( UPLO, TRANS, DIAG,    N,                AP,     X, INCX )+ &
$ x \leftarrow A x, x \leftarrow A ^{T} x, x \leftarrow A ^ {H} x $
   & S, D, C, Z \\
\verb+xTRSV ( UPLO, TRANS, DIAG,    N,                A, LDA, X, INCX )+ &
$ x \leftarrow A ^{-1} x, x \leftarrow A ^{-T} x, x \leftarrow A ^ {-H} x $
   & S, D, C, Z \\
\verb+xTBSV ( UPLO, TRANS, DIAG,    N, K,             A, LDA, X, INCX )+ &
$ x \leftarrow A ^{-1} x, x \leftarrow A ^{-T} x, x \leftarrow A ^ {-H} x $
   & S, D, C, Z \\
\verb+xTPSV ( UPLO, TRANS, DIAG,    N,                AP,     X, INCX )+ &
$ x \leftarrow A ^{-1} x, x \leftarrow A ^{-T} x, x \leftarrow A ^ {-H} x $
   & S, D, C, Z \\
\verb+        options            dim   scalar vector   vector   matrix+ &\\
\verb+xGER  (                    M, N, ALPHA, X, INCX, Y, INCY, A, LDA )+ &
$ A \leftarrow \alpha x y ^{T} + A , A - m \times n $
   & S, D \\
\verb+xGERU (                    M, N, ALPHA, X, INCX, Y, INCY, A, LDA )+ &
$ A \leftarrow \alpha x y ^{T} + A , A - m \times n $
   & C, Z \\
\verb+xGERC (                    M, N, ALPHA, X, INCX, Y, INCY, A, LDA )+ &
$ A \leftarrow \alpha x y ^{H} + A , A - m \times n $
   & C, Z \\
\verb+xHER  ( UPLO,                 N, ALPHA, X, INCX,          A, LDA )+ &
$ A \leftarrow \alpha x x ^{H} + A $
   & C, Z \\
\verb+xHPR  ( UPLO,                 N, ALPHA, X, INCX,          AP )+ &
$ A \leftarrow \alpha x x ^{H} + A $
   & C, Z \\
\verb+xHER2 ( UPLO,                 N, ALPHA, X, INCX, Y, INCY, A, LDA )+ &
$ A \leftarrow \alpha x y ^{H} + y ( \alpha x ) ^ {H} + A $
   & C, Z \\
\verb+xHPR2 ( UPLO,                 N, ALPHA, X, INCX, Y, INCY, AP )+ &
$ A \leftarrow \alpha x y ^{H} + y ( \alpha x ) ^ {H} + A $
   & C, Z \\
\verb+xSYR  ( UPLO,                 N, ALPHA, X, INCX,          A, LDA )+ &
$ A \leftarrow \alpha x x ^{T} + A $
   & S, D \\
\verb+xSPR  ( UPLO,                 N, ALPHA, X, INCX,          AP )+ &
$ A \leftarrow \alpha x x ^{T} + A $
   & S, D \\
\verb+xSYR2 ( UPLO,                 N, ALPHA, X, INCX, Y, INCY, A, LDA )+ &
$ A \leftarrow \alpha x y ^{T} + \alpha y x ^ {T} + A $
   & S, D \\
\verb+xSPR2 ( UPLO,                 N, ALPHA, X, INCX, Y, INCY, AP )+ &
$ A \leftarrow \alpha x y ^{T} + \alpha y x ^ {T} + A $
   & S, D \\ \\ 

{\small\bf Level 3 BLAS}\\
\verb+        options                          dim      scalar matrix  matrix  scalar matrix+ &\\
\verb+xGEMM (             TRANSA, TRANSB,      M, N, K, ALPHA, A, LDA, B, LDB, BETA,  C, 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 \\
\verb+xSYMM ( SIDE, UPLO,                      M, N,    ALPHA, A, LDA, B, LDB, BETA,  C, LDC )+ &
$ C \leftarrow \alpha AB + \beta C, C \leftarrow \alpha BA + \beta C, C - m \times n, A = A ^{T} $
   & S, D, C, Z \\
\verb+xHEMM ( SIDE, UPLO,                      M, N,    ALPHA, A, LDA, B, LDB, BETA,  C, LDC )+ &
$ C \leftarrow \alpha AB + \beta C, C \leftarrow \alpha BA + \beta C, C - m \times n, A = A ^{H} $
   & C, Z \\
\verb+xSYRK (       UPLO, TRANS,                  N, K, ALPHA, A, LDA,         BETA,  C, LDC )+ &
$ C \leftarrow \alpha AA ^{T} + \beta C, C \leftarrow \alpha A ^{T} A + \beta C, C - n \times n $
   & S, D, C, Z \\
\verb+xHERK (       UPLO, TRANS,                  N, K, ALPHA, A, LDA,         BETA,  C, LDC )+ &
$ C \leftarrow \alpha AA ^{H} + \beta C, C \leftarrow \alpha A ^{H} A + \beta C, C - n \times n $
   & C, Z \\
\verb+xSYR2K(       UPLO, TRANS,                  N, K, ALPHA, A, LDA, B, LDB, BETA,  C, 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 \\
\verb+xHER2K(       UPLO, TRANS,                  N, K, ALPHA, A, LDA, B, LDB, BETA,  C, 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 \\
\verb+xTRMM ( SIDE, UPLO, TRANSA,        DIAG, M, N,    ALPHA, A, LDA, B, 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 \\
\verb+xTRSM ( SIDE, UPLO, TRANSA,        DIAG, M, N,    ALPHA, A, LDA, B, 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 \\
\end{tabular}
\end{tabular}

\begin{tabular}{ l l l }
{\setlength{\textwidth}{2.0in}} 
\begin{tabular}{l}

{\bf Meaning of prefixes} \\

\vspace{.25in} 

\begin{tabular}{l l l}
S - REAL              &  C - COMPLEX \\
D - DOUBLE PRECISION  &  Z - COMPLEX*16    \\
                      &  (this may not be supported \\
                      & by all machines) \\
\end{tabular}
\\ \\ \\

\noindent
For the Level 2 BLAS a set of extended-precision routines with \\
the prefixes
ES, ED, EC, EZ may also be available.\\ \\ \\

{\bf Level 1 BLAS }\\
\noindent
In addition to the listed routines there are two further\\
extended-precision dot product routines DQDOTI and DQDOTA.\\ \\ \\


{\bf Level 2 and Level 3 BLAS }\\ 
\noindent
Matrix types:\\
\begin {tabular}{l l l}
GE - GEneral     &  GB - General Band \\
SY - SYmmetric   &  SB - Sym. Band    &  SP - Sum. Packed \\
HE - HErmitian   &  HB - Herm. Band   &  HP - Herm. Packed \\
TR - TRiangular  &  TB - Triang. Band &  TP - Triang. Packed \\
\end {tabular}
\\ \\ \\

Level 2 and Level 3 BLAS Options\\ 
\noindent
Dummy options arguments are declared as CHARACTER*1 \\
and may be passed as character strings.\\

\begin{tabular}{l l}
TRANx  &  = `{\bf N}o transpose',  `{\bf T}ranspose',  \\
       & \verb+    + `{\bf C}onjugate transpose' $( X, X ^{T}, X^{H} )$ \\
UPLO  &  = `{\bf U}pper triangular',  `{\bf L}ower triangular'\\
DIAG  &  = `{\bf N}on-unit triangular',  `{\bf U}nit triangular'\\
SIDE  &  = `{\bf L}eft',  `{\bf R}ight' (A or op(A) on the left, \\
      & \verb+    + or A or op(A)
on the right) \\
\end{tabular}
\vspace{.15in} 
\\ \\ \\ 

\noindent
For real matrices, TRANSx = `T' and TRANSx = `C' have \\
the same meaning.\\
For Hermitian matrices, TRANSx = `T' is not allowed.\\
For complex symmetric matrices, TRANSx = `H' is not \\
allowed.\\ \\
\end{tabular}

% \newpage
\begin{tabular}{l}

\underline{{\large References}}  \\  \\

C. Lawson, R. Hanson, D. Kincaid, and F. Krogh, ``Basic \\
Linear Algebra Subprograms for Fortran Usage,'' {\it ACM Trans.} \\
{\it on Math. Soft.} 5 (1979) 308-325 
\\ \\
J.J. Dongarra, J. DuCroz, S. Hammarling, and R. Hanson,\\
``An Extended Set of Fortran Basic Linear Algebra Subprograms,''\\
{\it ACM Trans. on Math. Soft.} 14,1 (1988) 1-32
\\ \\
J.J. Dongarra, I. Duff, J. DuCroz, and S. Hammarling, ``A Set \\
of Level 3 Basic Linear Algebra Subprograms,'' {\it ACM Trans.} \\
{\it on Math. Soft.} (1989) 
\\ \\


\underline{{\large Obtaining the Software via \verb+netlib@ornl.gov+}}  \\  \\
To receive a copy of the single-precision software, \\
type in a mail message:\\
\verb+ send sblas from blas + \\
\verb+ send sblas2 from blas + \\
\verb+ send sblas3 from blas + \\
\\
To receive a copy of the double-precision software, \\
type in a mail message:\\
\verb+ send dblas from blas + \\
\verb+ send dblas2 from blas + \\
\verb+ send dblas3 from blas + \\
\\
To receive a copy of the complex single-precision software, \\
type in a mail message:\\
\verb+ send cblas from blas + \\
\verb+ send cblas2 from blas + \\
\verb+ send cblas3 from blas + \\
\\
To receive a copy of the complex double-precision software, \\
type in a mail message:\\
\verb+ send zblas from blas + \\
\verb+ send zblas2 from blas + \\
\verb+ send zblas3 from blas + \\
\\
Send comments and questions to \verb+ lapack@cs.utk.edu +.


\end{tabular}


\begin{tabular}{ l }
\vspace{.5in} \\
\vspace{.5in}
\verb+      +{\Huge\bf Basic } \\
\vspace{.5in}
\verb+      +{\Huge\bf Linear } \\
\vspace{.5in}
\verb+      +{\Huge\bf Algebra } \\
\vspace{.5in}
\verb+      +{\Huge\bf Subprograms}\\ \\ \\
\verb+      +{\LARGE\bf A Quick Reference Guide \verb+         +}\\ \\ \\
\verb+      +{\normalsize\bf University of Tennessee}\\
\verb+      +{\normalsize\bf Oak Ridge National Laboratory}\\
\verb+      +{\normalsize\bf Numerical Algorithms Group Ltd.}\\ \\ \\
\verb+      +\today
\end{tabular}

\end{tabular}

\end{document}
