1 ;;; Compiled by f2cl version:
2 ;;; ("f2cl1.l,v 2edcbd958861 2012/05/30 03:34:52 toy $"
3 ;;; "f2cl2.l,v 96616d88fb7e 2008/02/22 22:19:34 rtoy $"
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 3fe93de3be82 2012/05/06 02:17:14 toy $"
7 ;;; "f2cl6.l,v 1d5cbacbb977 2008/08/24 00:56:27 rtoy $"
8 ;;; "macros.l,v 3fe93de3be82 2012/05/06 02:17:14 toy $")
10 ;;; Using Lisp CMU Common Lisp 20d (20D 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 (let* ((one 1.0) (zero 0.0))
21 (declare (type (double-float 1.0 1.0) one
)
22 (type (double-float 0.0 0.0) zero
)
24 (defun dgemv (trans m n alpha a lda x incx beta y incy
)
25 (declare (type (array double-float
(*)) y x a
)
26 (type (double-float) beta alpha
)
27 (type (f2cl-lib:integer4
) incy incx lda n m
)
28 (type (simple-string *) trans
))
29 (f2cl-lib:with-multi-array-data
30 ((trans character trans-%data% trans-%offset%
)
31 (a double-float a-%data% a-%offset%
)
32 (x double-float x-%data% x-%offset%
)
33 (y double-float y-%data% y-%offset%
))
34 (prog ((i 0) (info 0) (ix 0) (iy 0) (j 0) (jx 0) (jy 0) (kx 0) (ky 0)
35 (lenx 0) (leny 0) (temp 0.0))
36 (declare (type (f2cl-lib:integer4
) i info ix iy j jx jy kx ky lenx
38 (type (double-float) temp
))
41 ((and (not (lsame trans
"N"))
42 (not (lsame trans
"T"))
43 (not (lsame trans
"C")))
49 ((< lda
(max (the f2cl-lib
:integer4
1) (the f2cl-lib
:integer4 m
)))
57 (xerbla "DGEMV " info
)
59 (if (or (= m
0) (= n
0) (and (= alpha zero
) (= beta one
)))
75 (f2cl-lib:int-sub lenx
1)
84 (f2cl-lib:int-sub leny
1)
92 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
95 (setf (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
99 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
102 (setf (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
104 (f2cl-lib:fref y-%data%
113 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
116 (setf (f2cl-lib:fref y-%data%
(iy) ((1 *)) y-%offset%
)
118 (setf iy
(f2cl-lib:int-add iy incy
))
121 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
124 (setf (f2cl-lib:fref y-%data%
(iy) ((1 *)) y-%offset%
)
126 (f2cl-lib:fref y-%data%
130 (setf iy
(f2cl-lib:int-add iy incy
))
132 (if (= alpha zero
) (go end_label
))
138 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
142 ((/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
145 (f2cl-lib:fref x-%data%
149 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
152 (setf (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
154 (f2cl-lib:fref y-%data%
159 (f2cl-lib:fref a-%data%
164 (setf jx
(f2cl-lib:int-add jx incx
))
167 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
171 ((/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
174 (f2cl-lib:fref x-%data%
179 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
182 (setf (f2cl-lib:fref y-%data%
(iy) ((1 *)) y-%offset%
)
184 (f2cl-lib:fref y-%data%
189 (f2cl-lib:fref a-%data%
193 (setf iy
(f2cl-lib:int-add iy incy
))
195 (setf jx
(f2cl-lib:int-add jx incx
))
201 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
205 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
211 (f2cl-lib:fref a-%data%
215 (f2cl-lib:fref x-%data%
220 (setf (f2cl-lib:fref y-%data%
(jy) ((1 *)) y-%offset%
)
221 (+ (f2cl-lib:fref y-%data%
(jy) ((1 *)) y-%offset%
)
223 (setf jy
(f2cl-lib:int-add jy incy
))
226 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
231 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
237 (f2cl-lib:fref a-%data%
241 (f2cl-lib:fref x-%data%
245 (setf ix
(f2cl-lib:int-add ix incx
))
247 (setf (f2cl-lib:fref y-%data%
(jy) ((1 *)) y-%offset%
)
248 (+ (f2cl-lib:fref y-%data%
(jy) ((1 *)) y-%offset%
)
250 (setf jy
(f2cl-lib:int-add jy incy
))
254 (return (values nil nil nil nil nil nil nil nil nil nil nil
))))))
256 (in-package #:cl-user
)
257 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
258 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
259 (setf (gethash 'fortran-to-lisp
::dgemv fortran-to-lisp
::*f2cl-function-info
*)
260 (fortran-to-lisp::make-f2cl-finfo
261 :arg-types
'((simple-string) (fortran-to-lisp::integer4
)
262 (fortran-to-lisp::integer4
) (double-float)
263 (array double-float
(*)) (fortran-to-lisp::integer4
)
264 (array double-float
(*)) (fortran-to-lisp::integer4
)
265 (double-float) (array double-float
(*))
266 (fortran-to-lisp::integer4
))
267 :return-values
'(nil nil nil nil nil nil nil nil nil nil nil
)
268 :calls
'(fortran-to-lisp::xerbla fortran-to-lisp
::lsame
))))