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))
21 (declare (type (double-float 0.0 0.0) zero
) (ignorable zero
))
22 (defun dtpmv (uplo trans diag n ap x incx
)
23 (declare (type (array double-float
(*)) x ap
)
24 (type (f2cl-lib:integer4
) incx n
)
25 (type (simple-string *) diag trans uplo
))
26 (f2cl-lib:with-multi-array-data
27 ((uplo character uplo-%data% uplo-%offset%
)
28 (trans character trans-%data% trans-%offset%
)
29 (diag character diag-%data% diag-%offset%
)
30 (ap double-float ap-%data% ap-%offset%
)
31 (x double-float x-%data% x-%offset%
))
32 (prog ((nounit nil
) (i 0) (info 0) (ix 0) (j 0) (jx 0) (k 0) (kk 0)
34 (declare (type f2cl-lib
:logical nounit
)
35 (type (f2cl-lib:integer4
) i info ix j jx k kk kx
)
36 (type (double-float) temp
))
39 ((and (not (lsame uplo
"U")) (not (lsame uplo
"L")))
41 ((and (not (lsame trans
"N"))
42 (not (lsame trans
"T"))
43 (not (lsame trans
"C")))
45 ((and (not (lsame diag
"U")) (not (lsame diag
"N")))
53 (xerbla "DTPMV " info
)
55 (if (= n
0) (go end_label
))
56 (setf nounit
(lsame diag
"N"))
61 (f2cl-lib:int-mul
(f2cl-lib:int-sub n
1)
72 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
76 ((/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
78 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
80 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
87 (setf (f2cl-lib:fref x-%data%
92 (f2cl-lib:fref x-%data%
97 (f2cl-lib:fref ap-%data%
101 (setf k
(f2cl-lib:int-add k
1))
104 (setf (f2cl-lib:fref x-%data%
109 (f2cl-lib:fref x-%data%
113 (f2cl-lib:fref ap-%data%
115 (f2cl-lib:int-add kk j
)
119 (setf kk
(f2cl-lib:int-add kk j
))
123 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
127 ((/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
129 (f2cl-lib:fref x-%data%
134 (f2cl-lib:fdo
(k kk
(f2cl-lib:int-add k
1))
142 (setf (f2cl-lib:fref x-%data%
147 (f2cl-lib:fref x-%data%
152 (f2cl-lib:fref ap-%data%
156 (setf ix
(f2cl-lib:int-add ix incx
))
159 (setf (f2cl-lib:fref x-%data%
164 (f2cl-lib:fref x-%data%
168 (f2cl-lib:fref ap-%data%
170 (f2cl-lib:int-add kk j
)
174 (setf jx
(f2cl-lib:int-add jx incx
))
175 (setf kk
(f2cl-lib:int-add kk j
))
178 (setf kk
(the f2cl-lib
:integer4
(truncate (* n
(+ n
1)) 2)))
181 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
185 ((/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
187 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
191 (f2cl-lib:int-sub
1)))
192 ((> i
(f2cl-lib:int-add j
1)) nil
)
194 (setf (f2cl-lib:fref x-%data%
199 (f2cl-lib:fref x-%data%
204 (f2cl-lib:fref ap-%data%
208 (setf k
(f2cl-lib:int-sub k
1))
211 (setf (f2cl-lib:fref x-%data%
216 (f2cl-lib:fref x-%data%
220 (f2cl-lib:fref ap-%data%
222 (f2cl-lib:int-sub kk n
)
229 (f2cl-lib:int-sub n j
)
236 (f2cl-lib:int-sub n
1)
239 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
243 ((/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
245 (f2cl-lib:fref x-%data%
252 (f2cl-lib:int-sub
1)))
264 (setf (f2cl-lib:fref x-%data%
269 (f2cl-lib:fref x-%data%
274 (f2cl-lib:fref ap-%data%
278 (setf ix
(f2cl-lib:int-sub ix incx
))
281 (setf (f2cl-lib:fref x-%data%
286 (f2cl-lib:fref x-%data%
290 (f2cl-lib:fref ap-%data%
292 (f2cl-lib:int-sub kk n
)
296 (setf jx
(f2cl-lib:int-sub jx incx
))
300 (f2cl-lib:int-sub n j
)
306 (setf kk
(the f2cl-lib
:integer4
(truncate (* n
(+ n
1)) 2)))
309 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
313 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
317 (f2cl-lib:fref ap-%data%
321 (setf k
(f2cl-lib:int-sub kk
1))
322 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
(f2cl-lib:int-sub
1))
323 (f2cl-lib:int-add i
(f2cl-lib:int-sub
1)))
329 (f2cl-lib:fref ap-%data%
333 (f2cl-lib:fref x-%data%
337 (setf k
(f2cl-lib:int-sub k
1))
339 (setf (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
)
341 (setf kk
(f2cl-lib:int-sub kk j
))
347 (f2cl-lib:int-sub n
1)
349 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
353 (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
))
358 (f2cl-lib:fref ap-%data%
363 (f2cl-lib:int-add kk
(f2cl-lib:int-sub
1))
364 (f2cl-lib:int-add k
(f2cl-lib:int-sub
1)))
371 (setf ix
(f2cl-lib:int-sub ix incx
))
375 (f2cl-lib:fref ap-%data%
379 (f2cl-lib:fref x-%data%
384 (setf (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
)
386 (setf jx
(f2cl-lib:int-sub jx incx
))
387 (setf kk
(f2cl-lib:int-sub kk j
))
393 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
397 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
401 (f2cl-lib:fref ap-%data%
405 (setf k
(f2cl-lib:int-add kk
1))
406 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
407 (f2cl-lib:int-add i
1))
413 (f2cl-lib:fref ap-%data%
417 (f2cl-lib:fref x-%data%
421 (setf k
(f2cl-lib:int-add k
1))
423 (setf (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
)
428 (f2cl-lib:int-sub n j
)
433 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
437 (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
))
442 (f2cl-lib:fref ap-%data%
446 (f2cl-lib:fdo
(k (f2cl-lib:int-add kk
1)
447 (f2cl-lib:int-add k
1))
451 (f2cl-lib:int-sub j
)))
454 (setf ix
(f2cl-lib:int-add ix incx
))
458 (f2cl-lib:fref ap-%data%
462 (f2cl-lib:fref x-%data%
467 (setf (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
)
469 (setf jx
(f2cl-lib:int-add jx incx
))
473 (f2cl-lib:int-sub n j
)
478 (return (values nil nil nil nil nil nil nil
))))))
480 (in-package #-gcl
#:cl-user
#+gcl
"CL-USER")
481 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
482 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
483 (setf (gethash 'fortran-to-lisp
::dtpmv fortran-to-lisp
::*f2cl-function-info
*)
484 (fortran-to-lisp::make-f2cl-finfo
485 :arg-types
'((simple-string) (simple-string) (simple-string)
486 (fortran-to-lisp::integer4
) (array double-float
(*))
487 (array double-float
(*)) (fortran-to-lisp::integer4
))
488 :return-values
'(nil nil nil nil nil nil nil
)
489 :calls
'(fortran-to-lisp::xerbla fortran-to-lisp
::lsame
))))