Low-level CBLAS API

This document is auto-generated for Owl’s APIs. #57 entries have been extracted.

Github: {Signature} {Implementation}

Type definition

type ('a, 'b) t = ('a, 'b, Bigarray.c_layout) Bigarray.Array1.t

The default type is Bigarray’s Array1.t.

type cblas_layout = CblasRowMajor | CblasColMajor

Layout type, Row-major or Column-major.

type cblas_transpose = CblasNoTrans | CblasTrans | CblasConjTrans

Transpose type, no transpose, transpose, or conjugate transpose.

type cblas_uplo = CblasUpper | CblasLower

Upper or lower triangular matrix.

type cblas_diag = CblasNonUnit | CblasUnit

Diag type, unit triangular.

type cblas_side = CblasLeft | CblasRight

Side type

Level-1 BLAS: vector-vector operations

val rotg : float -> float -> float * float * float * float

Computes the parameters for a Givens rotation.

source code

val rotmg : ('a, 'b) kind -> float -> float -> float -> float -> float * float * float * ('a, 'b) t

Computes the parameters for a modified Givens rotation.

source code

val rot : int -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> float -> float -> unit

Performs rotation of points in the plane.

source code

val rotm : int -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> ('a, 'b) t -> unit

Performs modified Givens rotation of points in the plane

source code

val swap : int -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> unit

Swaps a vector with another vector.

source code

val scal : int -> 'a -> ('a, 'b) t -> int -> unit

Computes the product of a vector and a scalar.

source code

