-
Notifications
You must be signed in to change notification settings - Fork 8
5.17 BLAS Library
Claude Roux edited this page Jan 15, 2024
·
7 revisions
This library encapsulates instructions from the BLAS library (Basic Linear Algebra Subprogram)
(deflib blas\_asum(x (incx 1)) "Computes the sum of absolute values of elements in vector x with stride incx" )
(deflib blas\_axpy(x y (incx 1) (incy 1)) "Performs y <- alpha*x + y, where x, y are vectors with stride incx and incy respectively, and alpha is a scalar" )
(deflib blas\_dot(x y (incx 1) (incy 1)) "Computes the dot product of vectors x and y with strides incx and incy respectively" )
(deflib blas\_dotu(x y (incx 1) (incy 1)) "Computes the dot product of complex vectors x and y with strides incx and incy respectively" )
(deflib blas\_iamax(x (incx 1)) "Returns the index of the first element with maximum absolute value in vector x with stride incx" )
(deflib blas\_nrm2(x (incx 1)) "Computes the 2-norm (Euclidean length) of vector x with stride incx" )
(deflib blas\_scal(x scale (incx 1)) "Performs x <- scale*x, where x is a vector with stride incx, and scale is a scalar" )
(deflib blas\_gemv(A m n lda x incx y incy (alpha 1) (beta 1) (layout true) (trans 0)) "Performs y <- alpha*A*x + beta*y, where A is a matrix with leading dimension lda, x and y are vectors with strides incx and incy respectively, and alpha and beta are scalars. The operation on A is transposed if trans is non-zero." )
(deflib blas\_ger(A m n lda x incx y incy (alpha 1) (layout true)) "Performs A <- alpha*x*y^T + A, where A is a matrix with leading dimension lda, x and y are vectors with strides incx and incy respectively, and alpha is a scalar. The operation on x and y is not transposed." )
(deflib blas\_geru(A m n lda x incx y incy (alpha 1) (layout true)) "Performs A <- alpha*x*y^T + A, where A is a matrix with leading dimension lda, x and y are vectors with strides incx and incy respectively, and alpha is a scalar. The operation on x is not transposed, but the operation on y is transposed." )
(deflib blas\_hemv(A n lda x incx y incy (alpha 1) (beta 1) (layout true) (uplo true)) "Performs y <- alpha*A*x + beta*y, where A is a Hermitian matrix with leading dimension lda, x and y are vectors with strides incx and incy respectively, and alpha and beta are scalars. Only the upper or lower triangular part of A is accessed, as specified by uplo." )
(deflib blas\_symv(A n lda x incx y incy (alpha 1) (beta 1) (layout true) (uplo true)) "Performs y <- alpha*A*x + beta*y, where A is a symmetric matrix with leading dimension lda, x and y are vectors with strides incx and incy respectively, and alpha and beta are scalars. Only the upper or lower triangular part of A is accessed, as specified by uplo." )
(deflib blas\_her(A n lda x incx (alpha 1) (layout true) (uplo true)) "Performs A <- alpha*x*x^H + A, where A is a Hermitian matrix with leading dimension lda, x is a vector with stride incx, and alpha is a scalar. Only the upper or lower triangular part of A is accessed, as specified by uplo." )
(deflib blas\_syr(A n lda x incx (alpha 1) (layout true) (uplo true)) "Performs A <- alpha*x*x^T + A, where A is a symmetric matrix with leading dimension lda, x is a vector with stride incx, and alpha is a scalar. Only the upper or lower triangular part of A is accessed, as specified by uplo." )
(deflib blas\_her2(A n lda x incx y incy (alpha 1) (layout true) (uplo true)) "Performs A <- alpha*x*y^H + A, where A is a Hermitian matrix with leading dimension lda, x and y are vectors with strides incx and incy respectively, and alpha is a scalar. Only the upper or lower triangular part of A is accessed, as specified by uplo." )
(deflib blas\_syr2(A n lda x incx y incy (alpha 1) (layout true) (uplo true)) "Performs A <- alpha*x*y^T + A, where A is a symmetric matrix with leading dimension lda, x and y are vectors with strides incx and incy respectively, and alpha is a scalar. Only the upper or lower triangular part of A is accessed, as specified by uplo." )
(deflib blas\_trmv(A n lda x incx (layout true) (uplo true) (trans 0) (diag true)) "Performs x <- A*x, where A is a triangular matrix with leading dimension lda, x is a vector with stride incx, and the operation on A is not transposed. If uplo is true, only the upper triangular part of A is accessed, otherwise only the lower triangular part is accessed. If diag is true, the diagonal elements of A are not overwritten, otherwise they are overwritten with 1." )
(deflib blas\_trsv(A n lda x incx (layout true) (uplo true) (trans 0) (diag true)) "Performs x <- A\*x, where A is a triangular matrix with leading dimension lda, x is a vector with stride incx, and the operation on A is not transposed. If uplo is true, only the upper triangular part of A is accessed, otherwise only the lower triangular part is accessed. If diag is true, the diagonal elements of A are not overwritten, otherwise they are overwritten with 1." )
(deflib blas\_gemm(A m n k lda B ldb C ldc (alpha 1) (beta 1) (layout true) (transA 0) (transB 0)) "Performs C <- alpha*A*B + beta*C, where A is a matrix with leading dimension lda, B is a matrix with leading dimension ldb, and C is a matrix with leading dimension ldc. The dimensions of A, B, and C are m x k, k x n, and m x n respectively. The operation on A and B is transposed if transA and transB are non-zero, respectively." )
(deflib blas\_hemm(A m n lda B ldb C ldc (alpha 1) (beta 1) (layout true) (side true) (uplo true)) "Performs C <- alpha*A*B + beta*C, where A is a Hermitian matrix with leading dimension lda, B is a matrix with leading dimension ldb, and C is a matrix with leading dimension ldc. The dimensions of A, B, and C are m x m, m x n, and m x n respectively. The operation on A is transposed if side is true, and only the upper or lower triangular part of A is accessed, as specified by uplo." )
(deflib blas\_symm(A m n lda B ldb C ldc (alpha 1) (beta 1) (layout true) (side true) (uplo true)) "Performs C <- alpha*A*B + beta*C, where A is a symmetric matrix with leading dimension lda, B is a matrix with leading dimension ldb, and C is a matrix with leading dimension ldc. The dimensions of A, B, and C are m x m, m x n, and m x n respectively. The operation on A is transposed if side is true, and only the upper or lower triangular part of A is accessed, as specified by uplo." )
(deflib blas\_herk(A n k lda C ldc (alpha 1) (beta 1) (layout true) (uplo true) (trans 0)) ;; Performs a rank k update of a Hermitian matrix.
(deflib blas\_syrk(A n k lda C ldc (alpha 1) (beta 1) (layout true) (uplo true) (trans 0)) ;; Performs a rank k update of a symmetric matrix.
(deflib blas\_her2k(A n k lda B ldb C ldc (alpha 1) (beta 1) (layout true) (uplo true) (trans 0)) ;; Performs a rank k update of a Hermitian matrix with another Hermitian matrix.
(deflib blas\_syr2k(A n k lda B ldb C ldc (alpha 1) (beta 1) (layout true) (uplo true) (trans 0)) ;; Performs a rank k update of a symmetric matrix with another symmetric matrix.
(deflib blas\_trmm(A m n lda B ldb (alpha 1) (layout true) (side true) (uplo true) (trans 0) (diag true)) ;; Performs a triangular matrix-matrix multiplication.
(deflib blas\_trsm(A m n lda B ldb (alpha 1) (layout true) (side true) (uplo true) (trans 0) (diag true)) ;; Solves a triangular system of equations with a matrix on the right-hand side.