In documentation for lreduce and rreduce, supply second argument as an explicit list
[maxima.git] / share / odepack / src / dgefa.lisp
blob9d242ed4bf6fc2dd9ac53e2f42509462d5e8279e
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)
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 double-float))
17 (in-package "ODEPACK")
20 (defun dgefa (a lda n ipvt info)
21 (declare (type (array f2cl-lib:integer4 (*)) ipvt)
22 (type (f2cl-lib:integer4) 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) (kp1 0) (l 0) (nm1 0) (t$ 0.0))
28 (declare (type (double-float) t$)
29 (type (f2cl-lib:integer4) nm1 l kp1 k j))
30 (setf info 0)
31 (setf nm1 (f2cl-lib:int-sub n 1))
32 (if (< nm1 1) (go label70))
33 (f2cl-lib:fdo (k 1 (f2cl-lib:int-add k 1))
34 ((> k nm1) nil)
35 (tagbody
36 (setf kp1 (f2cl-lib:int-add k 1))
37 (setf l
38 (f2cl-lib:int-sub
39 (f2cl-lib:int-add
40 (idamax (f2cl-lib:int-add (f2cl-lib:int-sub n k) 1)
41 (f2cl-lib:array-slice a-%data%
42 double-float
43 (k k)
44 ((1 lda) (1 *))
45 a-%offset%)
48 1))
49 (setf (f2cl-lib:fref ipvt-%data% (k) ((1 *)) ipvt-%offset%) l)
50 (if (= (f2cl-lib:fref a-%data% (l k) ((1 lda) (1 *)) a-%offset%) 0.0)
51 (go label40))
52 (if (= l k) (go label10))
53 (setf t$ (f2cl-lib:fref a-%data% (l k) ((1 lda) (1 *)) a-%offset%))
54 (setf (f2cl-lib:fref a-%data% (l k) ((1 lda) (1 *)) a-%offset%)
55 (f2cl-lib:fref a-%data% (k k) ((1 lda) (1 *)) a-%offset%))
56 (setf (f2cl-lib:fref a-%data% (k k) ((1 lda) (1 *)) a-%offset%) t$)
57 label10
58 (setf t$
59 (/ -1.0
60 (f2cl-lib:fref a-%data%
61 (k k)
62 ((1 lda) (1 *))
63 a-%offset%)))
64 (dscal (f2cl-lib:int-sub n k) t$
65 (f2cl-lib:array-slice a-%data%
66 double-float
67 ((+ k 1) k)
68 ((1 lda) (1 *))
69 a-%offset%)
71 (f2cl-lib:fdo (j kp1 (f2cl-lib:int-add j 1))
72 ((> j n) nil)
73 (tagbody
74 (setf t$
75 (f2cl-lib:fref a-%data%
76 (l j)
77 ((1 lda) (1 *))
78 a-%offset%))
79 (if (= l k) (go label20))
80 (setf (f2cl-lib:fref a-%data% (l j) ((1 lda) (1 *)) a-%offset%)
81 (f2cl-lib:fref a-%data%
82 (k j)
83 ((1 lda) (1 *))
84 a-%offset%))
85 (setf (f2cl-lib:fref a-%data% (k j) ((1 lda) (1 *)) a-%offset%)
86 t$)
87 label20
88 (daxpy (f2cl-lib:int-sub n k) t$
89 (f2cl-lib:array-slice a-%data%
90 double-float
91 ((+ k 1) k)
92 ((1 lda) (1 *))
93 a-%offset%)
95 (f2cl-lib:array-slice a-%data%
96 double-float
97 ((+ k 1) j)
98 ((1 lda) (1 *))
99 a-%offset%)
101 label30))
102 (go label50)
103 label40
104 (setf info k)
105 label50
106 label60))
107 label70
108 (setf (f2cl-lib:fref ipvt-%data% (n) ((1 *)) ipvt-%offset%) n)
109 (if (= (f2cl-lib:fref a-%data% (n n) ((1 lda) (1 *)) a-%offset%) 0.0)
110 (setf info n))
111 (go end_label)
112 end_label
113 (return (values nil nil nil nil info)))))
115 (in-package #:cl-user)
116 #+#.(cl:if (cl:find-package '#:f2cl) '(and) '(or))
117 (eval-when (:load-toplevel :compile-toplevel :execute)
118 (setf (gethash 'fortran-to-lisp::dgefa fortran-to-lisp::*f2cl-function-info*)
119 (fortran-to-lisp::make-f2cl-finfo
120 :arg-types '((array double-float (*)) (fortran-to-lisp::integer4)
121 (fortran-to-lisp::integer4)
122 (array fortran-to-lisp::integer4 (*))
123 (fortran-to-lisp::integer4))
124 :return-values '(nil nil nil nil fortran-to-lisp::info)
125 :calls '(fortran-to-lisp::daxpy fortran-to-lisp::dscal
126 fortran-to-lisp::idamax))))