In documentation for lreduce and rreduce, supply second argument as an explicit list
[maxima.git] / share / odepack / src / odrv.lisp
blob5ef2f3fe4eeb374578e3adfa1f28287177f1c50d
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)
11 ;;;
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 odrv (n ia ja a p ip nsp isp path flag)
21 (declare (type (array double-float (*)) a)
22 (type (array f2cl-lib:integer4 (*)) isp ip p ja ia)
23 (type (f2cl-lib:integer4) flag path nsp n))
24 (f2cl-lib:with-multi-array-data
25 ((ia f2cl-lib:integer4 ia-%data% ia-%offset%)
26 (ja f2cl-lib:integer4 ja-%data% ja-%offset%)
27 (p f2cl-lib:integer4 p-%data% p-%offset%)
28 (ip f2cl-lib:integer4 ip-%data% ip-%offset%)
29 (isp f2cl-lib:integer4 isp-%data% isp-%offset%)
30 (a double-float a-%data% a-%offset%))
31 (prog ((dflag nil) (v 0) (l 0) (head 0) (tmp 0) (q 0) (next 0)
32 (max (the f2cl-lib:integer4 0)))
33 (declare (type (f2cl-lib:integer4) max next q tmp head l v)
34 (type f2cl-lib:logical dflag))
35 (setf flag 0)
36 (if (or (< path 1) (< 5 path)) (go label111))
37 (if
38 (/=
39 (f2cl-lib:int-mul (f2cl-lib:int-sub path 1)
40 (f2cl-lib:int-sub path 2)
41 (f2cl-lib:int-sub path 4))
43 (go label1))
44 (setf max (the f2cl-lib:integer4 (truncate (- nsp n) 2)))
45 (setf v 1)
46 (setf l (f2cl-lib:int-add v max))
47 (setf head (f2cl-lib:int-add l max))
48 (setf next (f2cl-lib:int-add head n))
49 (if (< max n) (go label110))
50 (multiple-value-bind
51 (var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7 var-8 var-9
52 var-10)
53 (md n ia ja max
54 (f2cl-lib:array-slice isp-%data%
55 f2cl-lib:integer4
56 (v)
57 ((1 *))
58 isp-%offset%)
59 (f2cl-lib:array-slice isp-%data%
60 f2cl-lib:integer4
61 (l)
62 ((1 *))
63 isp-%offset%)
64 (f2cl-lib:array-slice isp-%data%
65 f2cl-lib:integer4
66 (head)
67 ((1 *))
68 isp-%offset%)
69 p ip
70 (f2cl-lib:array-slice isp-%data%
71 f2cl-lib:integer4
72 (v)
73 ((1 *))
74 isp-%offset%)
75 flag)
76 (declare (ignore var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7 var-8
77 var-9))
78 (setf flag var-10))
79 (if (/= flag 0) (go label100))
80 label1
81 (if
82 (/=
83 (f2cl-lib:int-mul (f2cl-lib:int-sub path 2)
84 (f2cl-lib:int-sub path 3)
85 (f2cl-lib:int-sub path 4)
86 (f2cl-lib:int-sub path 5))
88 (go label2))
89 (setf tmp (f2cl-lib:int-sub (f2cl-lib:int-add nsp 1) n))
90 (setf q
91 (f2cl-lib:int-sub tmp
92 (f2cl-lib:int-sub
93 (f2cl-lib:fref ia-%data%
94 ((f2cl-lib:int-add n 1))
95 ((1 *))
96 ia-%offset%)
97 1)))
98 (if (< q 1) (go label110))
99 (setf dflag (or (= path 4) (= path 5)))
100 (sro n ip ia ja a
101 (f2cl-lib:array-slice isp-%data%
102 f2cl-lib:integer4
103 (tmp)
104 ((1 *))
105 isp-%offset%)
106 (f2cl-lib:array-slice isp-%data%
107 f2cl-lib:integer4
109 ((1 *))
110 isp-%offset%)
111 dflag)
112 label2
113 (go end_label)
114 label100
115 (go end_label)
116 label110
117 (setf flag (f2cl-lib:int-add (f2cl-lib:int-mul 10 n) 1))
118 (go end_label)
119 label111
120 (setf flag (f2cl-lib:int-add (f2cl-lib:int-mul 11 n) 1))
121 (go end_label)
122 end_label
123 (return (values nil nil nil nil nil nil nil nil nil flag)))))
125 (in-package #:cl-user)
126 #+#.(cl:if (cl:find-package '#:f2cl) '(and) '(or))
127 (eval-when (:load-toplevel :compile-toplevel :execute)
128 (setf (gethash 'fortran-to-lisp::odrv fortran-to-lisp::*f2cl-function-info*)
129 (fortran-to-lisp::make-f2cl-finfo
130 :arg-types '((fortran-to-lisp::integer4)
131 (array fortran-to-lisp::integer4 (*))
132 (array fortran-to-lisp::integer4 (*))
133 (array double-float (*))
134 (array fortran-to-lisp::integer4 (*))
135 (array fortran-to-lisp::integer4 (*))
136 (fortran-to-lisp::integer4)
137 (array fortran-to-lisp::integer4 (*))
138 (fortran-to-lisp::integer4)
139 (fortran-to-lisp::integer4))
140 :return-values '(nil nil nil nil nil nil nil nil nil
141 fortran-to-lisp::flag)
142 :calls '(fortran-to-lisp::sro fortran-to-lisp::md))))