1 ;;; Compiled by f2cl version:
2 ;;; ("f2cl1.l,v 1.221 2010/05/26 19:25:52 rtoy Exp $"
3 ;;; "f2cl2.l,v 1.37 2008/02/22 22:19:33 rtoy Exp $"
4 ;;; "f2cl3.l,v 1.6 2008/02/22 22:19:33 rtoy Exp $"
5 ;;; "f2cl4.l,v 1.7 2008/02/22 22:19:34 rtoy Exp $"
6 ;;; "f2cl5.l,v 1.204 2010/02/23 05:21:30 rtoy Exp $"
7 ;;; "f2cl6.l,v 1.48 2008/08/24 00:56:27 rtoy Exp $"
8 ;;; "macros.l,v 1.114 2010/05/17 01:42:14 rtoy Exp $")
10 ;;; Using Lisp CMU Common Lisp CVS Head 2010-05-25 18:21:07 (20A 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))
20 (defun gderiv (gi nrow irow zval dgz mode dgsub
)
21 (declare (type (array double-float
(*)) dgz zval
)
22 (type (f2cl-lib:integer4
) mode irow nrow
)
23 (type (array double-float
(*)) gi
))
25 (symbol-macrolet ((mstar (aref (colord-part-0 *colord-common-block
*) 2))
26 (izeta (aref (colsid-part-1 *colsid-common-block
*) 0))
27 (nonlin (aref (colnln-part-0 *colnln-common-block
*) 0))
28 (iter (aref (colnln-part-0 *colnln-common-block
*) 1)))
29 (f2cl-lib:with-multi-array-data
30 ((gi double-float gi-%data% gi-%offset%
)
31 (zval double-float zval-%data% zval-%offset%
)
32 (dgz double-float dgz-%data% dgz-%offset%
))
33 (prog ((dot 0.0) (j 0)
34 (dg (make-array 40 :element-type
'double-float
)))
35 (declare (type (array double-float
(40)) dg
)
36 (type (f2cl-lib:integer4
) j
)
37 (type double-float dot
))
38 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
40 (tagbody label10
(setf (f2cl-lib:fref dg
(j) ((1 40))) 0.0)))
41 (multiple-value-bind (var-0 var-1 var-2
)
42 (funcall dgsub izeta zval dg
)
43 (declare (ignore var-1 var-2
))
46 (if (or (= nonlin
0) (> iter
0)) (go label30
))
48 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
54 (* (f2cl-lib:fref dg
(j) ((1 40)))
55 (f2cl-lib:fref zval-%data%
59 (setf (f2cl-lib:fref dgz-%data%
(izeta) ((1 1)) dgz-%offset%
) dot
)
61 (if (= mode
2) (go label50
))
62 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
65 (setf (f2cl-lib:fref gi-%data%
69 (f2cl-lib:fref dg
(j) ((1 40))))
71 (setf (f2cl-lib:fref gi-%data%
72 (irow (f2cl-lib:int-add mstar j
))
78 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
81 (setf (f2cl-lib:fref gi-%data%
87 (setf (f2cl-lib:fref gi-%data%
88 (irow (f2cl-lib:int-add mstar j
))
91 (f2cl-lib:fref dg
(j) ((1 40))))))
94 (return (values nil nil nil nil nil nil nil
)))))))
96 (in-package #-gcl
#:cl-user
#+gcl
"CL-USER")
97 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
98 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
99 (setf (gethash 'fortran-to-lisp
::gderiv
100 fortran-to-lisp
::*f2cl-function-info
*)
101 (fortran-to-lisp::make-f2cl-finfo
102 :arg-types
'((array double-float
(*)) (fortran-to-lisp::integer4
)
103 (fortran-to-lisp::integer4
) (array double-float
(1))
104 (array double-float
(1)) (fortran-to-lisp::integer4
) t
)
105 :return-values
'(nil nil nil nil nil nil nil
)