1 ;;; Compiled by f2cl version:
2 ;;; ("f2cl1.l,v 95098eb54f13 2013/04/01 00:45:16 toy $"
3 ;;; "f2cl2.l,v 95098eb54f13 2013/04/01 00:45:16 toy $"
4 ;;; "f2cl3.l,v 96616d88fb7e 2008/02/22 22:19:34 rtoy $"
5 ;;; "f2cl4.l,v 96616d88fb7e 2008/02/22 22:19:34 rtoy $"
6 ;;; "f2cl5.l,v 95098eb54f13 2013/04/01 00:45:16 toy $"
7 ;;; "f2cl6.l,v 1d5cbacbb977 2008/08/24 00:56:27 rtoy $"
8 ;;; "macros.l,v 1409c1352feb 2013/03/24 20:44:50 toy $")
10 ;;; Using Lisp CMU Common Lisp snapshot-2013-11 (20E Unicode)
12 ;;; Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
13 ;;; (:coerce-assigns :as-needed) (:array-type ':array)
14 ;;; (:array-slicing t) (:declare-common nil)
15 ;;; (:float-format single-float))
17 (in-package "ODEPACK")
20 (defun dhefa (a lda n ipvt info job
)
21 (declare (type (array f2cl-lib
:integer4
(*)) ipvt
)
22 (type (f2cl-lib:integer4
) job info n lda
)
23 (type (array double-float
(*)) a
))
24 (f2cl-lib:with-multi-array-data
25 ((a double-float a-%data% a-%offset%
)
26 (ipvt f2cl-lib
:integer4 ipvt-%data% ipvt-%offset%
))
27 (prog ((j 0) (k 0) (km1 0) (kp1 0) (l 0) (nm1 0) (t$
0.0d0
))
28 (declare (type (double-float) t$
)
29 (type (f2cl-lib:integer4
) nm1 l kp1 km1 k j
))
30 (if (> job
1) (go label80
))
32 (setf nm1
(f2cl-lib:int-sub n
1))
33 (if (< nm1
1) (go label70
))
34 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
37 (setf kp1
(f2cl-lib:int-add k
1))
42 (f2cl-lib:array-slice a-%data%
50 (setf (f2cl-lib:fref ipvt-%data%
(k) ((1 *)) ipvt-%offset%
) l
)
52 (= (f2cl-lib:fref a-%data%
(l k
) ((1 lda
) (1 *)) a-%offset%
) 0.0d0
)
54 (if (= l k
) (go label10
))
55 (setf t$
(f2cl-lib:fref a-%data%
(l k
) ((1 lda
) (1 *)) a-%offset%
))
56 (setf (f2cl-lib:fref a-%data%
(l k
) ((1 lda
) (1 *)) a-%offset%
)
57 (f2cl-lib:fref a-%data%
(k k
) ((1 lda
) (1 *)) a-%offset%
))
58 (setf (f2cl-lib:fref a-%data%
(k k
) ((1 lda
) (1 *)) a-%offset%
) t$
)
62 (f2cl-lib:fref a-%data%
66 (setf (f2cl-lib:fref a-%data%
67 ((f2cl-lib:int-add k
1) k
)
71 (f2cl-lib:fref a-%data%
72 ((f2cl-lib:int-add k
1) k
)
76 (f2cl-lib:fdo
(j kp1
(f2cl-lib:int-add j
1))
80 (f2cl-lib:fref a-%data%
84 (if (= l k
) (go label20
))
85 (setf (f2cl-lib:fref a-%data%
(l j
) ((1 lda
) (1 *)) a-%offset%
)
86 (f2cl-lib:fref a-%data%
90 (setf (f2cl-lib:fref a-%data%
(k j
) ((1 lda
) (1 *)) a-%offset%
)
93 (daxpy (f2cl-lib:int-sub n k
) t$
94 (f2cl-lib:array-slice a-%data%
100 (f2cl-lib:array-slice a-%data%
113 (setf (f2cl-lib:fref ipvt-%data%
(n) ((1 *)) ipvt-%offset%
) n
)
114 (if (= (f2cl-lib:fref a-%data%
(n n
) ((1 lda
) (1 *)) a-%offset%
) 0.0d0
)
118 (setf nm1
(f2cl-lib:int-sub n
1))
119 (if (<= nm1
1) (go label105
))
120 (f2cl-lib:fdo
(k 2 (f2cl-lib:int-add k
1))
123 (setf km1
(f2cl-lib:int-sub k
1))
124 (setf l
(f2cl-lib:fref ipvt-%data%
(km1) ((1 *)) ipvt-%offset%
))
125 (setf t$
(f2cl-lib:fref a-%data%
(l n
) ((1 lda
) (1 *)) a-%offset%
))
126 (if (= l km1
) (go label90
))
127 (setf (f2cl-lib:fref a-%data%
(l n
) ((1 lda
) (1 *)) a-%offset%
)
128 (f2cl-lib:fref a-%data%
(km1 n
) ((1 lda
) (1 *)) a-%offset%
))
129 (setf (f2cl-lib:fref a-%data%
(km1 n
) ((1 lda
) (1 *)) a-%offset%
) t$
)
131 (setf (f2cl-lib:fref a-%data%
(k n
) ((1 lda
) (1 *)) a-%offset%
)
132 (+ (f2cl-lib:fref a-%data%
(k n
) ((1 lda
) (1 *)) a-%offset%
)
134 (f2cl-lib:fref a-%data%
146 (f2cl-lib:array-slice a-%data%
154 (setf (f2cl-lib:fref ipvt-%data%
(nm1) ((1 *)) ipvt-%offset%
) l
)
155 (if (= (f2cl-lib:fref a-%data%
(l nm1
) ((1 lda
) (1 *)) a-%offset%
) 0.0d0
)
157 (if (= l nm1
) (go label110
))
158 (setf t$
(f2cl-lib:fref a-%data%
(l nm1
) ((1 lda
) (1 *)) a-%offset%
))
159 (setf (f2cl-lib:fref a-%data%
(l nm1
) ((1 lda
) (1 *)) a-%offset%
)
160 (f2cl-lib:fref a-%data%
(nm1 nm1
) ((1 lda
) (1 *)) a-%offset%
))
161 (setf (f2cl-lib:fref a-%data%
(nm1 nm1
) ((1 lda
) (1 *)) a-%offset%
) t$
)
165 (f2cl-lib:fref a-%data%
169 (setf (f2cl-lib:fref a-%data%
(n nm1
) ((1 lda
) (1 *)) a-%offset%
)
170 (* (f2cl-lib:fref a-%data%
(n nm1
) ((1 lda
) (1 *)) a-%offset%
)
172 (setf t$
(f2cl-lib:fref a-%data%
(l n
) ((1 lda
) (1 *)) a-%offset%
))
173 (if (= l nm1
) (go label120
))
174 (setf (f2cl-lib:fref a-%data%
(l n
) ((1 lda
) (1 *)) a-%offset%
)
175 (f2cl-lib:fref a-%data%
(nm1 n
) ((1 lda
) (1 *)) a-%offset%
))
176 (setf (f2cl-lib:fref a-%data%
(nm1 n
) ((1 lda
) (1 *)) a-%offset%
) t$
)
178 (setf (f2cl-lib:fref a-%data%
(n n
) ((1 lda
) (1 *)) a-%offset%
)
179 (+ (f2cl-lib:fref a-%data%
(n n
) ((1 lda
) (1 *)) a-%offset%
)
181 (f2cl-lib:fref a-%data%
189 (setf (f2cl-lib:fref ipvt-%data%
(n) ((1 *)) ipvt-%offset%
) n
)
190 (if (= (f2cl-lib:fref a-%data%
(n n
) ((1 lda
) (1 *)) a-%offset%
) 0.0d0
)
194 (return (values nil nil nil nil info nil
)))))
196 (in-package #:cl-user
)
197 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
198 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
199 (setf (gethash 'fortran-to-lisp
::dhefa fortran-to-lisp
::*f2cl-function-info
*)
200 (fortran-to-lisp::make-f2cl-finfo
201 :arg-types
'((array double-float
(*)) (fortran-to-lisp::integer4
)
202 (fortran-to-lisp::integer4
)
203 (array fortran-to-lisp
::integer4
(*))
204 (fortran-to-lisp::integer4
)
205 (fortran-to-lisp::integer4
))
206 :return-values
'(nil nil nil nil fortran-to-lisp
::info nil
)
207 :calls
'(fortran-to-lisp::daxpy fortran-to-lisp
::idamax
))))