Basic Matrix / Vector Operations

BASIC LINEAR ALGEBRA SUBPROGRAMS (BLAS)

LEVEL 1 BLAS

ROUTINE DESCRIPTION
SSET Sets the components of a vector to a scalar.
SCOPY Copies a vector x to a vector y, both single precision.
SSCAL Multiplies a vector by a scalar, y ← α y, both single precision.
SVCAL Multiplies a vector by a scalar and stores the result in another vector, y ←α  x, all single precision.
SADD Adds a scalar to each component of a vector, x ← x + a, all single precision.
SSUB Subtract each component of a vector from a scalar, x ← a - x, all single precision.
SAXPY Subtract each component of a vector plus a vector, x ← ax + x, all singleprecision.
SSWAP Interchange vectors x and y, both single precision.
SDOT Computes the single-precision dot product xTy.
DSDOT Computes the single-precision dot product xTy using a double precision accumulator.
SDSDOT Computes the sum of a single-precision scalar and a single precision dot product, a + xTy, using a double-precision accumulator.
SDDOTI Computes the sum of a single-precision scalar plus a single precision dot product using a double-precision accumulator, which is set to the result ACC ← a + xTy.
SHPROD Computes the Hadamard product of two single-precision vectors.
SXYZ Computes a single-precision xyz product.
SSUM Sums the values of a single-precision vector
SASUM Sums the absolute values of the components of a single-precision vector.
SNRM2 Computes the Euclidean length or L2 norm of a single-precision vector.
SPRDCT Multiplies the components of a single-precision vector.
ISMIN Finds the smallest index of the component of a single-precision vector having minimum value.
ISMAX Finds the smallest index of the component of a single-precision vector having maximum value.
ISAMIN Finds the smallest index of the component of a single-precision vector having minimum absolute value.
ISAMAX Finds the smallest index of the component of a single-precision vector having maximum absolute value.
SROTG Constructs a Givens plane rotation in single precision.
SROT Applies a Givens plane rotation in single precision.
SROTM Applies a modified Givens plane rotation in single precision.
SROTMG Constructs a modified Givens plane rotation in single precision.
 

LEVEL 2 BLAS

ROUTINE DESCRIPTION
SGEMV Computes one of the matrix-vector operations: y ← αAx + βy, or y ← αATx + βy.
SGBMV Computes one of the matrix-vector operations: y ← αAx + βy, or y ← αATx + βy, where A is a matrix stored in band storage mode.
CHEMV Compute the matrix-vector operation y ← αAx + βy where A is a Hermitian matrix.
CHPMV Compute the matrix-vector operation y ← αAx + βy where A is a packed Hermitian matrix.
CHBMV Computes the matrix-vector operation y ← αAx + βy where A is a Hermitian band matrix in band Hermitian storage.
CTPMV Performs the matrix-vector operation x ← AT x in packed form.
CTPSV Solves the systems of equations x ← (AT)-1 x ≡ (AH)-1 in packed form.
SSYMV Computes the matrix-vector operation y ← αAx + βy where A is a symmetric matrix.
SSBMV Computes the matrix-vector operation y ← αAx + βy where A is a symmetric matrix in band symmetric storage mode.
SSPMV Performs the matrix-vector operation y ← αAx + βy in packed form.
STRMV Computes one of the matrix-vector operations: x← Ax or x← ATx where A is a triangular matrix.
STBMV Computes one of the matrix-vector operations: x← Ax or x← ATx where A is a triangular matrix in band storage mode.
STRSV Solves one of the triangular linear systems: x← A-1x or x← (A-1)Tx where A is a triangular matrix.
STBSV Solves one of the triangular systems: x← A-1x or x← (A-1)Tx where A is a triangular matrix in band storage mode.
STPMV Performs one of the matrix-vector operations: x← Ax or x← ATx where A is in packed form.
STPSV Solves one of the systems of equations x← A-1x or x← (A-1)Tx ATx where A is in packed form.
SGER Computes the rank-one update of a real general matrix: A← A + αxyT.
CGERU Computes the rank-one update of a complex general matrix: A← A + αxyT.
CGERC Computes the rank-one update of a complex general matrix:A← A + αxyT.
CHER Computes the rank-one update of a Hermitian matrix: A← A + αxxT. with x complex and α real.
CHPR Computes the rank-one update of a Hermitian matrix: A← A + αxxT. in packed form with x complex and α real.
CHER2 Computes a rank-two update of a Hermitian matrix: :A ← A + αxyαyxT.
CHPR2 Performs the hermitian rank 2 operation :A ← A + αxyαyxT. in packed form.
SSYR Computes the rank-one update of a real symmetric matrix: A← A + αxxT.
SSPR Performs the symmetric rank 1 operation A← A + αxxT in packed form.
SSYR2 Computes the rank-two update of a real symmetric matrix: A← A + αxy + αyxT.
SSPR2 Performs the symmetric rank 2 operation A← A + αxy + αyxT in packed form.
 

LEVEL 3 BLAS

