In documentation for lreduce and rreduce, supply second argument as an explicit list
[maxima.git] / share / odepack / src / nroc.lisp
blob0f9e1e6177f203bb11c391918f77fd1a483bec14
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 nroc (n ic ia ja a jar ar p flag)
21 (declare (type (array double-float (*)) ar a)
22 (type (array f2cl-lib:integer4 (*)) p jar ja ia ic)
23 (type (f2cl-lib:integer4) flag n))
24 (f2cl-lib:with-multi-array-data
25 ((ic f2cl-lib:integer4 ic-%data% ic-%offset%)
26 (ia f2cl-lib:integer4 ia-%data% ia-%offset%)
27 (ja f2cl-lib:integer4 ja-%data% ja-%offset%)
28 (jar f2cl-lib:integer4 jar-%data% jar-%offset%)
29 (p f2cl-lib:integer4 p-%data% p-%offset%)
30 (a double-float a-%data% a-%offset%)
31 (ar double-float ar-%data% ar-%offset%))
32 (prog ((i 0) (newj 0) (j 0) (jmax 0) (jmin 0) (k 0))
33 (declare (type (f2cl-lib:integer4) k jmin jmax j newj i))
34 (f2cl-lib:fdo (k 1 (f2cl-lib:int-add k 1))
35 ((> k n) nil)
36 (tagbody
37 (setf jmin (f2cl-lib:fref ia-%data% (k) ((1 *)) ia-%offset%))
38 (setf jmax
39 (f2cl-lib:int-sub
40 (f2cl-lib:fref ia-%data%
41 ((f2cl-lib:int-add k 1))
42 ((1 *))
43 ia-%offset%)
44 1))
45 (if (> jmin jmax) (go label5))
46 (setf (f2cl-lib:fref p-%data%
47 ((f2cl-lib:int-add n 1))
48 ((1 *))
49 p-%offset%)
50 (f2cl-lib:int-add n 1))
51 (f2cl-lib:fdo (j jmin (f2cl-lib:int-add j 1))
52 ((> j jmax) nil)
53 (tagbody
54 (setf newj
55 (f2cl-lib:fref ic-%data%
56 ((f2cl-lib:fref ja (j) ((1 *))))
57 ((1 *))
58 ic-%offset%))
59 (setf i (f2cl-lib:int-add n 1))
60 label1
61 (if (>= (f2cl-lib:fref p-%data% (i) ((1 *)) p-%offset%) newj)
62 (go label2))
63 (setf i (f2cl-lib:fref p-%data% (i) ((1 *)) p-%offset%))
64 (go label1)
65 label2
66 (if (= (f2cl-lib:fref p-%data% (i) ((1 *)) p-%offset%) newj)
67 (go label102))
68 (setf (f2cl-lib:fref p-%data% (newj) ((1 *)) p-%offset%)
69 (f2cl-lib:fref p-%data% (i) ((1 *)) p-%offset%))
70 (setf (f2cl-lib:fref p-%data% (i) ((1 *)) p-%offset%) newj)
71 (setf (f2cl-lib:fref jar-%data% (newj) ((1 *)) jar-%offset%)
72 (f2cl-lib:fref ja-%data% (j) ((1 *)) ja-%offset%))
73 (setf (f2cl-lib:fref ar-%data% (newj) ((1 *)) ar-%offset%)
74 (f2cl-lib:fref a-%data% (j) ((1 *)) a-%offset%))
75 label3))
76 (setf i (f2cl-lib:int-add n 1))
77 (f2cl-lib:fdo (j jmin (f2cl-lib:int-add j 1))
78 ((> j jmax) nil)
79 (tagbody
80 (setf i (f2cl-lib:fref p-%data% (i) ((1 *)) p-%offset%))
81 (setf (f2cl-lib:fref ja-%data% (j) ((1 *)) ja-%offset%)
82 (f2cl-lib:fref jar-%data% (i) ((1 *)) jar-%offset%))
83 label4
84 (setf (f2cl-lib:fref a-%data% (j) ((1 *)) a-%offset%)
85 (f2cl-lib:fref ar-%data% (i) ((1 *)) ar-%offset%))))
86 label5))
87 (setf flag 0)
88 (go end_label)
89 label102
90 (setf flag (f2cl-lib:int-add n k))
91 (go end_label)
92 end_label
93 (return (values nil nil nil nil nil nil nil nil flag)))))
95 (in-package #:cl-user)
96 #+#.(cl:if (cl:find-package '#:f2cl) '(and) '(or))
97 (eval-when (:load-toplevel :compile-toplevel :execute)
98 (setf (gethash 'fortran-to-lisp::nroc fortran-to-lisp::*f2cl-function-info*)
99 (fortran-to-lisp::make-f2cl-finfo
100 :arg-types '((fortran-to-lisp::integer4)
101 (array fortran-to-lisp::integer4 (*))
102 (array fortran-to-lisp::integer4 (*))
103 (array fortran-to-lisp::integer4 (*))
104 (array double-float (*))
105 (array fortran-to-lisp::integer4 (*))
106 (array double-float (*))
107 (array fortran-to-lisp::integer4 (*))
108 (fortran-to-lisp::integer4))
109 :return-values '(nil nil nil nil nil nil nil nil
110 fortran-to-lisp::flag)
111 :calls 'nil)))