Changeset 6046 in project
 Timestamp:
 09/17/07 08:10:06 (12 years ago)
 Location:
 matrixutils/trunk
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

matrixutils/trunk/matrixutilseggdoc.scm
r5977 r6046 13 13 14 14 (history 15 (version "1.5" "Migrated matrixfold/map to srfi4utils") 15 16 (version "1.4" "Added definematrixfold") 16 17 (version "1.3" "Added definematrixmap") … … 212 213 (describe "u32" ("Unsigned 32bit integer"))))) 213 214 214 (macro "(definematrixfold type)"215 (p "Creates procedure " (tt "MATRIXFOLD:: F * M * X0 > X")216 " that, given an input matrix "217 (tt "M") " procedure " (tt "F") ", and initial value " (tt "X0") ", "218 "returns the result of performing the fold operation on the elements "219 " of the matrix, starting with the given initial value. "220 (tt "TYPE") " is one of the following: "221 (symboltable222 (describe "f64" ("Double precision IEEE floating point"))223 (describe "f32" ("Single precision IEEE floating point"))224 (describe "s32" ("Signed 32bit integer"))225 (describe "u32" ("Unsigned 32bit integer")))))226 227 215 )) 228 216 
matrixutils/trunk/matrixutils.scm
r5977 r6046 27 27 (requireextension blas) 28 28 (requireextension matrixutilssupport) 29 30 (definemacro (definematrixfold type)31 (case type32 ((f64) `(define (matrixfold f v x0)33 (foldec x0 (:f64vector x v) x f)))34 ((f32) `(define (matrixfold f v x0)35 (foldec x0 (:f32vector x v) x f)))36 ((s32) `(define (matrixfold f v x0)37 (foldec x0 (:s32vector x v) x f)))38 ((u32) `(define (matrixfold f v x0)39 (foldec x0 (:u32vector x v) x f)))40 (else `(matrixutils:error 'definematrixfold "matrixfold does not support type " ,type))))41 42 (definemacro (definematrixmap type)43 (case type44 ((f64) `(define (matrixmap f v)45 (f64vectoroflengthec (f64vectorlength v) (:f64vector x v) (f x))))46 ((f32) `(define (matrixmap f v)47 (f32vectoroflengthec (f32vectorlength v) (:f32vector x v) (f x))))48 ((s32) `(define (matrixmap f v)49 (s32vectoroflengthec (s32vectorlength v) (:s32vector x v) (f x))))50 ((u32) `(define (matrixmap f v)51 (u32vectoroflengthec (u32vectorlength v) (:u32vector x v) (f x))))52 (else `(matrixutils:error 'definematrixmap "matrixmap does not support type " ,type))))53 29 54 30 
matrixutils/trunk/matrixutils.setup
r5977 r6046 12 12 `("matrixutils.scm" "matrixutilssupport.so" "matrixutils.html" 13 13 ,@(if hasexports? '("matrixutilssupport.exports") (list)) ) 14 `((version 1. 4)14 `((version 1.5) 15 15 (syntax) 16 16 (requireatruntime matrixutilssupport)
Note: See TracChangeset
for help on using the changeset viewer.