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 dorthog (vnew v hes n ll ldhes kmp snormw
)
21 (declare (type (double-float) snormw
)
22 (type (f2cl-lib:integer4
) kmp ldhes ll n
)
23 (type (array double-float
(*)) hes v vnew
))
24 (f2cl-lib:with-multi-array-data
25 ((vnew double-float vnew-%data% vnew-%offset%
)
26 (v double-float v-%data% v-%offset%
)
27 (hes double-float hes-%data% hes-%offset%
))
28 (prog ((arg 0.0d0
) (sumdsq 0.0d0
) (tem 0.0d0
) (vnrm 0.0d0
) (i 0) (i0 0))
29 (declare (type (f2cl-lib:integer4
) i0 i
)
30 (type (double-float) vnrm tem sumdsq arg
))
31 (setf vnrm
(dnrm2 n vnew
1))
33 (max (the f2cl-lib
:integer4
1)
34 (the f2cl-lib
:integer4
35 (f2cl-lib:int-add
(f2cl-lib:int-sub ll kmp
) 1))))
36 (f2cl-lib:fdo
(i i0
(f2cl-lib:int-add i
1))
39 (setf (f2cl-lib:fref hes-%data%
44 (f2cl-lib:array-slice v-%data%
52 (f2cl-lib:fref hes-%data%
57 (f2cl-lib:array-slice v-%data%
64 (setf snormw
(dnrm2 n vnew
1))
65 (if (/= (+ vnrm
(* 0.001d0 snormw
)) vnrm
) (go end_label
))
67 (f2cl-lib:fdo
(i i0
(f2cl-lib:int-add i
1))
73 (f2cl-lib:array-slice v-%data%
81 (+ (f2cl-lib:fref hes-%data%
(i ll
) ((1 ldhes
) (1 *)) hes-%offset%
)
83 (f2cl-lib:fref hes-%data%
(i ll
) ((1 ldhes
) (1 *)) hes-%offset%
))
85 (setf (f2cl-lib:fref hes-%data%
90 (f2cl-lib:fref hes-%data%
96 (f2cl-lib:array-slice v-%data%
102 (setf sumdsq
(+ sumdsq
(expt tem
2)))
104 (if (= sumdsq
0.0d0
) (go end_label
))
105 (setf arg
(max 0.0d0
(- (expt snormw
2) sumdsq
)))
106 (setf snormw
(f2cl-lib:fsqrt arg
))
109 (return (values nil nil nil nil nil nil nil snormw
)))))
111 (in-package #:cl-user
)
112 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
113 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
114 (setf (gethash 'fortran-to-lisp
::dorthog
115 fortran-to-lisp
::*f2cl-function-info
*)
116 (fortran-to-lisp::make-f2cl-finfo
117 :arg-types
'((array double-float
(*)) (array double-float
(*))
118 (array double-float
(*)) (fortran-to-lisp::integer4
)
119 (fortran-to-lisp::integer4
) (fortran-to-lisp::integer4
)
120 (fortran-to-lisp::integer4
) (double-float))
121 :return-values
'(nil nil nil nil nil nil nil
122 fortran-to-lisp
::snormw
)
123 :calls
'(fortran-to-lisp::daxpy fortran-to-lisp
::ddot
124 fortran-to-lisp
::dnrm2
))))