Changeset 5625 in project


Ignore:
Timestamp:
08/23/07 03:42:10 (12 years ago)
Author:
Ivan Raikov
Message:

More additions to the documentation.

Location:
blas/branches/safe
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • blas/branches/safe/blas-eggdoc.scm

    r5605 r5625  
    1515
    1616     (history
    17       (version "2.0" "An overhaul of the library to introduce safe, unsafe, and pure variants of each routine"))
     17      (version "2.0" "An overhaul of the library to introduce safe, unsafe, and pure variants of each routine")
     18      (version "1.8" "Added icopy procedures [by Ivan Raikov]")
     19      (version "1.7" "Support for Mac OS X added [by Will Farr]")
     20      (version "1.6" "Fixed bug in blas library test code")
     21      (version "1.5" "Added support for CLAPACK [by Ivan Raikov]")
     22      (version "1.4" "Added support for atlas CBLAS library [by Stu Glaser]")
     23      (version "1.3" "Tries to find a proper CBLAS library (currently only GSL)")
     24      (version "1.2" "Adapted to new FFI macro-names")
     25      (version "1.1" "Adapted to new setup scheme"))
    1826
    1927     (requires)
     
    8492                     (td (i "unsafe-blas:zgemm!"))))))
    8593             
     94      (subsection "Vector copy routines"
     95                  (procedure  "blas:scopy:: F32VECTOR -> F32VECTOR "
     96                              (procedure  "blas:dcopy:: F64VECTOR -> F64VECTOR ")
     97                              (procedure  "blas:ccopy:: F32VECTOR -> F32VECTOR ")
     98                              (procedure  "blas:zcopy:: F64VECTOR -> F64VECTOR ")
     99                             
     100                              (p "These procedures return a copy of given input SRFI-4 vector. "
     101                                 "The returned vector is allocated with the corresponding SRFI-4 "
     102                                 "constructor, and the input vector is copied to it by the "
     103                                 "corresponding BLAS copy procedure. ")))
     104                             
     105                               
    86106      (subsection "BLAS level 1 routines" )
    87107
     
    89109
    90110      (subsection "BLAS level 3 routines"
     111
     112                  (subsection "Conventions"
     113                              (p "The BLAS level 3 procedures in this egg differ from the actual routines "
     114                                 "they invoke by the position of the leading dimension arguments ("
     115                                 (tt "LDA") ", " (tt "LDB") ", and " (tt "LDC") "). "
     116                                 "In this egg, these arguments are optional, and their default values "
     117                                 "are set to the largest matrix dimension, depending on the semantics "
     118                                 "of the respective operation. ")
     119                              (p "In the procedure signatures below, these optional arguments are indicated "
     120                                 "by [ and ] (square brackets). ")
     121                              (p "Argument " (tt "ORDER") " is one of " (tt "blas:RowMajor") " or "
     122                                 (tt "blas:ColMajor") " to indicate that the input and output matrices "
     123                                 "are in row-major or column-major form, respectively. ")
     124                              (p "Where present, arguments " (tt "TRANS") ", " (tt "TRANSA") ", "
     125                                 (tt "TRANSB") " can be one of " (tt "blas:NoTrans") " or " (tt "blas:Trans")
     126                                 " to indicate whether the respective input matrices are to be transposed or not. ")
     127                              (p "Where present, argument " (tt "SIDE") " can be one of "
     128                                 (tt "blas:Left") " or " (tt "blas:Right") " to indicate whether an "
     129                                 "input symmetric matrix appears on the left or right in the respective operation. ")
     130                              (p "Where present, argument " (tt "UPLO") " can be one of "
     131                                 (tt "blas:Upper") " or " (tt "blas:Lower") " to indicate whether the "
     132                                 "upper or lower triangular part of an input symmetric matrix is to referenced,"
     133                                 "or to specify the type of an input triangular matrix.")
     134                              (p "Where present, argument " (tt "DIAG") " can be one of "
     135                                 (tt "blas:NonUnit") " or " (tt "blas:Unit") " to indicate whether "
     136                                 "an input triangular matrix is unit triangular or not.") )
     137
    91138                  (subsubsection "General matrix multiply-add"
    92139                   (procedure  "blas:sgemm:: ORDER * TRANSA * TRANSB * M * N * K * ALPHA * A * B * BETA * C [LDA * LDB * LDC] -> F32VECTOR "
     
    102149                          " matrix, "  (tt "op( B )") " a " (tt "K x N") " matrix and " (tt "C")
    103150                          " an " (tt "M x N") " matrix. ")))
     151
     152                  (subsubsection "Symmetric matrix multiply-add"
     153                   (procedure  "blas:ssymm:: SIDE * UPLO * M * N * ALPHA * A * B * BETA * C [LDA * LDB * LDC] -> F32VECTOR "
     154                       (procedure  "blas:dsymm:: SIDE * UPLO * M * N * ALPHA * A * B * BETA * C [LDA * LDB * LDC] -> F64VECTOR ")
     155                       (procedure  "blas:csymm:: SIDE * UPLO * M * N * ALPHA * A * B * BETA * C [LDA * LDB * LDC] -> F32VECTOR ")
     156                       (procedure  "blas:zsymm:: SIDE * UPLO * M * N * ALPHA * A * B * BETA * C [LDA * LDB * LDC] -> F64VECTOR ")
     157                               
     158                       (p (tt "xSYMM") " performs matrix-matrix multiply-add operation of the form "
     159                          (tt "C := alpha*A*B + beta*C") " or " (tt "C := alpha*B*A + beta*C") ". ")
     160                       (p (tt "ALPHA") " and " (tt "BETA") " are  scalars, " (tt "A") " is a symmetric matrix, "
     161                          "and " (tt "B") " and " (tt "C") " are " (tt "M x N")
     162                          " matrices. ")))
     163                       
     164                  (subsubsection "Symmetric rank k operation"
     165                   (procedure  "blas:ssyrk:: UPLO * TRANS * N * K * ALPHA * A * BETA * C [LDA * LDB * LDC] -> F32VECTOR "
     166                       (procedure  "blas:dsyrk:: UPLO * TRANS * N * K * ALPHA * A * BETA * C [LDA * LDB * LDC] -> F64VECTOR ")
     167                       (procedure  "blas:csyrk:: UPLO * TRANS * N * K * ALPHA * A * BETA * C [LDA * LDB * LDC] -> F64VECTOR ")
     168                       (procedure  "blas:zsyrk:: UPLO * TRANS * N * K * ALPHA * A * BETA * C [LDA * LDB * LDC] -> F64VECTOR ")
     169                               
     170                       (p (tt "xSYRK") " performs one of the symmetric rank k operations "
     171                          (tt "C := alpha*A*A' + beta*C") " or " (tt "C := alpha*A'*A + beta*C") ". ")
     172                       (p (tt "ALPHA") " and " (tt "BETA") " are  scalars, " (tt "A") " is an " (tt "N x K")
     173                          " or " (tt "K x N") " matrix, and " (tt "C") " is an " (tt "N x N")
     174                          " symmetric matrix. ")))
     175                       
     176                       
     177                  (subsubsection "Hermitian rank k operation"
     178                   (procedure  "blas:cherk:: UPLO * TRANS * N * K * ALPHA * A * BETA * C [LDA * LDB * LDC] -> F32VECTOR "
     179                       (procedure  "blas:zherk:: UPLO * TRANS * N * K * ALPHA * A * BETA * C [LDA * LDB * LDC] -> F64VECTOR ")
     180                               
     181                       (p (tt "xHERK") " performs one of the hermitian rank k operations "
     182                          (tt "C := alpha*A*conjg(A') + beta*C") " or " (tt "C := alpha*conjg(A')*A + beta*C") ". ")
     183                       (p (tt "ALPHA") " and " (tt "BETA") " are  scalars, " (tt "A") " is an " (tt "N x K")
     184                          " or " (tt "K x N") " matrix, and " (tt "C") " is an " (tt "N x N")
     185                          " hermitian matrix. ")))
     186                       
     187
     188                  (subsubsection "Symmetric rank 2k operation"
     189                   (procedure  "blas:ssyr2k:: UPLO * TRANS * N * K * ALPHA * A * B * BETA * C [LDA * LDB * LDC] -> F32VECTOR "
     190                       (procedure  "blas:dsyr2k:: UPLO * TRANS * N * K * ALPHA * A * B * BETA * C [LDA * LDB * LDC] -> F64VECTOR ")
     191                       (procedure  "blas:csyr2k:: UPLO * TRANS * N * K * ALPHA * A * B * BETA * C [LDA * LDB * LDC] -> F64VECTOR ")
     192                       (procedure  "blas:zsyr2k:: UPLO * TRANS * N * K * ALPHA * A * B * BETA * C [LDA * LDB * LDC] -> F64VECTOR ")
     193                               
     194                       (p (tt "xSYR2K") " performs one of the symmetric rank 2k operations "
     195                          (tt "C := alpha*A*B' + beta*C") " or " (tt "C := alpha*B'*A + beta*C") ". ")
     196                       (p (tt "ALPHA") " and " (tt "BETA") " are  scalars, " (tt "A") " and " (tt "B")
     197                          " are " (tt "N x K") " or " (tt "K x N") " matrices, and " (tt "C") " is an "
     198                          (tt "N x N") " symmetric matrix. ")))
     199                       
     200                       
     201                       
     202                  (subsubsection "Hermitian rank 2k operation"
     203                   (procedure  "blas:cher2k:: UPLO * TRANS * N * K * ALPHA * A * B * BETA * C [LDA * LDB * LDC] -> F32VECTOR "
     204                       (procedure  "blas:zher2k:: UPLO * TRANS * N * K * ALPHA * A * B * BETA * C [LDA * LDB * LDC] -> F64VECTOR ")
     205                               
     206                       (p (tt "xHER2K") " performs one of the hermitian rank 2k operations "
     207                          (tt "C := alpha*A*conjg(B') + beta*C") " or " (tt "C := alpha*conjg(B')*A + beta*C") ". ")
     208                       (p (tt "ALPHA") " and " (tt "BETA") " are  scalars, " (tt "A") " and " (tt "B") 
     209                          " are " (tt "N x K") " or " (tt "K x N") " matrices, and " (tt "C") " is an " (tt "N x N")
     210                          " hermitian matrix. ")))
     211                       
     212
     213                  (subsubsection "Triangular matrix equation solve"
     214                   (procedure  "blas:strsm:: SIDE * UPLO * TRANSA * DIAG * M * N * ALPHA * A * B * [LDA * LDB * LDC] -> F32VECTOR "
     215                       (procedure  "blas:dtrsm:: SIDE * UPLO * TRANSA * DIAG * M * N * ALPHA * A * B * [LDA * LDB * LDC] -> F64VECTOR ")
     216                       (procedure  "blas:ctrsm:: SIDE * UPLO * TRANSA * DIAG * M * N * ALPHA * A * B * [LDA * LDB * LDC] -> F32VECTOR ")
     217                       (procedure  "blas:ztrsm:: SIDE * UPLO * TRANSA * DIAG * M * N * ALPHA * A * B * [LDA * LDB * LDC] -> F64VECTOR ")
     218                               
     219                       (p (tt "xTRSM") " solves one of the matrix equations "
     220                          (tt "op( A )*X = alpha*B") " or " (tt "X*op( A ) = alpha*B") ". ")
     221                       (p (tt "op( A )") " is one of " (tt "op( A ) = A") " or " (tt "op( A ) = A'") ". ")
     222                       (p (tt "ALPHA") " and " (tt "BETA") " are  scalars, " (tt "A") " is a upper or lower "
     223                          "triangular matrix, and " (tt "B") " is a " (tt "M x N") " matrix. ")))
     224                 
    104225                  ))
    105226
     
    110231
    111232(define order blas:ColMajor)
     233(define transa blas:NoTrans)
     234
     235(define m 4)
    112236(define n 4)
     237
     238(define alpha 1)
     239(define beta 0)
     240
     241(define a                               ; column-major order!
     242  (f64vector 1 2 3 4
     243             1 1 1 1
     244             3 4 5 6
     245             5 6 7 8) )
     246
     247(define x (f64vector 1 2 1 1))
     248(define y (f64vector 0 0 0 0))
     249   
     250(blas:dgemv! order transa m n alpha a x beta y)
     251
     252(print y)
    113253
    114254EOF
     
    153293
    154294
    155 ;; fsig: (blas:ssymm order side uplo m n alpha a b beta c . rest)
    156 ;; fsig: (blas:dsymm order side uplo m n alpha a b beta c . rest)
    157 ;; fsig: (blas:csymm order side uplo m n alpha a b beta c . rest)
    158 ;; fsig: (blas:zsymm order side uplo m n alpha a b beta c . rest)
    159 
    160 ;; fsig: (blas:chemm order side uplo m n alpha a b beta c . rest)
    161 ;; fsig: (blas:zhemm order side uplo m n alpha a b beta c . rest)
    162 
    163 ;; fsig: (blas:ssyrk order uplo trans n k alpha a beta c . rest)
    164 ;; fsig: (blas:dsyrk order uplo trans n k alpha a beta c . rest)
    165 ;; fsig: (blas:csyrk order uplo trans n k alpha a beta c . rest)
    166 ;; fsig: (blas:zsyrk order uplo trans n k alpha a beta c . rest)
    167 
    168 ;; fsig: (blas:cherk order uplo trans n k alpha a beta c . rest)
    169 ;; fsig: (blas:zherk order uplo trans n k alpha a beta c . rest)
    170 
    171 ;; fsig: (blas:ssyr2k order uplo trans n k alpha a b beta c . rest)
    172 ;; fsig: (blas:dsyr2k order uplo trans n k alpha a b beta c . rest)
    173 ;; fsig: (blas:csyr2k order uplo trans n k alpha a b beta c . rest)
    174 ;; fsig: (blas:zsyr2k order uplo trans n k alpha a b beta c . rest)
    175 
    176 ;; fsig: (blas:cher2k order uplo trans n k alpha a b beta c . rest)
    177 ;; fsig: (blas:zher2k order uplo trans n k alpha a b beta c . rest)
    178 
    179295;; fsig: (blas:strmm order side uplo transA diag m n alpha a b . rest)
    180296;; fsig: (blas:dtrmm order side uplo transA diag m n alpha a b . rest)
  • blas/branches/safe/blas.scm

    r5603 r5625  
    741741                  (if (memq 'ldc fn) 
    742742                      `((ldc  n)) `()))))
    743       (print "fsig: " fsig)
    744743      `(define ,fsig
    745744         (let-optionals rest ,opts
     
    948947                                                     (else 'n)))) `())
    949948                  (if (memq 'incy fn) `((incy 1) (incx 1)) `((incx 1))))))
    950       (print "fsig: " fsig)
    951949      `(define ,fsig
    952950         (let-optionals rest ,opts
     
    13041302          (opts  (cond ((memq 'incy fn)  `((lda  n) (incy 1) (incx 1)))
    13051303                       (else `((lda  n) (incx 1))))))
    1306       (print "fsig: " fsig)
    13071304      `(define ,fsig
    13081305         (let-optionals rest ,opts
Note: See TracChangeset for help on using the changeset viewer.