f16 Chapter Contents
NAG Library Manual

# NAG Library Chapter Introductionf16 – NAG Interface to BLAS

## 1  Scope of the Chapter

This chapter is concerned with basic linear algebra functions which perform elementary algebraic operations involving vectors and matrices.

## 2  Background to the Problems

The functions in this chapter follow the specification of Basic Linear Algebra Subprograms Technical (BLAST) Forum (2001). They are called extensively by functions in other chapters of the NAG C Library, especially in the linear algebra chapters. They are intended to be useful building-blocks for users of the Library who are developing their own applications.
The functions fall into three main groups:
 1 scalar and vector operations, also referred to as Level 1 BLAS; 2 matrix-vector operations or Level 2 BLAS; 3 matrix operations which includes single matrix operations (Level 2 BLAS), matrix-matrix operations (Level 3 BLAS) and data movement operations on matrices.
The terminology reflects the number of operations involved, so for example a Level 2 function involves $O\left({n}^{2}\right)$ operations, for vectors and matrices of order $n$.
In many implementations of the NAG C Library, the functions in this chapter serve as interfaces to an efficient machine-specific implementation of the BLAS, usually provided by the vendor of the machine. Such implementations are stringently tested before being used with the NAG Library, to ensure that they correctly meet the specifications of the BLAS, and that they return the desired accuracy.

## 3  Recommendations on Choice and Use of Available Functions

The functions in this chapter make available only some of the Basic Linear Algebra Subprograms which carry out the low level operations required by linear algebra applications.
The operator arguments conj, diag, norm, order, side, trans and uplo are defined as enumeration types.
The order argument allows for 2D arrays to be supplied in either row or column ordering. The precise meaning of this for the packed and banded matrix storage schemes which are used by some of the functions in this chapter is described in the f07 and f08 Chapter Introductions.
The following values of arguments are invalid:
• – any value of the operator arguments whose meaning is not specified;
• – a negative value of any problem dimension or bandwidth;
• – too small a value for any of the stride arguments;
• – a zero value for the increment arguments.
Zero values for the matrix dimensions are considered valid.