val cszd_scal : int -> float -> (Complex.t, 'a) t -> int -> unit

Computes the product of a complex vector and a float number.

source code

val copy : int -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> unit

Copies vector to another vector.

source code

val axpy : int -> 'a -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> unit

Computes a vector-scalar product and adds the result to a vector.

source code

val dot : ?conj:bool -> int -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> 'a
Computes a vector-vector dot product. [conj] is for complex numbers, [true]
indicates conjugated, [false] indicates unconjugated.

source code

val sdsdot : int -> float -> (float, float32_elt) t -> int -> (float, float32_elt) t -> int -> float

Computes a vector-vector dot product extended precision accumulation.

source code

val dsdot : int -> (float, float32_elt) t -> int -> (float, float32_elt) t -> int -> float

Computes a vector-vector dot product extended precision accumulation.

source code

val nrm2 : int -> ('a, 'b) t -> int -> float

Computes the Euclidean norm of a vector.

source code

val asum : int -> ('a, 'b) t -> int -> float

Computes the sum of magnitudes of the vector elements.

source code

val amax : int -> ('a, 'b) t -> int -> int

Finds the index of the element with maximum absolute value.

source code

Level-2 BLAS: matrix-vector operations

val gemv : cblas_layout -> cblas_transpose -> int -> int -> 'a -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> 'a -> ('a, 'b) t -> int -> unit

Computes a matrix-vector product using a general matrix

source code

val gbmv : cblas_layout -> cblas_transpose -> int -> int -> int -> int -> 'a -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> 'a -> ('a, 'b) t -> int -> unit

Computes a matrix-vector product using a general band matrix

source code

val trmv : cblas_layout -> cblas_uplo -> cblas_transpose -> cblas_diag -> int -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> unit

Computes a matrix-vector product using a triangular matrix.

source code

val tbmv : cblas_layout -> cblas_uplo -> cblas_transpose -> cblas_diag -> int -> int -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> unit

Computes a matrix-vector product using a triangular band matrix.

source code

val tpmv : cblas_layout -> cblas_uplo -> cblas_transpose -> cblas_diag -> int -> ('a, 'b) t -> ('a, 'b) t -> int -> unit

Computes a matrix-vector product using a triangular packed matrix.

source code

val trsv : cblas_layout -> cblas_uplo -> cblas_transpose -> cblas_diag -> int -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> unit

Solves a system of linear equations whose coefficients are in a triangular matrix.

source code

val tbsv : cblas_layout -> cblas_uplo -> cblas_transpose -> cblas_diag -> int -> int -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> unit

Solves a system of linear equations whose coefficients are in a triangular band matrix.

source code

val tpsv : cblas_layout -> cblas_uplo -> cblas_transpose -> cblas_diag -> int -> ('a, 'b) t -> ('a, 'b) t -> int -> unit

Solves a system of linear equations whose coefficients are in a triangular packed matrix.

source code

val symv : cblas_layout -> cblas_uplo -> int -> float -> (float, 'a) t -> int -> (float, 'a) t -> int -> float -> (float, 'a) t -> int -> unit

Computes a matrix-vector product for a symmetric matrix.

source code

val sbmv : cblas_layout -> cblas_uplo -> int -> int -> float -> (float, 'a) t -> int -> (float, 'a) t -> int -> float -> (float, 'a) t -> int -> unit

Computes a matrix-vector product using a symmetric band matrix.

source code

val spmv : cblas_layout -> cblas_uplo -> int -> int -> float -> (float, 'a) t -> (float, 'a) t -> int -> float -> (float, 'a) t -> int -> unit

Computes a matrix-vector product using a symmetric packed matrix.

source code

val ger : ?conj:bool -> cblas_layout -> int -> int -> 'a -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> unit

Performs a rank-1 update of a general matrix. [conj] is for complex numbers, [true] indicates conjugated, [false] indicates unconjugated.

source code

val syr : cblas_layout -> cblas_uplo -> int -> float -> (float, 'a) t -> int -> (float, 'a) t -> int -> unit

Performs a rank-1 update of a symmetric matrix.

source code

val spr : cblas_layout -> cblas_uplo -> int -> float -> (float, 'a) t -> int -> (float, 'a) t -> unit

Performs a rank-1 update of a symmetric packed matrix.

source code

val syr2 : cblas_layout -> cblas_uplo -> int -> float -> (float, 'a) t -> int -> (float, 'a) t -> int -> (float, 'a) t -> int -> unit

Performs a rank-2 update of symmetric matrix.

source code

val spr2 : cblas_layout -> cblas_uplo -> int -> float -> (float, 'a) t -> int -> (float, 'a) t -> int -> (float, 'a) t -> unit

Performs a rank-2 update of a symmetric packed matrix.

source code

val hemv : cblas_layout -> cblas_uplo -> int -> Complex.t -> (Complex.t, 'a) t -> int -> (Complex.t, 'a) t -> int -> Complex.t -> (Complex.t, 'a) t -> int -> unit

Computes a matrix-vector product using a Hermitian matrix.

source code

val hbmv : cblas_layout -> cblas_uplo -> int -> int -> Complex.t -> (Complex.t, 'a) t -> int -> (Complex.t, 'a) t -> int -> Complex.t -> (Complex.t, 'a) t -> int -> unit

Computes a matrix-vector product using a Hermitian band matrix.

source code

val hpmv : cblas_layout -> cblas_uplo -> int -> Complex.t -> (Complex.t, 'a) t -> (Complex.t, 'a) t -> int -> Complex.t -> (Complex.t, 'a) t -> int -> unit

Computes a matrix-vector product using a Hermitian packed matrix.

source code

val her : cblas_layout -> cblas_uplo -> int -> float -> (Complex.t, 'a) t -> int -> (Complex.t, 'a) t -> int -> unit

Performs a rank-1 update of a Hermitian matrix.

source code

val hpr : cblas_layout -> cblas_uplo -> int -> float -> (Complex.t, 'a) t -> int -> (Complex.t, 'a) t -> unit

Performs a rank-1 update of a Hermitian packed matrix.

source code

val her2 : cblas_layout -> cblas_uplo -> int -> Complex.t -> (Complex.t, 'a) t -> int -> (Complex.t, 'a) t -> int -> (Complex.t, 'a) t -> int -> unit

Performs a rank-2 update of a Hermitian matrix.

source code

val hpr2 : cblas_layout -> cblas_uplo -> int -> Complex.t -> (Complex.t, 'a) t -> int -> (Complex.t, 'a) t -> int -> (Complex.t, 'a) t -> unit

Performs a rank-2 update of a Hermitian packed matrix.

source code

Level-3 BLAS: matrix-matrix operations

val gemm : cblas_layout -> cblas_transpose -> cblas_transpose -> int -> int -> int -> 'a -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> 'a -> ('a, 'b) t -> int -> unit

Computes a matrix-matrix product with general matrices.

source code

val symm : cblas_layout -> cblas_side -> cblas_uplo -> int -> int -> 'a -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> 'a -> ('a, 'b) t -> int -> unit

Computes a matrix-matrix product where one input matrix is symmetric.

source code

val syrk : cblas_layout -> cblas_uplo -> cblas_transpose -> int -> int -> 'a -> ('a, 'b) t -> int -> 'a -> ('a, 'b) t -> int -> unit

Performs a symmetric rank-k update.

source code

val syr2k : cblas_layout -> cblas_uplo -> cblas_transpose -> int -> int -> 'a -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> 'a -> ('a, 'b) t -> int -> unit

Performs a symmetric rank-2k update.

source code

val trmm : cblas_layout -> cblas_side -> cblas_uplo -> cblas_transpose -> cblas_diag -> int -> int -> 'a -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> unit

Computes a matrix-matrix product where one input matrix is triangular.

source code

val trsm : cblas_layout -> cblas_side -> cblas_uplo -> cblas_transpose -> cblas_diag -> int -> int -> 'a -> ('a, 'b) t -> int -> ('a, 'b) t -> int -> unit

Solves a triangular matrix equation.

source code

val hemm : cblas_layout -> cblas_side -> cblas_uplo -> int -> int -> Complex.t -> (Complex.t, 'a) t -> int -> (Complex.t, 'a) t -> int -> Complex.t -> (Complex.t, 'a) t -> int -> unit

Computes a matrix-matrix product where one input matrix is Hermitian.

source code

val herk : cblas_layout -> cblas_uplo -> cblas_transpose -> int -> int -> float -> (Complex.t, 'a) t -> int -> float -> (Complex.t, 'a) t -> int -> unit

Performs a Hermitian rank-k update.

source code

val her2k : cblas_layout -> cblas_uplo -> cblas_transpose -> int -> int -> Complex.t -> (Complex.t, 'a) t -> int -> (Complex.t, 'a) t -> int -> float -> (Complex.t, 'a) t -> int -> unit

Performs a Hermitian rank-2k update.

source code