3 ;;; System to convert the Fortran code to Lisp
5 ;;; How to convert the Fortran code to Lisp for maxima.
7 ;;; 1. Get f2cl, which is available via quicklisp:
8 ;;; (ql:quickload "f2cl")
10 ;;; (mk:oos "lapack-lisp" :compile :force t)
12 ;;; This should generate all of the Lisp code.
14 (mk:define-language :f2cl-lisp
18 :binary-extension "lisp")
20 (defparameter *lapack-root* (maxima::maxima-load-pathname-directory))
22 (mk:defsystem "lapack-package"
23 :source-pathname *lapack-root*
24 :depends-on ("blas-package")
28 (:file "lapack-package"))))
30 (mk:defsystem "lapack-lisp"
31 :source-pathname (merge-pathnames "./lapack/" *lapack-root*)
32 :binary-pathname (merge-pathnames "./lapack/" *lapack-root*)
33 :depends-on ("lapack-package" "blas-lisp")
39 :compiler-options (:package :lapack
40 :float-format double-float)
44 :depends-on ("dlartg" "dlapy2" "dgebak" "dtrevc" "dhseqr"
45 "dorghr" "dlacpy" "dgehrd" "dgebal"
46 "dlascl" "dlange" "dlabad" "dlamch"
51 :depends-on ("dlahrd" "dlarfb" "dgehd2" "ilaenv"))
53 :depends-on ("dlarfx" "dlarfg" "dlapy2" "dlacpy" "dlanhs"
54 "dlabad" "dlamch" "dlahqr" "ilaenv"
59 :depends-on ("dlamc2" "dlamc3" "dlamc4" "dlamc5"))
61 :depends-on ("dlamc3"))
63 :depends-on ("dlamc1" "dlamc3" "dlamc4" "dlamc5"))
68 :depends-on ("dlassq"))
71 :depends-on ("dlamch"))
73 :depends-on ("dlamch"))
75 :depends-on ("dorgqr" "ilaenv"))
77 :depends-on ("dlabad" "dlamch" "dlaln2"))
79 :depends-on ("ieeeck"))
81 :depends-on ("dlarfg"))
84 :depends-on ("dlarfg" "dlarf"))
87 :depends-on ("dlanhs" "dlarfg" "dlanv2" "dlabad" "dlamch"))
89 :depends-on ("dlassq"))
91 :depends-on ("dlapy2" "dlamch"))
95 :depends-on ("dorg2r" "dlarft" "dlarfb" "ilaenv"))
102 :depends-on ("dlapy2" "dlamch"))
104 :depends-on ("dlarf"))
110 :depends-on ("dlartg" "dlapy2" "dgebak" "dtrsna" "dtrevc"
111 "dhseqr" "dorghr" "dlacpy" "dgehrd"
112 "dgebal" "dlascl" "dlange" "dlabad"
115 :depends-on ("dtrexc" "dlacon" "dlaqtr"
116 "dlacpy" "dlapy2" "dlamch"))
118 :depends-on ("dlaexc"))
121 :depends-on ("dladiv" "dlaln2" "dlange" "dlamch"))
123 :depends-on ("dlasy2" "dlanv2" "dlarfg" "dlamch" "dlange"
126 :depends-on ("dlamch"))
130 :depends-on ("dgetrf" "dgetrs"))
132 :depends-on ("dgetf2" "dlaswp" "ilaenv"))
134 :depends-on ("dlaswp"))
140 :depends-on ("dorglq" "dgelqf" "dorgbr" "dormbr" "dorgqr"
141 "dlacpy" "dbdsdc" "dgebrd" "dlaset"
142 "dgeqrf" "dlascl" "dlange" "dlamch"
145 :depends-on ("dlasr" "dlasda" "dlasd0" "dlamch" "dlascl"
146 "dlanst" "dlaset" "dlasdq"
149 :depends-on ("dlabrd" "dgebd2" "ilaenv"))
151 :depends-on ("dgelq2" "dlarfb" "dlarft" "ilaenv"))
153 :depends-on ("dorglq" "dorgqr" "ilaenv"))
155 :depends-on ("dorgl2" "dlarfb" "dlarft" "ilaenv"))
157 :depends-on ("dlarf"))
159 :depends-on ("dormqr" "dormlq" "ilaenv"))
161 :depends-on ("dlasr" "dbdsqr" "dlartg"))
163 :depends-on ("dlassq"))
165 :depends-on ("dlasdt" "dlasd1" "dlasdq"))
167 :depends-on ("dlasd6" "dlaset" "dlasdq" "dlasdt"))
170 :depends-on ("dlarfg"))
172 :depends-on ("dlarf" "dlarfg"))
174 :depends-on ("dlarf" "dlarfg"))
176 :depends-on ("dorm2r" "dlarfb" "dlarft" "ilaenv"))
178 :depends-on ("dorml2" "dlarfb" "dlarft" "ilaenv"))
180 :depends-on ("dgeqr2" "dlarfb" "dlarft" "ilaenv"))
182 :depends-on ("dlasq1" "dlasv2" "dlas2" "dlasr" "dlartg"
185 :depends-on ("dlas2" "dlasrt" "dlasq2" "dlascl"))
187 :depends-on ("dlamch"))
191 :depends-on ("dlasd2" "dlasd3" "dlamrg" "dlascl"))
194 :depends-on ("dlasq3" "ilaenv" "dlasrt" "dlamch"))
196 :depends-on ("dlamrg" "dlacpy" "dlaset" "dlapy2" "dlamch"
199 :depends-on ("dlasd4" "dlacpy" "dlascl" "dlamch"))
202 :depends-on ("dlasd7" "dlasd8"))
205 :depends-on ("dlarf" "dlarfg"))
207 :depends-on ("dlarf"))
209 :depends-on ("dlasd5" "dlaed6"))
211 :depends-on ("dlapy2" "dlamch" "dlamrg"))
213 :depends-on ("dlasd4" "dlaset" "dlascl" "dlamch"))
215 :depends-on ("dlasq4" "dlasq5" "dlasq6" "dlamch"))
219 :depends-on ("dlamch"))
222 :depends-on ("dlamch"))
226 :depends-on ("dorglq" "dgelqf" "dormbr" "dorgqr" "dlacpy"
227 "dbdsqr" "dorgbr" "dgebrd" "dlaset"
228 "dgeqrf" "dlascl" "dlange" "dlamch"
231 ;; For condition numbers of the singular vectors
235 :depends-on ("zlassq"))
237 ;; Complex eigen problems
239 :depends-on ("zhseqr" "zlange" "zlascl" "zgebal" "zlacpy" "zunghr"
240 "ztrevc" "zgebak" "zgehrd"))
242 :depends-on ("zlaqr0" "zlaset" "zlahqr" "zlacpy"))
244 :depends-on ("zlassq"))
246 :depends-on ("disnan"))
249 :depends-on ("disnan"))
251 :depends-on ("zungqr"))
253 :depends-on ("zlatrs"))
255 :depends-on ("zlatrs"))
257 :depends-on ("zladiv"))
259 :depends-on ("zung2r" "zlarft" "zlarfb"))
261 :depends-on ("dlaisnan"))
266 :depends-on ("zlarf"))
268 :depends-on ("zlacgv"))
270 :depends-on ("ilazlr" "ilazlc" "zlacgv"))
275 :depends-on ("ilazlc" "ilazlr"))
277 :depends-on ("zlahqr" "zlaqr3" "zlaqr4" "zlaqr5" "zlacpy"))
280 :depends-on ("zgehrd" "zunmhr" "zlahqr" "ztrexc" "zlarfg"
281 "zlaqr4" "zlacpy" "zlaset"))
283 :depends-on ("zlaqr2" "zlahqr" "zlacpy" "zlaqr5"))
285 :depends-on ("zlaqr1" "zlarfg" "zlaset" "zlacpy"))
288 :depends-on ("zunmhr" "ztrexc" "zlacpy" "zlaset"))
290 :depends-on ("dlapy3" "zladiv"))
292 :depends-on ("zlarfg" "zladiv"))
294 :depends-on ("zlahr2" "zgehd2" "zlarfb"))
296 :depends-on ("zunmqr"))
298 :depends-on ("zlartg" "zrot" "zunm2r"))
303 :depends-on ("zunm2r" "zlarft" "zlarfb"))
305 :depends-on ("zlacgv" "zlacpy"))
307 :depends-on ("zlarfg" "zlarf"))
311 :depends-on ("dsterf" "zhetrd" "zlanhe" "zsteqr" "zungtr"))
313 :depends-on ("dlae2"))
315 :depends-on ("zlatrd" "zhetd2"))
317 :depends-on ("dlaev2" "zlasr" "dlae2"))
320 :depends-on ("zungql"))
327 :depends-on ("zung2l"))
331 (mk:defsystem blas-package
332 :source-pathname *lapack-root*
336 ((:file "blas-package")))))
338 (mk:defsystem blas-lisp
339 :source-pathname (merge-pathnames "./blas/" *lapack-root*)
340 :source-extension "f"
342 :depends-on ("blas-package")
346 :compiler-options (:package :blas
347 :float-format double-float)
360 :depends-on ("lsame" "xerbla"))
362 :depends-on ("lsame" "xerbla"))
364 :depends-on ("lsame" "xerbla"))
366 :depends-on ("xerbla"))
370 :depends-on ("lsame" "xerbla"))
372 :depends-on ("lsame" "xerbla"))
374 :depends-on ("lsame" "xerbla"))
376 :depends-on ("lsame" "xerbla"))
379 :depends-on ("lsame" "xerbla"))
381 :depends-on ("lsame" "xerbla"))
383 :depends-on ("lsame" "xerbla"))
385 :depends-on ("lsame" "xerbla"))
387 :depends-on ("lsame" "xerbla"))
389 :depends-on ("lsame" "xerbla"))
391 :depends-on ("lsame" "xerbla"))
393 :depends-on ("lsame" "xerbla"))
395 :depends-on ("lsame" "xerbla"))
397 :depends-on ("lsame" "xerbla"))
399 :depends-on ("lsame" "xerbla"))
401 :depends-on ("lsame" "xerbla"))
403 :depends-on ("lsame" "xerbla"))
405 :depends-on ("lsame" "xerbla"))
407 :depends-on ("dcabs1"))
412 :depends-on ("dcabs1"))
418 :depends-on ("dcabs1"))