## 4  Functionality Index

 Matrix operations,
 complex matrices,
 matrix copy,
 rectangular matrix nag_zge_copy (f16tfc)
 triangular matrix nag_ztr_copy (f16tec)
 matrix initialization,
 matrix-matrix product,
 one matrix Hermitian nag_zhemm (f16zcc)
 one matrix symmetric nag_zsymm (f16ztc)
 one matrix triangular nag_ztrmm (f16zfc)
 rectangular matrices nag_zgemm (f16zac)
 rank-2k update,
 of a Hermitian matrix nag_zher2k (f16zrc)
 of a symmetric matrix nag_zsyr2k (f16zwc)
 rank-k update,
 of a Hermitian matrix nag_zherk (f16zpc)
 of a symmetric matrix nag_zsyrk (f16zuc)
 solution of triangular systems of equations nag_ztrsm (f16zjc)
 real matrices,
 matrix copy,
 rectangular matrix nag_dge_copy (f16qfc)
 triangular matrix nag_dtr_copy (f16qec)
 matrix initialization,
 matrix-matrix product,
 one matrix symmetric nag_dsymm (f16ycc)
 one matrix triangular nag_dtrmm (f16yfc)
 rectangular matrices nag_dgemm (f16yac)
 rank-2k update of a symmetric matrix nag_dsyr2k (f16yrc)
 rank-k update of a symmetric matrix nag_dsyrk (f16ypc)
 solution of triangular systems of equations nag_dtrsm (f16yjc)
 Matrix-vector operations,
 complex matrix and vector(s),
 compute a norm or the element of largest absolute value,
 band matrix nag_zgb_norm (f16ubc)
 general matrix nag_zge_norm (f16uac)
 Hermitian band matrix nag_zhb_norm (f16uec)
 Hermitian matrix nag_zhe_norm (f16ucc)
 Hermitian packed matrix nag_zhp_norm (f16udc)
 symmetric matrix nag_zsy_norm (f16ufc)
 symmetric packed matrix nag_zsp_norm (f16ugc)
 matrix-vector product,
 Hermitian band matrix nag_zhbmv (f16sdc)
 Hermitian matrix nag_zhemv (f16scc)
 Hermitian packed matrix nag_zhpmv (f16sec)
 rectangular band matrix nag_zgbmv (f16sbc)
 rectangular matrix nag_zgemv (f16sac)
 symmetric matrix nag_zsymv (f16tac)
 symmetric packed matrix nag_zspmv (f16tcc)
 triangular band matrix nag_ztbmv (f16sgc)
 triangular matrix nag_ztrmv (f16sfc)
 triangular packed matrix nag_ztpmv (f16shc)
 rank-1 update,
 Hermitian matrix nag_zher (f16spc)
 Hermitian packed matrix nag_zhpr (f16sqc)
 rectangular matrix, unconjugated vector nag_zger (f16smc)
 rank-2 update,
 Hermitian matrix nag_zher2 (f16src)
 Hermitian packed matrix nag_zhpr2 (f16ssc)
 solution of a system of equations,
 triangular band matrix nag_ztbsv (f16skc)
 triangular matrix nag_ztrsv (f16sjc)
 triangular packed matrix nag_ztpsv (f16slc)
 real matrix and vector(s),
 compute a norm or the element of largest absolute value,
 band matrix nag_dgb_norm (f16rbc)
 general matrix nag_dge_norm (f16rac)
 symmetric band matrix nag_dsb_norm (f16rec)
 symmetric matrix nag_dsy_norm (f16rcc)
 symmetric packed matrix nag_dsp_norm (f16rdc)
 matrix-vector product,
 rectangular band matrix nag_dgbmv (f16pbc)
 rectangular matrix nag_dgemv (f16pac)
 symmetric band matrix nag_dsbmv (f16pdc)
 symmetric matrix nag_dsymv (f16pcc)
 symmetric packed matrix nag_dspmv (f16pec)
 triangular band matrix nag_dtbmv (f16pgc)
 triangular matrix nag_dtrmv (f16pfc)
 triangular packed matrix nag_dtpmv (f16phc)
 rank-1 update,
 rectangular matrix nag_dger (f16pmc)
 symmetric matrix nag_dsyr (f16ppc)
 symmetric packed matrix nag_dspr (f16pqc)
 rank-2 update,
 symmetric matrix nag_dsyr2 (f16prc)
 symmetric packed matrix nag_dspr2 (f16psc)
 solution of a system of equations,
 triangular band matrix nag_dtbsv (f16pkc)
 triangular matrix nag_dtrsv (f16pjc)
 triangular packed matrix nag_dtpsv (f16plc)
 Scalar and vector operations,
 complex vector(s),
 maximum absolute value and location nag_zamax_val (f16jsc)
 minimum absolute value and location nag_zamin_val (f16jtc)
 sum of elements nag_zsum (f16glc)
 sum of two scaled vectors nag_zaxpby (f16gcc)
 sum of two scaled vectors preserving input nag_zwaxpby (f16ghc)
 integer vector(s),
 maximum absolute value and location nag_iamax_val (f16dqc)
 maximum value and location nag_imax_val (f16dnc)
 minimum absolute value and location nag_iamin_val (f16drc)
 minimum value and location nag_imin_val (f16dpc)
 sum of elements nag_isum (f16dlc)
 real vector(s),
 dot product of two vectors with optional scaling and accumulation nag_ddot (f16eac)
 maximum absolute value and location nag_damax_val (f16jqc)
 maximum value and location nag_dmax_val (f16jnc)
 minimum absolute value and location nag_damin_val (f16jrc)
 minimum value and location nag_dmin_val (f16jpc)
 sum of elements nag_dsum (f16elc)
 sum of two scaled vectors nag_daxpby (f16ecc)
 sum of two scaled vectors preserving input nag_dwaxpby (f16ehc)

None.

## 6  Functions Withdrawn or Scheduled for Withdrawal

None.
Basic Linear Algebra Subprograms Technical (BLAST) Forum (2001) Basic Linear Algebra Subprograms Technical (BLAST) Forum Standard University of Tennessee, Knoxville, Tennessee http://www.netlib.org/blas/blast-forum/blas-report.pdf

f16 Chapter Contents