@stdlib/blas-base
v0.3.1
Published
Base (i.e., lower-level) basic linear algebra subprograms (BLAS).
Downloads
37
Readme
BLAS
Base (i.e., lower-level) basic linear algebra subprograms (BLAS).
Installation
npm install @stdlib/blas-baseUsage
var blas = require( '@stdlib/blas-base' );blas
Namespace for "base" (i.e., lower-level) basic linear algebra subprograms (BLAS).
var o = blas;
// returns {...}BLAS Level 1
caxpy( N, alpha, x, strideX, y, strideY ): scale a single-precision complex floating-point vector by a single-precision complex floating-point constant and add the result to a single-precision complex floating-point vector.ccopy( N, x, strideX, y, strideY ): copy values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.cscal( N, alpha, x, strideX ): scales a single-precision complex floating-point vector by a single-precision complex floating-point constant.csrot( N, x, strideX, y, strideY, c, s ): apply a plane rotation.csscal( N, alpha, x, strideX ): scale a single-precision complex floating-point vector by a single-precision floating-point constant.cswap( N, x, strideX, y, strideY ): interchange two complex single-precision floating-point vectors.dasum( N, x, stride ): compute the sum of absolute values (L1 norm).daxpy( N, alpha, x, strideX, y, strideY ): multiply a vectorxby a constantalphaand add the result toy.dcopy( N, x, strideX, y, strideY ): copy values fromxintoy.ddot( N, x, strideX, y, strideY ): calculate the dot product of two double-precision floating-point vectors.dnrm2( N, x, stride ): calculate the L2-norm of a double-precision floating-point vector.drot( N, x, strideX, y, strideY, c, s ): apply a plane rotation.drotg( a, b ): construct a Givens plane rotation.drotm( N, x, strideX, y, strideY, param ): apply a modified Givens plane rotation.dscal( N, alpha, x, stride ): multiply a double-precision floating-point vectorxby a constantalpha.dsdot( N, x, strideX, y, strideY ): calculate the dot product with extended accumulation and result of two single-precision floating-point vectors.dswap( N, x, strideX, y, strideY ): interchange two double-precision floating-point vectors.dznrm2( N, x, strideX ): compute the L2-norm of a complex double-precision floating-point vector.gasum( N, x, stride ): compute the sum of absolute values (L1 norm).gaxpy( N, alpha, x, strideX, y, strideY ): multiplyxby a constantalphaand add the result toy.gcopy( N, x, strideX, y, strideY ): copy values fromxintoy.gdot( N, x, strideX, y, strideY ): calculate the dot product of two vectors.gnrm2( N, x, stride ): calculate the L2-norm of a vector.gscal( N, alpha, x, stride ): multiply a vector by a scalar constant.gswap( N, x, strideX, y, strideY ): interchange two vectors.idamax( N, x, strideX ): find the index of the first element having the maximum absolute value.igamax( N, x, strideX ): find the index of the first element having the maximum absolute value.isamax( N, x, strideX ): find the index of the first element having the maximum absolute value.sasum( N, x, stride ): compute the sum of absolute values (L1 norm).saxpy( N, alpha, x, strideX, y, strideY ): multiply a vectorxby a constantalphaand add the result toy.scasum( N, x, strideX ): compute the sum of the absolute values of the real and imaginary components of a single-precision complex floating-point vector.scnrm2( N, x, strideX ): compute the L2-norm of a complex single-precision floating-point vector.scopy( N, x, strideX, y, strideY ): copy values fromxintoy.sdot( N, x, strideX, y, strideY ): calculate the dot product of two single-precision floating-point vectors.sdsdot( N, scalar, x, strideX, y, strideY ): calculate the dot product of two single-precision floating-point vectors with extended accumulation.snrm2( N, x, stride ): calculate the L2-norm of a single-precision floating-point vector.srot( N, x, strideX, y, strideY, c, s ): apply a plane rotation.srotg( a, b ): construct a Givens plane rotation.srotm( N, x, strideX, y, strideY, param ): apply a modified Givens plane rotation.sscal( N, alpha, x, stride ): multiply a single-precision floating-point vectorxby a constantalpha.sswap( N, x, strideX, y, strideY ): interchange two single-precision floating-point vectors.zaxpy( N, alpha, x, strideX, y, strideY ): scale a double-precision complex floating-point vector by a double-precision complex floating-point constant and add the result to a double-precision complex floating-point vector.zcopy( N, x, strideX, y, strideY ): copy values from one complex double-precision floating-point vector to another complex double-precision floating-point vector.zdrot( N, x, strideX, y, strideY, c, s ): apply a plane rotation.zdscal( N, alpha, x, strideX ): scale a double-precision complex floating-point vector by a double-precision floating-point constant.zscal( N, alpha, x, strideX ): scales a double-precision complex floating-point vector by a double-precision complex floating-point constant.zswap( N, x, strideX, y, strideY ): interchange two complex double-precision floating-point vectors.
BLAS Level 2
dgemv( order, trans, M, N, α, A, LDA, x, sx, β, y, sy ): perform one of the matrix-vector operationsy = α*A*x + β*yory = α*A^T*x + β*y.dger( ord, M, N, α, x, sx, y, sy, A, lda ): perform the rank 1 operationA = α*x*y^T + A.dspmv( order, uplo, N, α, AP, x, sx, β, y, sy ): perform the matrix-vector operationy = α*A*x + β*ywhereαandβare scalars,xandyareNelement vectors and,Ais anNbyNsymmetric matrix supplied in packed form.dspr( order, uplo, N, α, x, sx, AP ): perform the symmetric rank 1 operationA = α*x*x^T + A.dsymv( order, uplo, N, α, A, LDA, x, sx, β, y, sy ): perform the matrix-vector operationy = α*A*x + β*ywhereαandβare scalars,xandyareNelement vectors, andAis anNbyNsymmetric matrix.dsyr( order, uplo, N, α, x, sx, A, LDA ): perform the symmetric rank 1 operationA = α*x*x^T + A.dsyr2( order, uplo, N, α, x, sx, y, sy, A, LDA ): perform the symmetric rank 2 operationA = α*x*y^T + α*y*x^T + A.dtrmv( order, uplo, trans, diag, N, A, LDA, x, sx ): perform one of the matrix-vector operationsx = A*xorx = A^T*x.dtrsv( order, uplo, trans, diag, N, A, LDA, x, sx ): solve one of the systems of equationsA*x = borA^T*x = b.ggemv( order, trans, M, N, α, A, LDA, x, sx, β, y, sy ): perform one of the matrix-vector operationsy = α*A*x + β*yory = α*A^T*x + β*y.gger( order, M, N, α, x, sx, y, sy, A, lda ): perform the rank 1 operationA = α*x*y^T + A.gsyr( order, uplo, N, α, x, sx, A, LDA ): perform the symmetric rank 1 operationA = α*x*x^T + A.sgemv( order, trans, M, N, α, A, LDA, x, sx, β, y, sy ): perform one of the matrix-vector operationsy = α*A*x + β*yory = α*A^T*x + β*y.sger( order, M, N, α, x, sx, y, sy, A, lda ): perform the rank 1 operationA = α*x*y^T + A.sspmv( order, uplo, N, α, AP, x, sx, β, y, sy ): perform the matrix-vector operationy = α*A*x + β*ywhereαandβare scalars,xandyareNelement vectors and,Ais anNbyNsymmetric matrix supplied in packed form.sspr( order, uplo, N, α, x, sx, AP ): perform the symmetric rank 1 operationA = α*x*x^T + A.ssymv( order, uplo, N, α, A, LDA, x, sx, β, y, sy ): perform the matrix-vector operationy = α*A*x + β*y.ssyr( order, uplo, N, α, x, sx, A, LDA ): perform the symmetric rank 1 operationA = α*x*x^T + A.ssyr2( order, uplo, N, α, x, sx, y, sy, A, LDA ): perform the symmetric rank 2 operationA = α*x*y^T + α*y*x^T + A.strmv( order, uplo, trans, diag, N, A, LDA, x, sx ): perform one of the matrix-vector operationsx = A*xorx = A^T*x.strsv( order, uplo, trans, diag, N, A, LDA, x, sx ): solve one of the systems of equationsA*x = borA^T*x = b.
BLAS Level 3
dgemm( ord, ta, tb, M, N, K, α, A, lda, B, ldb, β, C, ldc ): perform the matrix-matrix operationC = α*op(A)*op(B) + β*Cwhereop(X)is one of theop(X) = X, orop(X) = X^T.ggemm( ord, ta, tb, M, N, K, α, A, lda, B, ldb, β, C, ldc ): perform the matrix-matrix operationC = α*op(A)*op(B) + β*Cwhereop(X)is one of theop(X) = X, orop(X) = X^T.sgemm( ord, ta, tb, M, N, K, α, A, lda, B, ldb, β, C, ldc ): perform the matrix-matrix operationC = α*op(A)*op(B) + β*Cwhereop(X)is one of theop(X) = X, orop(X) = X^T.
Scalar Operations
dcabs1( z ): compute the sum of the absolute values of the real part and imaginary components of a double-precision complex floating-point number.scabs1( z ): compute the sum of the absolute values of the real and imaginary components of a single-precision complex floating-point number.
Auxiliary BLAS
Utilities
assert: base BLAS assertion utilities.diagonalTypeEnum2Str( value ): return the BLAS diagonal type string associated with a BLAS diagonal type enumeration constant.diagonalTypeResolveEnum( value ): return the enumeration constant associated with a supported BLAS diagonal type value.diagonalTypeResolveStr( value ): return the diagonal type string associated with a supported BLAS diagonal type value.diagonalTypeStr2Enum( diagonal ): return the enumeration constant associated with a BLAS diagonal type.diagonalTypes(): BLAS diagonal element types.layoutEnum2Str( layout ): return the BLAS memory layout string associated with a BLAS memory layout enumeration constant.layoutResolveEnum( layout ): return the enumeration constant associated with a supported BLAS memory layout value.layoutResolveStr( layout ): return the layout string associated with a supported BLAS memory layout value.layoutStr2Enum( layout ): return the enumeration constant associated with a BLAS memory layout string.layouts(): BLAS memory layouts.matrixOrientationEnum2Str( value ): return the matrix orientation string associated with a matrix orientation enumeration constant.matrixOrientationResolveEnum( value ): return the enumeration constant associated with a supported matrix orientation value.matrixOrientationResolveStr( value ): return the matrix orientation string associated with a supported matrix orientation value.matrixOrientationStr2Enum( value ): return the enumeration constant associated with a matrix orientation.matrixOrientations(): BLAS matrix orientations.matrixTriangleEnum2Str( value ): return the BLAS matrix triangle string associated with a BLAS matrix triangle enumeration constant.matrixTriangleResolveEnum( value ): return the enumeration constant associated with a supported BLAS matrix triangle value.matrixTriangleResolveStr( value ): return the matrix triangle string associated with a supported BLAS matrix triangle value.matrixTriangleStr2Enum( operation ): return the enumeration constant associated with a BLAS matrix triangle.matrixTriangles(): BLAS matrix triangles.operationSideEnum2Str( operation ): return the BLAS operation side string associated with a BLAS operation side enumeration constant.operationSideResolveEnum( operation ): return the enumeration constant associated with a supported BLAS operation side value.operationSideResolveStr( operation ): return the operation side string associated with a supported BLAS operation side value.operationSideStr2Enum( operation ): return the enumeration constant associated with a BLAS operation side.operationSides(): BLAS operation sides.transposeOperationEnum2Str( operation ): return the BLAS transpose operation string associated with a BLAS transpose operation enumeration constant.transposeOperationResolveEnum( operation ): return the enumeration constant associated with a supported BLAS transpose operation value.transposeOperationResolveStr( operation ): return the transpose operation string associated with a supported BLAS transpose operation value.transposeOperationStr2Enum( operation ): return the enumeration constant associated with a BLAS transpose operation.transposeOperations(): BLAS transpose operations.
Examples
var objectKeys = require( '@stdlib/utils-keys' );
var blas = require( '@stdlib/blas-base' );
console.log( objectKeys( blas ) );Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2026. The Stdlib Authors.
