BLAS/LAPACK API

Below a description of prometeo’s BLAS/LAPACK API can be found:

LEVEL 1 BLAS

LEVEL 2 BLAS

  • General matrix-vector multiplication (GEMV)
\[z \leftarrow \beta \cdot y + \alpha \cdot \text{op}(A) x\]
pmt_gemv(A[.T], x, [y], z, [alpha=1.0], [beta=0.0])
  • Solve linear system with (lower or upper) triangular matrix coefficient (TRSV)
\[\text{op}(A)\,x = b\]
pmt_trsv(A[.T], b, [lower=True])
  • Matrix-vector multiplication with (lower or upper) triangular matrix coefficient (TRMV)
\[z \leftarrow \text{op}(A)\,x\]
pmt_trmv(A[.T], x, z, [lower=True])

LEVEL 3 BLAS

  • General matrix-matrix multiplication (GEMM)
\[D \leftarrow \beta \cdot C + \alpha \cdot \text{op}(A) \, \text{op}(B)\]
pmt_gemm(A[.T], B[.T], [C], D, [alpha=1.0], [beta=0.0])
  • Symmetric rank \(k\) update (SYRK)
\[D \leftarrow \beta \cdot C + \alpha \cdot \text{op}(A) \,\text{op}(B)\]

with \(C\) and \(D\) lower triangular.

pmt_syrk(A[.T], B[.T], [C], D, [alpha=1.0], [beta=0.0])
  • Triangular matrix-matrix multiplication (TRMM)
\[D \leftarrow \alpha \cdot B\, A^{\top}\]

with \(B\) upper triangular or

\[D \leftarrow \alpha \cdot A\, B\]

with \(A\) lower triangular.

pmt_trmm(A[.T], B, D, [alpha=1.0], [beta=0.0])

LAPACK

  • Cholesky factorization (POTRF)
\[C = D\,D^{\top}\]

with \(D\) lower triangular and \(C\) symmetric and positive definite

pmt_potrf(C, D)
  • LU factorization (GETRF)
\[C = L\,P\,U\]
pmt_getrf(C, D, ipiv)
  • QR factorization (GEQRF)
\[C = Q\,R\]
pmt_geqrf(C, D)