BLAS
Types
PureHaskell
Pure Haskell implementation
OpenBLAS
OpenBLAS library
MKL
Intel Math Kernel Library
BLIS
BLAS-like Library Instantiation Software
AppleAccelerate
Apple Accelerate framework
CUDA
NVIDIA cuBLAS
ROCm
AMD rocBLAS
RowMajor
C-style row-major (default)
ColMajor
Fortran-style column-major
NoTrans
No transpose
Trans
Transpose
ConjTrans
Conjugate transpose
Transpose operation specification.
LeftSide
Operation from left
RightSide
Operation from right
Side specification for matrix operations.
Type Classes
Functions
Set active BLAS backend.
Get current BLAS backend.
List available backends on this system.
Create matrix from dimensions and function.
Create matrix from list of rows.
Create matrix from list of columns.
Create matrix from flat list with dimensions.
Zero matrix.
Matrix of ones.
Identity matrix.
Diagonal matrix from vector.
Fill matrix with constant.
Number of rows.
Number of columns.
Shape as (rows, cols).
Total number of elements.
Storage order.
Check if square.
Check if symmetric.
Check if Hermitian.
Check if upper triangular.
Check if lower triangular.
Extract column as vector.
Extract diagonal.
Slice submatrix.
Extract submatrix.
Transpose matrix.
Conjugate transpose.
Reshape matrix.
Flatten to vector.
Force contiguous storage.
Convert to row-major order.
Convert to column-major order.
Generate Givens rotation.
Generate modified Givens rotation.
Apply Givens rotation.
Apply modified Givens rotation.
Swap two vectors.
Scale vector: x = α·x
Copy vector: y = x
Vector update: y = α·x + y
Dot product: x·y
Unconjugated complex dot product.
Conjugated complex dot product.
Single precision dot with double accumulation.
Euclidean norm: ||x||₂
Sum of absolute values.
Index of maximum absolute value.
General matrix-vector: y = α·op(A)·x + β·y
General banded matrix-vector.
Hermitian matrix-vector: y = α·A·x + β·y
Hermitian banded matrix-vector.
Hermitian packed matrix-vector.
Symmetric matrix-vector: y = α·A·x + β·y
Symmetric banded matrix-vector.
Symmetric packed matrix-vector.
Triangular matrix-vector: x = op(A)·x
Triangular banded matrix-vector.
Triangular packed matrix-vector.
Triangular solve: x = op(A)⁻¹·x
Triangular banded solve.
Triangular packed solve.
Rank-1 update: A = α·x·yᵀ + A
Unconjugated rank-1 update.
Conjugated rank-1 update.
Hermitian rank-1 update: A = α·x·x^H + A
Hermitian packed rank-1 update.
Hermitian rank-2 update.
Hermitian packed rank-2 update.
Symmetric rank-1 update: A = α·x·xᵀ + A
Symmetric packed rank-1 update.
Symmetric rank-2 update.
Symmetric packed rank-2 update.
gemm :: (BLASNum a) => Transpose -> Transpose -> a -> (Matrix a) -> (Matrix a) -> a -> (Matrix a) -> Matrix a
#
General matrix-matrix: C = α·op(A)·op(B) + β·C
gemmBatched :: (BLASNum a) => Transpose -> Transpose -> a -> [Matrix a] -> [Matrix a] -> a -> [Matrix a] -> [Matrix a]
#
Batched matrix multiply.
symm :: (BLASReal a) => Side -> UpLo -> a -> (Matrix a) -> (Matrix a) -> a -> (Matrix a) -> Matrix a
#
Symmetric matrix-matrix: C = α·A·B + β·C or C = α·B·A + β·C
hemm :: (BLASComplex a) => Side -> UpLo -> a -> (Matrix a) -> (Matrix a) -> a -> (Matrix a) -> Matrix a
#
Hermitian matrix-matrix.
Symmetric rank-k update: C = α·A·Aᵀ + β·C
Hermitian rank-k update: C = α·A·A^H + β·C
syr2k :: (BLASReal a) => UpLo -> Transpose -> a -> (Matrix a) -> (Matrix a) -> a -> (Matrix a) -> Matrix a
#
Symmetric rank-2k update.
her2k :: (BLASComplex a) => UpLo -> Transpose -> a -> (Matrix a) -> (Matrix a) -> a -> (Matrix a) -> Matrix a
#
Hermitian rank-2k update.
trmm :: (BLASNum a) => Side -> UpLo -> Transpose -> Diag -> a -> (Matrix a) -> (Matrix a) -> Matrix a
#
Triangular matrix-matrix: B = α·op(A)·B or B = α·B·op(A)
trsm :: (BLASNum a) => Side -> UpLo -> Transpose -> Diag -> a -> (Matrix a) -> (Matrix a) -> Matrix a
#
Triangular solve: B = α·op(A)⁻¹·B or B = α·B·op(A)⁻¹
Simple matrix multiply: C = A·B
Infix matrix multiply.
Outer product: A = x·yᵀ
Vector dot product.
Vector 2-norm.
Vector 1-norm.
Vector infinity norm.
Scale vector.
Vector addition.
Vector subtraction.
Element-wise vector multiply.
Matrix addition.
Matrix subtraction.
Element-wise matrix multiply.
Scale matrix.
Matrix trace.
Matrix determinant (via LU decomposition).
Matrix rank.
Condition number.
Solve linear system A·X = B.
Matrix inverse.
Moore-Penrose pseudo-inverse.
LU decomposition with partial pivoting.
QR decomposition.
Cholesky decomposition.
Singular value decomposition.
Eigenvalue decomposition.
Schur decomposition.
Convert to mutable matrix.
Convert to immutable matrix.
Unsafe thaw (no copy).
Unsafe freeze (no copy).
Create matrix via mutable computation.
gemmInPlace :: (BLASNum a) => Transpose -> Transpose -> a -> (Matrix a) -> (Matrix a) -> a -> (MMatrix s a) -> ST s ()
#
In-place GEMM.
In-place scale.
In-place axpy.
In-place copy.