github.com/gopherd/gonum@v0.0.4/blas/doc.go (about)

     1  // Copyright ©2017 The Gonum Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  /*
     6  Package blas provides interfaces for the BLAS linear algebra standard.
     7  
     8  All methods must perform appropriate parameter checking and panic if
     9  provided parameters that do not conform to the requirements specified
    10  by the BLAS standard.
    11  
    12  Quick Reference Guide to the BLAS from http://www.netlib.org/lapack/lug/node145.html
    13  
    14  This version is modified to remove the "order" option. All matrix operations are
    15  on row-order matrices.
    16  
    17  Level 1 BLAS
    18  
    19  	        dim scalar vector   vector   scalars              5-element prefixes
    20  	                                                          struct
    21  
    22  	_rotg (                                      a, b )                S, D
    23  	_rotmg(                              d1, d2, a, b )                S, D
    24  	_rot  ( n,         x, incX, y, incY,               c, s )          S, D
    25  	_rotm ( n,         x, incX, y, incY,                      param )  S, D
    26  	_swap ( n,         x, incX, y, incY )                              S, D, C, Z
    27  	_scal ( n,  alpha, x, incX )                                       S, D, C, Z, Cs, Zd
    28  	_copy ( n,         x, incX, y, incY )                              S, D, C, Z
    29  	_axpy ( n,  alpha, x, incX, y, incY )                              S, D, C, Z
    30  	_dot  ( n,         x, incX, y, incY )                              S, D, Ds
    31  	_dotu ( n,         x, incX, y, incY )                              C, Z
    32  	_dotc ( n,         x, incX, y, incY )                              C, Z
    33  	__dot ( n,  alpha, x, incX, y, incY )                              Sds
    34  	_nrm2 ( n,         x, incX )                                       S, D, Sc, Dz
    35  	_asum ( n,         x, incX )                                       S, D, Sc, Dz
    36  	I_amax( n,         x, incX )                                       s, d, c, z
    37  
    38  Level 2 BLAS
    39  
    40  	        options                   dim   b-width scalar matrix  vector   scalar vector   prefixes
    41  
    42  	_gemv (        trans,      m, n,         alpha, a, lda, x, incX, beta,  y, incY ) S, D, C, Z
    43  	_gbmv (        trans,      m, n, kL, kU, alpha, a, lda, x, incX, beta,  y, incY ) S, D, C, Z
    44  	_hemv ( uplo,                 n,         alpha, a, lda, x, incX, beta,  y, incY ) C, Z
    45  	_hbmv ( uplo,                 n, k,      alpha, a, lda, x, incX, beta,  y, incY ) C, Z
    46  	_hpmv ( uplo,                 n,         alpha, ap,     x, incX, beta,  y, incY ) C, Z
    47  	_symv ( uplo,                 n,         alpha, a, lda, x, incX, beta,  y, incY ) S, D
    48  	_sbmv ( uplo,                 n, k,      alpha, a, lda, x, incX, beta,  y, incY ) S, D
    49  	_spmv ( uplo,                 n,         alpha, ap,     x, incX, beta,  y, incY ) S, D
    50  	_trmv ( uplo, trans, diag,    n,                a, lda, x, incX )                 S, D, C, Z
    51  	_tbmv ( uplo, trans, diag,    n, k,             a, lda, x, incX )                 S, D, C, Z
    52  	_tpmv ( uplo, trans, diag,    n,                ap,     x, incX )                 S, D, C, Z
    53  	_trsv ( uplo, trans, diag,    n,                a, lda, x, incX )                 S, D, C, Z
    54  	_tbsv ( uplo, trans, diag,    n, k,             a, lda, x, incX )                 S, D, C, Z
    55  	_tpsv ( uplo, trans, diag,    n,                ap,     x, incX )                 S, D, C, Z
    56  
    57  	        options                   dim   scalar vector   vector   matrix  prefixes
    58  
    59  	_ger  (                    m, n, alpha, x, incX, y, incY, a, lda ) S, D
    60  	_geru (                    m, n, alpha, x, incX, y, incY, a, lda ) C, Z
    61  	_gerc (                    m, n, alpha, x, incX, y, incY, a, lda ) C, Z
    62  	_her  ( uplo,                 n, alpha, x, incX,          a, lda ) C, Z
    63  	_hpr  ( uplo,                 n, alpha, x, incX,          ap )     C, Z
    64  	_her2 ( uplo,                 n, alpha, x, incX, y, incY, a, lda ) C, Z
    65  	_hpr2 ( uplo,                 n, alpha, x, incX, y, incY, ap )     C, Z
    66  	_syr  ( uplo,                 n, alpha, x, incX,          a, lda ) S, D
    67  	_spr  ( uplo,                 n, alpha, x, incX,          ap )     S, D
    68  	_syr2 ( uplo,                 n, alpha, x, incX, y, incY, a, lda ) S, D
    69  	_spr2 ( uplo,                 n, alpha, x, incX, y, incY, ap )     S, D
    70  
    71  Level 3 BLAS
    72  
    73  	        options                                 dim      scalar matrix  matrix  scalar matrix  prefixes
    74  
    75  	_gemm (             transA, transB,      m, n, k, alpha, a, lda, b, ldb, beta,  c, ldc ) S, D, C, Z
    76  	_symm ( side, uplo,                      m, n,    alpha, a, lda, b, ldb, beta,  c, ldc ) S, D, C, Z
    77  	_hemm ( side, uplo,                      m, n,    alpha, a, lda, b, ldb, beta,  c, ldc ) C, Z
    78  	_syrk (       uplo, trans,                  n, k, alpha, a, lda,         beta,  c, ldc ) S, D, C, Z
    79  	_herk (       uplo, trans,                  n, k, alpha, a, lda,         beta,  c, ldc ) C, Z
    80  	_syr2k(       uplo, trans,                  n, k, alpha, a, lda, b, ldb, beta,  c, ldc ) S, D, C, Z
    81  	_her2k(       uplo, trans,                  n, k, alpha, a, lda, b, ldb, beta,  c, ldc ) C, Z
    82  	_trmm ( side, uplo, transA,        diag, m, n,    alpha, a, lda, b, ldb )                S, D, C, Z
    83  	_trsm ( side, uplo, transA,        diag, m, n,    alpha, a, lda, b, ldb )                S, D, C, Z
    84  
    85  Meaning of prefixes
    86  
    87  	S - float32	C - complex64
    88  	D - float64	Z - complex128
    89  
    90  Matrix types
    91  
    92  	GE - GEneral 		GB - General Band
    93  	SY - SYmmetric 		SB - Symmetric Band 	SP - Symmetric Packed
    94  	HE - HErmitian 		HB - Hermitian Band 	HP - Hermitian Packed
    95  	TR - TRiangular 	TB - Triangular Band 	TP - Triangular Packed
    96  
    97  Options
    98  
    99  	trans 	= NoTrans, Trans, ConjTrans
   100  	uplo 	= Upper, Lower
   101  	diag 	= Nonunit, Unit
   102  	side 	= Left, Right (A or op(A) on the left, or A or op(A) on the right)
   103  
   104  For real matrices, Trans and ConjTrans have the same meaning.
   105  For Hermitian matrices, trans = Trans is not allowed.
   106  For complex symmetric matrices, trans = ConjTrans is not allowed.
   107  */
   108  package blas // import "github.com/gopherd/gonum/blas"