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 dspmv (uplo n alpha ap x incx beta y incy
)
25 (declare (type (array double-float
(*)) y x ap
)
26 (type (double-float) beta alpha
)
27 (type (f2cl-lib:integer4
) incy incx n
)
28 (type (simple-string *) uplo
))
29 (f2cl-lib:with-multi-array-data
30 ((uplo character uplo-%data% uplo-%offset%
)
31 (ap double-float ap-%data% ap-%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) (k 0) (kk 0)
35 (kx 0) (ky 0) (temp1 0.0) (temp2 0.0))
36 (declare (type (f2cl-lib:integer4
) i info ix iy j jx jy k kk kx ky
)
37 (type (double-float) temp1 temp2
))
40 ((and (not (lsame uplo
"U")) (not (lsame uplo
"L")))
50 (xerbla "DSPMV " info
)
52 (if (or (= n
0) (and (= alpha zero
) (= beta one
))) (go end_label
))
59 (f2cl-lib:int-mul
(f2cl-lib:int-sub n
1)
67 (f2cl-lib:int-mul
(f2cl-lib:int-sub n
1)
75 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
78 (setf (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
82 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
85 (setf (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
87 (f2cl-lib:fref y-%data%
96 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
99 (setf (f2cl-lib:fref y-%data%
(iy) ((1 *)) y-%offset%
)
101 (setf iy
(f2cl-lib:int-add iy incy
))
104 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
107 (setf (f2cl-lib:fref y-%data%
(iy) ((1 *)) y-%offset%
)
109 (f2cl-lib:fref y-%data%
113 (setf iy
(f2cl-lib:int-add iy incy
))
115 (if (= alpha zero
) (go end_label
))
120 ((and (= incx
1) (= incy
1))
121 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
126 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
)))
129 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
131 (f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
134 (setf (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
136 (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
138 (f2cl-lib:fref ap-%data%
145 (f2cl-lib:fref ap-%data%
149 (f2cl-lib:fref x-%data%
153 (setf k
(f2cl-lib:int-add k
1))
155 (setf (f2cl-lib:fref y-%data%
(j) ((1 *)) y-%offset%
)
156 (+ (f2cl-lib:fref y-%data%
(j) ((1 *)) y-%offset%
)
158 (f2cl-lib:fref ap-%data%
160 (f2cl-lib:int-add kk j
)
165 (setf kk
(f2cl-lib:int-add kk j
))
170 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
175 (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
)))
179 (f2cl-lib:fdo
(k kk
(f2cl-lib:int-add k
1))
183 (f2cl-lib:int-sub
2)))
186 (setf (f2cl-lib:fref y-%data%
(iy) ((1 *)) y-%offset%
)
188 (f2cl-lib:fref y-%data%
(iy) ((1 *)) y-%offset%
)
190 (f2cl-lib:fref ap-%data%
197 (f2cl-lib:fref ap-%data%
201 (f2cl-lib:fref x-%data%
205 (setf ix
(f2cl-lib:int-add ix incx
))
206 (setf iy
(f2cl-lib:int-add iy incy
))
208 (setf (f2cl-lib:fref y-%data%
(jy) ((1 *)) y-%offset%
)
209 (+ (f2cl-lib:fref y-%data%
(jy) ((1 *)) y-%offset%
)
211 (f2cl-lib:fref ap-%data%
213 (f2cl-lib:int-add kk j
)
218 (setf jx
(f2cl-lib:int-add jx incx
))
219 (setf jy
(f2cl-lib:int-add jy incy
))
220 (setf kk
(f2cl-lib:int-add kk j
))
224 ((and (= incx
1) (= incy
1))
225 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
230 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
)))
232 (setf (f2cl-lib:fref y-%data%
(j) ((1 *)) y-%offset%
)
233 (+ (f2cl-lib:fref y-%data%
(j) ((1 *)) y-%offset%
)
235 (f2cl-lib:fref ap-%data%
239 (setf k
(f2cl-lib:int-add kk
1))
240 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
241 (f2cl-lib:int-add i
1))
244 (setf (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
246 (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
248 (f2cl-lib:fref ap-%data%
255 (f2cl-lib:fref ap-%data%
259 (f2cl-lib:fref x-%data%
263 (setf k
(f2cl-lib:int-add k
1))
265 (setf (f2cl-lib:fref y-%data%
(j) ((1 *)) y-%offset%
)
266 (+ (f2cl-lib:fref y-%data%
(j) ((1 *)) y-%offset%
)
271 (f2cl-lib:int-sub n j
)
277 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
282 (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
)))
284 (setf (f2cl-lib:fref y-%data%
(jy) ((1 *)) y-%offset%
)
285 (+ (f2cl-lib:fref y-%data%
(jy) ((1 *)) y-%offset%
)
287 (f2cl-lib:fref ap-%data%
293 (f2cl-lib:fdo
(k (f2cl-lib:int-add kk
1)
294 (f2cl-lib:int-add k
1))
298 (f2cl-lib:int-sub j
)))
301 (setf ix
(f2cl-lib:int-add ix incx
))
302 (setf iy
(f2cl-lib:int-add iy incy
))
303 (setf (f2cl-lib:fref y-%data%
(iy) ((1 *)) y-%offset%
)
305 (f2cl-lib:fref y-%data%
(iy) ((1 *)) y-%offset%
)
307 (f2cl-lib:fref ap-%data%
314 (f2cl-lib:fref ap-%data%
318 (f2cl-lib:fref x-%data%
323 (setf (f2cl-lib:fref y-%data%
(jy) ((1 *)) y-%offset%
)
324 (+ (f2cl-lib:fref y-%data%
(jy) ((1 *)) y-%offset%
)
326 (setf jx
(f2cl-lib:int-add jx incx
))
327 (setf jy
(f2cl-lib:int-add jy incy
))
331 (f2cl-lib:int-sub n j
)
336 (return (values nil nil nil nil nil nil nil nil nil
))))))
338 (in-package #:cl-user
)
339 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
340 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
341 (setf (gethash 'fortran-to-lisp
::dspmv fortran-to-lisp
::*f2cl-function-info
*)
342 (fortran-to-lisp::make-f2cl-finfo
343 :arg-types
'((simple-string) (fortran-to-lisp::integer4
)
344 (double-float) (array double-float
(*))
345 (array double-float
(*)) (fortran-to-lisp::integer4
)
346 (double-float) (array double-float
(*))
347 (fortran-to-lisp::integer4
))
348 :return-values
'(nil nil nil nil nil nil nil nil nil
)
349 :calls
'(fortran-to-lisp::xerbla fortran-to-lisp
::lsame
))))