vlas.internal.blas #
Constants #
const zero_incx = 'blas: zero x index increment'
Panic strings used during parameter checks. This list is duplicated in netlib/blas/netlib. Keep in sync.
const zero_incy = 'blas: zero y index increment'
const mlt0 = 'blas: m < 0'
const nlt0 = 'blas: n < 0'
const klt0 = 'blas: k < 0'
const kllt0 = 'blas: kl < 0'
const kult0 = 'blas: ku < 0'
const bad_uplo = 'blas: illegal triangle'
const bad_transpose = 'blas: illegal transpose'
const bad_diag = 'blas: illegal diagonal'
const bad_side = 'blas: illegal side'
const bad_flag = 'blas: illegal rotm flag'
const bad_ld_a = 'blas: bad leading dimension of A'
const bad_ld_b = 'blas: bad leading dimension of B'
const bad_ld_c = 'blas: bad leading dimension of C'
const short_x = 'blas: insufficient length of x'
const short_y = 'blas: insufficient length of y'
const short_ap = 'blas: insufficient length of ap'
const short_a = 'blas: insufficient length of a'
const short_b = 'blas: insufficient length of b'
const short_c = 'blas: insufficient length of c'
fn dasum #
fn dasum(n int, x []f64, incx int) f64
dasum computes the sum of the absolute values of the elements of x. \sum_i |x[i]| dasum returns 0 if incx is negative.
fn daxpy #
fn daxpy(n int, alpha f64, x []f64, incx int, mut y []f64, incy int)
daxpy adds alpha times x to y y[i] += alpha * x[i] for all i
fn dcopy #
fn dcopy(n int, x []f64, incx int, mut y []f64, incy int)
dcopy copies the elements of x into the elements of y. y[i] = x[i] for all i
fn ddot #
fn ddot(n int, x []f64, incx int, y []f64, incy int) f64
ddot computes the dot product of the two vectors \sum_i x[i]*y[i]
fn dgbmv #
fn dgbmv(trans_a Transpose, m int, n int, kl int, ku int, alpha f64, a []f64, lda int, x []f64, incx int, beta f64, mut y []f64, incy int)
dgbmv performs one of the matrix-vector operations y = alpha * A * x + beta * y if trans_a == .no_trans y = alpha * Aᵀ * x + beta * y if trans_a == .trans or .conj_trans where A is an m×n band matrix with kl sub-diagonals and ku super-diagonals, x and y are vectors, and alpha and beta are scalars.
fn dgemm #
fn dgemm(trans_a Transpose, trans_b Transpose, m int, n int, k int, alpha f64, a []f64, lda int, b []f64, ldb int, beta f64, mut c []f64, ldc int)
dgemm performs one of the matrix-matrix operations C = alpha * A * B + beta * C C = alpha * Aᵀ * B + beta * C C = alpha * A * Bᵀ + beta * C C = alpha * Aᵀ * Bᵀ + beta * C where A is an m×k or k×m dense matrix, B is an n×k or k×n dense matrix, C is an m×n matrix, and alpha and beta are scalars. trans_a and trans_b specify whether A or B are transposed.
fn dgemv #
fn dgemv(trans_a Transpose, m int, n int, alpha f64, a []f64, lda int, x []f64, incx int, beta f64, mut y []f64, incy int)
dgemv computes y = alpha * A * x + beta * y if trans_a = .no_trans y = alpha * Aᵀ * x + beta * y if trans_a = .trans or .conj_trans where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars.
fn dger #
fn dger(m int, n int, alpha f64, x []f64, incx int, y []f64, incy int, mut a []f64, lda int)
dger performs the rank-one operation A += alpha * x * yᵀ where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar.
fn dnrm2 #
fn dnrm2(n int, x []f64, incx int) f64
dnrm2 computes the Euclidean norm of a vector, sqrt(\sum_i x[i] * x[i]). This function returns 0 if incx is negative.
fn drot #
fn drot(n int, mut x []f64, incx int, mut y []f64, incy int, c f64, s f64)
drot applies a plane transformation. x[i] = c * x[i] + s * y[i] y[i] = c * y[i] - s * x[i]
fn drotg #
fn drotg(a f64, b f64) (f64, f64, f64, f64)
drotg computes the plane rotation
| c s | | a | | r || -s c | * | b | = | 0 |‾ ‾ ‾ ‾ ‾ ‾ where r = ±√(a^2 + b^2) c = a/r, the cosine of the plane rotation s = b/r, the sine of the plane rotation
Note: There is a discrepancy between the reference implementation and the BLAStechnical manual regarding the sign for r when a or b are zero. drotg agrees with the definition in the manual and other common BLAS implementations.
fn dsbmv #
fn dsbmv(ul Uplo, n int, k int, alpha f64, a []f64, lda int, x []f64, incx int, beta f64, mut y []f64, incy int)
dsbmv performs the matrix-vector operation y = alpha * A * x + beta * y where A is an n×n symmetric band matrix with k super-diagonals, x and y are vectors, and alpha and beta are scalars.
fn dscal #
fn dscal(n int, alpha f64, mut x []f64, incx int)
dscal scales x by alpha. x[i] *= alpha dscal has no effect if incx < 0.
fn dspmv #
fn dspmv(ul Uplo, n int, alpha f64, ap []f64, x []f64, incx int, beta f64, mut y []f64, incy int)
dspmv performs the matrix-vector operation y = alpha * A * x + beta * y where A is an n×n symmetric matrix in packed format, x and y are vectors, and alpha and beta are scalars.
fn dspr #
fn dspr(ul Uplo, n int, alpha f64, x []f64, incx int, mut ap []f64)
dspr performs the symmetric rank-one operation A += alpha * x * xᵀ where A is an n×n symmetric matrix in packed format, x is a vector, and alpha is a scalar.
fn dspr2 #
fn dspr2(ul Uplo, n int, alpha f64, x []f64, incx int, y []f64, incy int, mut ap []f64)
dspr2 performs the symmetric rank-2 update A += alpha * x * yᵀ + alpha * y * xᵀ where A is an n×n symmetric matrix in packed format, x and y are vectors, and alpha is a scalar.
fn dswap #
fn dswap(n int, mut x []f64, incx int, mut y []f64, incy int)
dswap exchanges the elements of two vectors. x[i], y[i] = y[i], x[i] for all i
fn dsymv #
fn dsymv(ul Uplo, n int, alpha f64, a []f64, lda int, x []f64, incx int, beta f64, mut y []f64, incy int)
dsymv performs the matrix-vector operation y = alpha * A * x + beta * y where A is an n×n symmetric matrix, x and y are vectors, and alpha and beta are scalars.
fn dsyr #
fn dsyr(ul Uplo, n int, alpha f64, x []f64, incx int, mut a []f64, lda int)
dsyr performs the symmetric rank-one update A += alpha * x * xᵀ where A is an n×n symmetric matrix, and x is a vector.
fn dsyr2 #
fn dsyr2(ul Uplo, n int, alpha f64, x []f64, incx int, y []f64, incy int, mut a []f64, lda int)
dsyr2 performs the symmetric rank-two update A += alpha * x * yᵀ + alpha * y * xᵀ where A is an n×n symmetric matrix, x and y are vectors, and alpha is a scalar.
fn dsyrk #
fn dsyrk(ul Uplo, trans_a Transpose, n int, k int, alpha f64, a []f64, lda int, beta f64, mut c []f64, ldc int)
dsyrk performs one of the symmetric rank-k operations C = alpha * A * Aᵀ + beta * C if trans_a == .no_trans C = alpha * Aᵀ * A + beta * C if trans_a == .trans or trans_a == .conj_trans where A is an n×k or k×n matrix, C is an n×n symmetric matrix, and alpha and beta are scalars.
fn dtbmv #
fn dtbmv(ul Uplo, trans_a Transpose, d Diagonal, n int, k int, a []f64, lda int, mut x []f64, incx int)
dtbmv performs one of the matrix-vector operations x = A * x if trans_a == .no_trans x = Aᵀ * x if trans_a == .trans or .conj_trans where A is an n×n triangular band matrix with k+1 diagonals, and x is a vector.
fn dtbsv #
fn dtbsv(ul Uplo, trans_a Transpose, d Diagonal, n int, k int, a []f64, lda int, mut x []f64, incx int)
dtbsv solves one of the systems of equations A * x = b if trans_a == .no_trans Aᵀ * x = b if trans_a == .trans or trans_a == .conj_trans where A is an n×n triangular band matrix with k+1 diagonals, and x and b are vectors.
At entry to the function, x contains the values of b, and the result is stored in-place into x.
No test for singularity or near-singularity is included in this routine. Such tests must be performed before calling this routine.
fn dtpmv #
fn dtpmv(ul Uplo, trans_a Transpose, d Diagonal, n int, ap []f64, mut x []f64, incx int)
dtpmv performs one of the matrix-vector operations x = A * x if trans_a == .no_trans x = Aᵀ * x if trans_a == .trans or .conj_trans where A is an n×n triangular matrix in packed format, and x is a vector.
fn dtpsv #
fn dtpsv(ul Uplo, trans_a Transpose, d Diagonal, n int, ap []f64, mut x []f64, incx int)
dtpsv solves one of the systems of equations A * x = b if trans_a == .no_trans Aᵀ * x = b if trans_a == .trans or .conj_trans where A is an n×n triangular matrix in packed format, and x and b are vectors.
At entry to the function, x contains the values of b, and the result is stored in-place into x.
No test for singularity or near-singularity is included in this routine. Such tests must be performed before calling this routine.
fn dtrmv #
fn dtrmv(ul Uplo, trans_a Transpose, d Diagonal, n int, a []f64, lda int, mut x []f64, incx int)
dtrmv performs one of the matrix-vector operations x = A * x if trans_a == .no_trans x = Aᵀ * x if trans_a == .trans or .conj_trans where A is an n×n triangular matrix, and x is a vector.
fn dtrsv #
fn dtrsv(ul Uplo, trans_a Transpose, d Diagonal, n int, a []f64, lda int, mut x []f64, incx int)
dtrsv solves one of the systems of equations A * x = b if trans_a == .no_trans Aᵀ * x = b if trans_a == .trans or .conj_trans where A is an n×n triangular matrix, and x and b are vectors.
At entry to the function, x contains the values of b, and the result is stored in-place into x.
No test for singularity or near-singularity is included in this routine. Such tests must be performed before calling this routine.
fn idamax #
fn idamax(n int, x []f64, incx int) int
idamax returns the index of an element of x with the largest absolute value. If there are multiple such indices the earliest is returned. idamax returns -1 if n == 0.
enum Diagonal #
enum Diagonal {
non_unit = 131
unit = 132
}
enum MemoryLayout #
enum MemoryLayout {
row_major = 101
col_major = 102
}
enum Side #
enum Side {
left = 141
right = 142
}
enum Transpose #
enum Transpose {
no_trans = 111
trans = 112
conj_trans = 113
conj_no_trans = 114
}
enum Uplo #
enum Uplo {
upper = 121
lower = 122
}
- Constants
- fn dasum
- fn daxpy
- fn dcopy
- fn ddot
- fn dgbmv
- fn dgemm
- fn dgemv
- fn dger
- fn dnrm2
- fn drot
- fn drotg
- fn dsbmv
- fn dscal
- fn dspmv
- fn dspr
- fn dspr2
- fn dswap
- fn dsymv
- fn dsyr
- fn dsyr2
- fn dsyrk
- fn dtbmv
- fn dtbsv
- fn dtpmv
- fn dtpsv
- fn dtrmv
- fn dtrsv
- fn idamax
- enum Diagonal
- enum MemoryLayout
- enum Side
- enum Transpose
- enum Uplo