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-2017-01 (21B 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 double-float))
17 (in-package "ODEPACK")
20 (defun dgesl (a lda n ipvt b job
)
21 (declare (type (array f2cl-lib
:integer4
(*)) ipvt
)
22 (type (f2cl-lib:integer4
) job n lda
)
23 (type (array double-float
(*)) b a
))
24 (f2cl-lib:with-multi-array-data
25 ((a double-float a-%data% a-%offset%
)
26 (b double-float b-%data% b-%offset%
)
27 (ipvt f2cl-lib
:integer4 ipvt-%data% ipvt-%offset%
))
28 (prog ((k 0) (kb 0) (l 0) (nm1 0) (t$
0.0))
29 (declare (type (double-float) t$
) (type (f2cl-lib:integer4
) nm1 l kb k
))
30 (setf nm1
(f2cl-lib:int-sub n
1))
31 (if (/= job
0) (go label50
))
32 (if (< nm1
1) (go label30
))
33 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
36 (setf l
(f2cl-lib:fref ipvt-%data%
(k) ((1 *)) ipvt-%offset%
))
37 (setf t$
(f2cl-lib:fref b-%data%
(l) ((1 *)) b-%offset%
))
38 (if (= l k
) (go label10
))
39 (setf (f2cl-lib:fref b-%data%
(l) ((1 *)) b-%offset%
)
40 (f2cl-lib:fref b-%data%
(k) ((1 *)) b-%offset%
))
41 (setf (f2cl-lib:fref b-%data%
(k) ((1 *)) b-%offset%
) t$
)
43 (daxpy (f2cl-lib:int-sub n k
) t$
44 (f2cl-lib:array-slice a-%data%
50 (f2cl-lib:array-slice b-%data%
58 (f2cl-lib:fdo
(kb 1 (f2cl-lib:int-add kb
1))
61 (setf k
(f2cl-lib:int-sub
(f2cl-lib:int-add n
1) kb
))
62 (setf (f2cl-lib:fref b-%data%
(k) ((1 *)) b-%offset%
)
63 (/ (f2cl-lib:fref b-%data%
(k) ((1 *)) b-%offset%
)
64 (f2cl-lib:fref a-%data%
68 (setf t$
(- (f2cl-lib:fref b-%data%
(k) ((1 *)) b-%offset%
)))
69 (daxpy (f2cl-lib:int-sub k
1) t$
70 (f2cl-lib:array-slice a-%data%
76 (f2cl-lib:array-slice b-%data% double-float
(1) ((1 *)) b-%offset%
)
81 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
85 (ddot (f2cl-lib:int-sub k
1)
86 (f2cl-lib:array-slice a-%data%
92 (f2cl-lib:array-slice b-%data%
98 (setf (f2cl-lib:fref b-%data%
(k) ((1 *)) b-%offset%
)
99 (/ (- (f2cl-lib:fref b-%data%
(k) ((1 *)) b-%offset%
) t$
)
100 (f2cl-lib:fref a-%data%
105 (if (< nm1
1) (go label90
))
106 (f2cl-lib:fdo
(kb 1 (f2cl-lib:int-add kb
1))
109 (setf k
(f2cl-lib:int-sub n kb
))
110 (setf (f2cl-lib:fref b-%data%
(k) ((1 *)) b-%offset%
)
111 (+ (f2cl-lib:fref b-%data%
(k) ((1 *)) b-%offset%
)
112 (ddot (f2cl-lib:int-sub n k
)
113 (f2cl-lib:array-slice a-%data%
119 (f2cl-lib:array-slice b-%data%
125 (setf l
(f2cl-lib:fref ipvt-%data%
(k) ((1 *)) ipvt-%offset%
))
126 (if (= l k
) (go label70
))
127 (setf t$
(f2cl-lib:fref b-%data%
(l) ((1 *)) b-%offset%
))
128 (setf (f2cl-lib:fref b-%data%
(l) ((1 *)) b-%offset%
)
129 (f2cl-lib:fref b-%data%
(k) ((1 *)) b-%offset%
))
130 (setf (f2cl-lib:fref b-%data%
(k) ((1 *)) b-%offset%
) t$
)
137 (return (values nil nil nil nil nil nil
)))))
139 (in-package #:cl-user
)
140 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
141 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
142 (setf (gethash 'fortran-to-lisp
::dgesl fortran-to-lisp
::*f2cl-function-info
*)
143 (fortran-to-lisp::make-f2cl-finfo
144 :arg-types
'((array double-float
(*)) (fortran-to-lisp::integer4
)
145 (fortran-to-lisp::integer4
)
146 (array fortran-to-lisp
::integer4
(*))
147 (array double-float
(*)) (fortran-to-lisp::integer4
))
148 :return-values
'(nil nil nil nil nil nil
)
149 :calls
'(fortran-to-lisp::ddot fortran-to-lisp
::daxpy
))))