3 ;;; This defsystem is used to convert the Fortran code to lisp.
5 ;;; You need a copy of f2cl (see clocc.sourceforge.net) for this to
6 ;;; work, of course. Once you have that, you can convert the Fortran
9 ;;; If you add or modify any Fortran file, it is probably best to use
10 ;;; (mk:oos "slatec" :compile :force t) to convert the code. This is
11 ;;; because f2cl uses knowledge of calling conventions of a known
12 ;;; function to generate the call to that function. If the function
13 ;;; is not known, then the call could inefficient at best or erroneous
16 ;;; This also means that you should get the file dependencies right so
17 ;;; that mk:defsys will compile the files in the right order.
19 ;;; Define a new language for defsys to use.
20 (mk:define-language :f2cl
24 :binary-extension "lisp")
26 (mk:defsystem "slatec"
28 :binary-extension "lisp"
31 :source-pathname "fortran"
34 :compiler-options (:array-slicing nil
35 :array-type :simple-array
36 :float-format double-float
45 :depends-on ("fdump" "j4save" "xercnt" "xerhlt" "xerprn" "xersve"))
49 :depends-on ("xgetua"))
51 :depends-on ("j4save"))))
53 :source-pathname "fortran"
56 :compiler-options (:array-slicing nil
57 :array-type :simple-array
58 :float-format double-float
60 :depends-on ("xermsg")
69 :depends-on ("dcsevl" "initds"))
72 :depends-on ("d9lgmc" "dcsevl" "dgamlm" "initds"))
75 :depends-on ("d9lgmc" "dgamma"))
77 ;; Bessel J functions for real arg and order
79 :depends-on ("dcsevl" "initds"))
81 :depends-on ("dcsevl" "initds"))
83 :depends-on ("d9b0mp" "dcsevl" "initds"))
85 :depends-on ("d9b1mp" "dcsevl" "initds"))
88 :compiler-options (:array-slicing nil
90 :float-format double-float
93 :depends-on ("dasyjy" "djairy" "dlngam")
94 :compiler-options (:array-slicing t
95 :array-type :simple-array
96 :float-format double-float
99 :depends-on ("dgamma"))
104 ;; Bessel J function for complex arg and real order.
107 :depends-on ("zabs" "zasyi" "zbknu" "zmlri" "zs1s2" "zseri"))
109 :depends-on ("zabs" "zacai" "zbknu" "zexp" "zsqrt"))
111 :depends-on ("zabs" "zdiv" "zexp" "zmlt" "zsqrt"))
113 :depends-on ("zabs" "zbinu"))
115 :depends-on ("zabs" "zasyi" "zbuni" "zmlri" "zseri" "zuoik" "zwrsk"))
117 :depends-on ("dgamln" "zabs" "zdiv" "zexp" "zkscl"
118 "zlog" "zmlt" "zshch" "zsqrt" "zuchk"))
120 :depends-on ("zabs" "zuni1" "zuni2"))
124 :depends-on ("zabs" "zlog" "zuchk"))
126 :depends-on ("zabs"))
128 :depends-on ("dgamln" "zabs" "zexp" "zlog" "zmlt"))
131 :depends-on ("zabs" "zdiv"))
133 :depends-on ("zabs" "zexp" "zlog"))
135 :depends-on ("dgamln" "zabs" "zdiv" "zlog" "zmlt" "zuchk"))
137 (:file "zsqrt" :depends-on ("zabs"))
140 :depends-on ("zabs" "zdiv" "zlog" "zsqrt"))
142 :depends-on ("zabs" "zuchk" "zunik" "zuoik"))
144 :depends-on ("zabs" "zairy" "zuchk" "zunhj" "zuoik"))
146 :depends-on ("zdiv" "zlog" "zsqrt"))
148 :depends-on ("zabs" "zlog" "zuchk" "zunhj" "zunik"))
150 :depends-on ("zabs" "zbknu" "zrati"))
152 ;; Bessel Y functions for real or complex arg and real order
154 :depends-on ("d9b0mp" "dbesj0" "dcsevl" "initds"))
156 :depends-on ("d9b1mp" "dbesj1" "dcsevl" "initds"))
158 :depends-on ("dasyjy" "dbesy0" "dbesy1" "dbsynu" "dyairy"))
160 :depends-on ("dgamma"))
164 :depends-on ("zbesh"))
166 :depends-on ("zabs" "zacon" "zbknu" "zbunk" "zuoik"))
168 :depends-on ("zabs" "zbinu" "zbknu" "zmlt" "zs1s2"))
170 :depends-on ("zunk1" "zunk2"))
172 :compiler-options (:array-slicing t
173 :float-format double-float
175 :depends-on ("zabs" "zs1s2" "zuchk" "zunik"))
177 :depends-on ("zabs" "zairy" "zs1s2" "zuchk" "zunhj"))
179 ;; Bessel I functions for real or complex arg and real order
181 :depends-on ("dcsevl" "initds"))
183 :depends-on ("dcsevl" "initds"))
185 :depends-on ("dbsi0e" "dcsevl" "initds"))
187 :depends-on ("dbsi1e" "dcsevl" "initds"))
189 :compiler-options (:array-slicing nil
191 :float-format double-float
194 :depends-on ("dasyik" "dlngam")
195 :compiler-options (:array-slicing t
197 :float-format double-float
200 :depends-on ("zabs" "zbinu"))
202 ;; Bessel K functions
204 :depends-on ("dbesi0" "dbsk0e" "dcsevl" "initds"))
206 :depends-on ("dbesi0" "dcsevl" "initds"))
208 :depends-on ("dbesi1" "dbsk1e" "dcsevl" "initds"))
210 :depends-on ("dbesi1" "dcsevl" "initds"))
212 :depends-on ("dasyik" "dbesk0" "dbesk1" "dbsk0e" "dbsk1e" "dbsknu"))
214 :depends-on ("dgamma"))
216 :depends-on ("zabs" "zacon" "zbknu" "zbunk" "zuoik"))
220 :depends-on ("dcsevl" "initds"))
222 :depends-on ("d9aimp" "dcsevl" "initds"))
224 :depends-on ("d9aimp" "daie" "dcsevl" "initds"))
226 :depends-on ("d9aimp" "dcsevl" "initds"))
228 :depends-on ("d9aimp" "dbie" "dcsevl" "initds"))
230 :depends-on ("zabs" "zbinu" "zdiv" "zsqrt"))
234 :depends-on ("dcsevl" "derfc" "initds"))
236 :depends-on ("dcsevl" "initds"))
238 ;; Exponential integrals
240 :depends-on ("dcsevl" "initds"))
243 ;; Spence's function, related to dilogarithm
245 :depends-on ("d9upak"))
249 :source-pathname "fortran"
252 ;; These are appropriate defaults for quadpack because
253 ;; some of the routines slice an array and pass it as an
254 ;; argument to other routines.
256 ;; If we want to make the routines faster, array-slicing
257 ;; and array-type should be overridden in the individual
259 :compiler-options (:array-slicing t
261 :float-format double-float
264 :depends-on ("xermsg")
276 ;; Core integration routines
287 :depends-on ("dqcheb" "dqk15w"))
290 :depends-on ("dqcheb"
320 :depends-on ("dqagie"
323 ;; If your defsystem doesn't support :compiler-options, use this:
324 ;; :language :f2cl-no-slice
325 ;; If your defsystem does support :compiler-options, use this:
326 :compiler-options (:array-slicing nil
328 :float-format double-float
332 :depends-on ("dqc25f"
336 :depends-on ("dqc25s"
340 :depends-on ("dqc25c"
342 ;; Simplified interface routines
345 :depends-on ("dqage"))
347 :depends-on ("dqagse"))
349 :depends-on ("dqagie"))
351 :depends-on ("dqawfe"))
353 :depends-on ("dqawoe"))
355 :depends-on ("dqawse"))
357 :depends-on ("dqawce")))