ROUTINE DESCRIPTION
SGEMM Computes one of the matrix-matrix operations: C← αAB + βC, C← αATB + βC, C← αABT+ βC,or C← αATBT+ βC.
SSYMM Computes one of the matrix-matrix operations: C← αAB + βC or C← αBA + βC, where A is a symmetric matrix and B and C are m by n matrices.
CHEMM Computes one of the matrix-matrix operations: C← αAB + βC or C← αBA + βC, where A is a Hermitian matrix and B and C are m by n matrices.
SSYRK Computes one of the symmetric rank k operations: C← αAAT + βC or C← αATA + βC, where C is an n by n symmetric matrix and A is an n by k matrix in the first case and a k by n matrix in the second case.
CHERK Computes one of the Hermitian rank k operations: C← αAAT + βC or C← αAT A + βC, where C is an n by n Hermitian matrix and A is an n by k matrix in the first case and a k by n matrix in the second case.
SSYR2K Computes one of the symmetric rank 2k operations: C← αABT + αBAT + βC or C← αATB + αBTA + βC, where C is an n by n symmetric matrix and A and B are n by k matrices in the first case and k by n matrices in the second case.
CHER2K Computes one of the Hermitian rank 2k operations: C← αABT + αBAT + βC or C← αATB + αBTA + βC, where C is an n by n Hermitian matrix in the first case and k by n matrices in the second case.
STRMM Computes one of the matrix-matrix operations: B← αAB, B← αATB or B← αBA, B← αBAT, where B is an m by n matrix and A is a triangular matrix.
STRSM Solves one of the matrix equations: B← αA-1B, B← αBA-1 or B← α(A-1)T B, B← αB(A-1)T, where B is an m by n matrix and A is a triangular matrix.
CTRSM Solves one of the complex matrix equations: B ← α(AT)-1 or B ← αB(AT)-1, where A is a triangular matrix.
 

BLAS FOR NVIDIA

ROUTINE DESCRIPTION
CUBLAS_GET Returns the switchover value for a positional array argument for a specified BLAS routine.
CUBLAS_SET Sets the switchover value for an array used by a specified BLAS routine.
CHECK_BUFFER_ALLOCATION Maintains buffer sizes on the NVIDIA device and performs one-time initialization.
CUDA_ERROR_PRINT Prints error messages generated through the use of the CUDABLAS Library using the IMSL error handler.
 

OTHER MATRIX/VECTOR OPERATIONS

MATRIX COPY

ROUTINE DESCRIPTION
CRGRG Copies a real general matrix.
CCGCG Copies a complex general matrix.
CRBRB Copies a real band matrix stored in band storage mode.
CCBCB Copies a complex band matrix stored in complex band storage mode.
CRGRB Converts a real general matrix to a matrix in band storage mode.
CRBRG Converts a real matrix in band storage mode to a real general matrix.
CCGCB Converts a complex general matrix to a matrix in complex band storage mode.
CCBCG Converts a complex matrix in band storage mode to a complex matrix in full storage mode.
CRGCG Copies a real general matrix to a complex general matrix.
CRRCR Copies a real rectangular matrix to a complex rectangular matrix.
CRBCB Converts a real matrix in band storage mode to a complex matrix in band storage mode.
CSFRG Extends a real symmetric matrix defined in its upper triangle to its lower triangle.
CHFCG Extends a complex Hermitian matrix defined in its upper triangle to its lower triangle.
CSBRB Copies a real symmetric band matrix stored in band symmetric storage mode to a real band matrix stored in band storage mode.
CHBCB Copies a complex Hermitian band matrix stored in band Hermitian storage mode to a complex band matrix stored in band storage mode.
TRNRR Transposes a rectangular matrix.
 

MATRIX MULTIPLICATION

ROUTINE DESCRIPTION
MXTXF Computes the transpose product of a matrix, ATA.
MXTYF Multiplies the transpose of matrix A by matrix B, ATB.
MXYTF Multiplies the transpose of matrix A by matrix B, ATB.
MRRRR Multiplies two real rectangular matrices, AB.
MCRCR Multiplies two complex rectangular matrices, AB.
HRRRR Computes the Hadamard product of two real rectangular matrices.
BLINF Computes the bilinear form xTAy.
POLRG Evaluates a real general matrix polynomial.
 

MATRIX-VECTOR MULTIPLICATION

ROUTINE DESCRIPTION
MURRV Multiplies a real rectangular matrix by a vector.
MURBV Multiplies a real band matrix in band storage mode by a real vector.
MUCRV Multiplies a complex rectangular matrix by a complex vector.
MUCBV Multiplies a complex band matrix in band storage mode by a complex vector.
 

MATRIX ADDITION

ROUTINE DESCRIPTION
ARBRB Adds two band matrices, both in band storage mode.
ACBCB Adds two complex band matrices, both in band storage mode.
 

MATRIX NORM

ROUTINE DESCRIPTION
NRIRR Computes the infinity norm of a real matrix.
NR1RR MComputes the 1-norm of a real matrix.
NR2RR Computes the Frobenius norm of a real rectangular matrix.
NR1RB Computes the 1-norm of a real band matrix in band storage mode.
NR1CB Computes the 1-norm of a complex band matrix in band storage mode.
 

DISTANCE BETWEEN TWO POINTS

ROUTINE DESCRIPTION
DISL2 Computes the Euclidean (2-norm) distance between two points.
DISL1 Computes the 1-norm distance between two points.
DISLI Computes the infinity norm distance between two points.
 

VECTOR CONVOLUTIONS

ROUTINE DESCRIPTION
VCONR Computes the convolution of two real vectors.
VCONC Computes the convolution of two complex vectors.
 

EXTENDED PRECISION ARITHMETIC

ROUTINE DESCRIPTION
DQINI Initializes an extended-precision accumulator with a double-precision scalar.
DQSTO Stores a double-precision approximation to an extended-precision scalar.
DQADD Adds a double-precision scalar to the accumulator in extended precision.
DQMUL Multiplies double-precision scalars in extended precision.
ZQINI Initializes an extended-precision complex accumulator to a double complex scalar.
ZQSTO Stores a double complex approximation to an extended-precision complex scalar.
ZQADD Adds a double complex scalar to the accumulator in extended precision.
ZQMUL Multiplies double complex scalars using extended precision.