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 dtbmv (uplo trans diag n k a lda x incx
)
23 (declare (type (array double-float
(*)) x a
)
24 (type (f2cl-lib:integer4
) incx lda k 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 (a double-float a-%data% a-%offset%
)
31 (x double-float x-%data% x-%offset%
))
32 (prog ((nounit nil
) (i 0) (info 0) (ix 0) (j 0) (jx 0) (kplus1 0) (kx 0)
34 (declare (type f2cl-lib
:logical nounit
)
35 (type (f2cl-lib:integer4
) i info ix j jx kplus1 kx l
)
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")))
51 ((< lda
(f2cl-lib:int-add k
1))
57 (xerbla "DTBMV " info
)
59 (if (= n
0) (go end_label
))
60 (setf nounit
(lsame diag
"N"))
65 (f2cl-lib:int-mul
(f2cl-lib:int-sub n
1)
73 (setf kplus1
(f2cl-lib:int-add k
1))
76 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
80 ((/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
82 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
83 (setf l
(f2cl-lib:int-sub kplus1 j
))
85 (max (the f2cl-lib
:integer4
1)
86 (the f2cl-lib
:integer4
90 (f2cl-lib:int-add i
1))
97 (setf (f2cl-lib:fref x-%data%
102 (f2cl-lib:fref x-%data%
107 (f2cl-lib:fref a-%data%
108 ((f2cl-lib:int-add l i
)
114 (setf (f2cl-lib:fref x-%data%
119 (f2cl-lib:fref x-%data%
123 (f2cl-lib:fref a-%data%
130 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
134 ((/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
136 (f2cl-lib:fref x-%data%
141 (setf l
(f2cl-lib:int-sub kplus1 j
))
143 (max (the f2cl-lib
:integer4
1)
144 (the f2cl-lib
:integer4
148 (f2cl-lib:int-add i
1))
155 (setf (f2cl-lib:fref x-%data%
160 (f2cl-lib:fref x-%data%
165 (f2cl-lib:fref a-%data%
166 ((f2cl-lib:int-add l i
)
170 (setf ix
(f2cl-lib:int-add ix incx
))
173 (setf (f2cl-lib:fref x-%data%
178 (f2cl-lib:fref x-%data%
182 (f2cl-lib:fref a-%data%
186 (setf jx
(f2cl-lib:int-add jx incx
))
187 (if (> j k
) (setf kx
(f2cl-lib:int-add kx incx
)))
192 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
196 ((/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
198 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
199 (setf l
(f2cl-lib:int-sub
1 j
))
201 (min (the f2cl-lib
:integer4 n
)
202 (the f2cl-lib
:integer4
203 (f2cl-lib:int-add j k
)))
205 (f2cl-lib:int-sub
1)))
206 ((> i
(f2cl-lib:int-add j
1)) nil
)
208 (setf (f2cl-lib:fref x-%data%
213 (f2cl-lib:fref x-%data%
218 (f2cl-lib:fref a-%data%
219 ((f2cl-lib:int-add l i
)
225 (setf (f2cl-lib:fref x-%data%
230 (f2cl-lib:fref x-%data%
234 (f2cl-lib:fref a-%data%
243 (f2cl-lib:int-sub n
1)
246 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
250 ((/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
252 (f2cl-lib:fref x-%data%
257 (setf l
(f2cl-lib:int-sub
1 j
))
259 (min (the f2cl-lib
:integer4 n
)
260 (the f2cl-lib
:integer4
261 (f2cl-lib:int-add j k
)))
263 (f2cl-lib:int-sub
1)))
264 ((> i
(f2cl-lib:int-add j
1)) nil
)
266 (setf (f2cl-lib:fref x-%data%
271 (f2cl-lib:fref x-%data%
276 (f2cl-lib:fref a-%data%
277 ((f2cl-lib:int-add l i
)
281 (setf ix
(f2cl-lib:int-sub ix incx
))
284 (setf (f2cl-lib:fref x-%data%
289 (f2cl-lib:fref x-%data%
293 (f2cl-lib:fref a-%data%
297 (setf jx
(f2cl-lib:int-sub jx incx
))
298 (if (>= (f2cl-lib:int-sub n j
) k
)
299 (setf kx
(f2cl-lib:int-sub kx incx
)))
304 (setf kplus1
(f2cl-lib:int-add k
1))
307 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
311 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
312 (setf l
(f2cl-lib:int-sub kplus1 j
))
316 (f2cl-lib:fref a-%data%
320 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
(f2cl-lib:int-sub
1))
321 (f2cl-lib:int-add i
(f2cl-lib:int-sub
1)))
323 (max (the f2cl-lib
:integer4
1)
324 (the f2cl-lib
:integer4
333 (f2cl-lib:fref a-%data%
334 ((f2cl-lib:int-add l i
) j
)
337 (f2cl-lib:fref x-%data%
342 (setf (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
)
349 (f2cl-lib:int-sub n
1)
352 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
356 (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
))
357 (setf kx
(f2cl-lib:int-sub kx incx
))
359 (setf l
(f2cl-lib:int-sub kplus1 j
))
363 (f2cl-lib:fref a-%data%
367 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
(f2cl-lib:int-sub
1))
368 (f2cl-lib:int-add i
(f2cl-lib:int-sub
1)))
370 (max (the f2cl-lib
:integer4
1)
371 (the f2cl-lib
:integer4
380 (f2cl-lib:fref a-%data%
381 ((f2cl-lib:int-add l i
) j
)
384 (f2cl-lib:fref x-%data%
388 (setf ix
(f2cl-lib:int-sub ix incx
))
390 (setf (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
)
392 (setf jx
(f2cl-lib:int-sub jx incx
))
397 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
401 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
402 (setf l
(f2cl-lib:int-sub
1 j
))
406 (f2cl-lib:fref a-%data%
410 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
411 (f2cl-lib:int-add i
1))
413 (min (the f2cl-lib
:integer4 n
)
414 (the f2cl-lib
:integer4
415 (f2cl-lib:int-add j k
))))
421 (f2cl-lib:fref a-%data%
422 ((f2cl-lib:int-add l i
) j
)
425 (f2cl-lib:fref x-%data%
430 (setf (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
)
435 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
439 (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
))
440 (setf kx
(f2cl-lib:int-add kx incx
))
442 (setf l
(f2cl-lib:int-sub
1 j
))
446 (f2cl-lib:fref a-%data%
450 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
451 (f2cl-lib:int-add i
1))
453 (min (the f2cl-lib
:integer4 n
)
454 (the f2cl-lib
:integer4
455 (f2cl-lib:int-add j k
))))
461 (f2cl-lib:fref a-%data%
462 ((f2cl-lib:int-add l i
) j
)
465 (f2cl-lib:fref x-%data%
469 (setf ix
(f2cl-lib:int-add ix incx
))
471 (setf (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
)
473 (setf jx
(f2cl-lib:int-add jx incx
))
477 (return (values nil nil nil nil nil nil nil nil nil
))))))
479 (in-package #-gcl
#:cl-user
#+gcl
"CL-USER")
480 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
481 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
482 (setf (gethash 'fortran-to-lisp
::dtbmv fortran-to-lisp
::*f2cl-function-info
*)
483 (fortran-to-lisp::make-f2cl-finfo
484 :arg-types
'((simple-string) (simple-string) (simple-string)
485 (fortran-to-lisp::integer4
) (fortran-to-lisp::integer4
)
486 (array double-float
(*)) (fortran-to-lisp::integer4
)
487 (array double-float
(*)) (fortran-to-lisp::integer4
))
488 :return-values
'(nil nil nil nil nil nil nil nil nil
)
489 :calls
'(fortran-to-lisp::xerbla fortran-to-lisp
::lsame
))))