Files
mql5-skills/skills/mql5/references/docs/06-matrix/0552-matrix-openblas-blas-level2.md
T
2026-06-23 21:47:51 +08:00

3.8 KiB
Raw Blame History

BLAS Level 2

The BLAS Level 2 section describes functions for performing operations between matrices and vectors that implement second-level linear algebra computations — matrixvector multiplication, linear combinations, and rank updates of matrices. These functions implement the standard procedures of the BLAS (Level 2) library and provide efficient computation for real, complex, and Hermitian matrices.

BLAS Level 2 functions are designed for:

  • computing matrixvector products;
  • updating matrices (rank-1 and rank-2 modifications);
  • working with specific matrix types — symmetric, Hermitian, and triangular;
  • performing computations with support for different data types: float, double, complexf, and complex.

All functions return true if successful and false in case of an error.

Function Action
BlasL2GeMV Computes a matrix-vector product using a general m-by-n matrix. y = alpha * op(A) * x + beta * y. BLAS function GEMV .
BlasL2SyMV Computes a matrix-vector product for a symmetric n-by-n matrix. y = alphaAx + beta*y. BLAS function SYMV .
BlasL2HeMV Computes a matrix-vector product for a Hermitian n-by-n matrix. y = alphaAx + beta*y. BLAS function HEMV .
BlasL2TrMV Computes a matrix-vector product using a triangular n-by-n matrix. y = op(A) * x. BLAS function TRMV .
BlasL2GeR Performs a rank-1 update of a general m-by-n matrix. AU = alphaxy + A. BLAS functions GER , GERU .
BlasL2GeRC Performs a rank-1 conjugated update of a general m-by-n matrix. AU = alpha * x * conjg(y) + A. BLAS function GERC .
BlasL2SyR Performs a rank-1 update of a symmetric n-by-n matrix. AU = alphaxx + A. BLAS function SYR .
BlasL2HeR Performs a rank-1 conjugated update of a Hermitian n-by-n matrix. AU = alpha * x * conjg(x) + A. BLAS function HER2 .
BlasL2SyR2 Performs a rank-2 update of a symmetric n-by-n matrix. AU = alphaxy + alphayx + A. BLAS function SYR2 .
BlasL2HeR2 Performs a rank-2 conjugated update of a Hermitian n-by-n matrix. AU = alpha * x * conjg(y) + conjg(alpha) * y * conjg(x) + A. BLAS function HER2 .

Main Function Groups

  1. General Matrices
  • BlasL2GeMV — computes a matrixvector product: y = α·op(A)·x + β·y (BLAS GEMV)
  • BlasL2GeR — performs a rank-1 matrix update: A ← A + α·x·yᵀ (BLAS GER, GERU)
  • BlasL2GeRC — complex variant with conjugation: A ← A + α·x·conjg(yᵀ) (BLAS GERC)
  1. Symmetric Matrices (Real)
  • BlasL2SyMV — computes a matrixvector product for a symmetric matrix: y = α·A·x + β·y (BLAS SYMV)
  • BlasL2SyR — performs a rank-1 update of a symmetric matrix: A ← A + α·x·xᵀ (BLAS SYR)
  • BlasL2SyR2 — performs a rank-2 update: A ← A + α·(x·yᵀ + y·xᵀ) (BLAS SYR2)
  1. Hermitian Matrices (Complex)
  • BlasL2HeMV — computes a matrixvector product for a Hermitian matrix: y = α·A·x + β·y (BLAS HEMV)
  • BlasL2HeR — performs a rank-1 Hermitian matrix update: A ← A + α·x·conjg(xᵀ) (BLAS HER)
  • BlasL2HeR2 — performs a rank-2 Hermitian update: A ← A + α·x·conjg(yᵀ) + conjg(α)·y·conjg(xᵀ) (BLAS HER2)
  1. Triangular Matrices
  • BlasL2TrMV — computes a matrixvector product using a triangular matrix: y = op(A)·x, where op(A) is A, Aᵀ, or Aᴴ depending on the parameter (BLAS TRMV)