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* ((zero (f2cl-lib:cmplx
0.0 0.0)))
21 (declare (type (f2cl-lib:complex16
) zero
) (ignorable zero
))
22 (defun ztbmv (uplo trans diag n k a lda x incx
)
23 (declare (type (array f2cl-lib
:complex16
(*)) 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 f2cl-lib
:complex16 a-%data% a-%offset%
)
31 (x f2cl-lib
:complex16 x-%data% x-%offset%
))
32 (prog ((noconj nil
) (nounit nil
) (i 0) (info 0) (ix 0) (j 0) (jx 0)
33 (kplus1 0) (kx 0) (l 0) (temp #C
(0.0
0.0)))
34 (declare (type f2cl-lib
:logical noconj nounit
)
35 (type (f2cl-lib:integer4
) i info ix j jx kplus1 kx l
)
36 (type (f2cl-lib:complex16
) 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 "ZTBMV " info
)
59 (if (= n
0) (go end_label
))
60 (setf noconj
(lsame trans
"T"))
61 (setf nounit
(lsame diag
"N"))
66 (f2cl-lib:int-mul
(f2cl-lib:int-sub n
1)
74 (setf kplus1
(f2cl-lib:int-add k
1))
77 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
81 ((/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
83 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
84 (setf l
(f2cl-lib:int-sub kplus1 j
))
86 (max (the f2cl-lib
:integer4
1)
87 (the f2cl-lib
:integer4
91 (f2cl-lib:int-add i
1))
98 (setf (f2cl-lib:fref x-%data%
103 (f2cl-lib:fref x-%data%
108 (f2cl-lib:fref a-%data%
109 ((f2cl-lib:int-add l i
)
115 (setf (f2cl-lib:fref x-%data%
120 (f2cl-lib:fref x-%data%
124 (f2cl-lib:fref a-%data%
131 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
135 ((/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
137 (f2cl-lib:fref x-%data%
142 (setf l
(f2cl-lib:int-sub kplus1 j
))
144 (max (the f2cl-lib
:integer4
1)
145 (the f2cl-lib
:integer4
149 (f2cl-lib:int-add i
1))
156 (setf (f2cl-lib:fref x-%data%
161 (f2cl-lib:fref x-%data%
166 (f2cl-lib:fref a-%data%
167 ((f2cl-lib:int-add l i
)
171 (setf ix
(f2cl-lib:int-add ix incx
))
174 (setf (f2cl-lib:fref x-%data%
179 (f2cl-lib:fref x-%data%
183 (f2cl-lib:fref a-%data%
187 (setf jx
(f2cl-lib:int-add jx incx
))
188 (if (> j k
) (setf kx
(f2cl-lib:int-add kx incx
)))
193 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
197 ((/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
199 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
200 (setf l
(f2cl-lib:int-sub
1 j
))
202 (min (the f2cl-lib
:integer4 n
)
203 (the f2cl-lib
:integer4
204 (f2cl-lib:int-add j k
)))
206 (f2cl-lib:int-sub
1)))
207 ((> i
(f2cl-lib:int-add j
1)) nil
)
209 (setf (f2cl-lib:fref x-%data%
214 (f2cl-lib:fref x-%data%
219 (f2cl-lib:fref a-%data%
220 ((f2cl-lib:int-add l i
)
226 (setf (f2cl-lib:fref x-%data%
231 (f2cl-lib:fref x-%data%
235 (f2cl-lib:fref a-%data%
244 (f2cl-lib:int-sub n
1)
247 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
251 ((/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
253 (f2cl-lib:fref x-%data%
258 (setf l
(f2cl-lib:int-sub
1 j
))
260 (min (the f2cl-lib
:integer4 n
)
261 (the f2cl-lib
:integer4
262 (f2cl-lib:int-add j k
)))
264 (f2cl-lib:int-sub
1)))
265 ((> i
(f2cl-lib:int-add j
1)) nil
)
267 (setf (f2cl-lib:fref x-%data%
272 (f2cl-lib:fref x-%data%
277 (f2cl-lib:fref a-%data%
278 ((f2cl-lib:int-add l i
)
282 (setf ix
(f2cl-lib:int-sub ix incx
))
285 (setf (f2cl-lib:fref x-%data%
290 (f2cl-lib:fref x-%data%
294 (f2cl-lib:fref a-%data%
298 (setf jx
(f2cl-lib:int-sub jx incx
))
299 (if (>= (f2cl-lib:int-sub n j
) k
)
300 (setf kx
(f2cl-lib:int-sub kx incx
)))
305 (setf kplus1
(f2cl-lib:int-add k
1))
308 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
312 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
313 (setf l
(f2cl-lib:int-sub kplus1 j
))
319 (f2cl-lib:fref a-%data%
325 (f2cl-lib:int-sub
1))
327 (f2cl-lib:int-sub
1)))
329 (max (the f2cl-lib
:integer4
1)
330 (the f2cl-lib
:integer4
339 (f2cl-lib:fref a-%data%
340 ((f2cl-lib:int-add l i
)
344 (f2cl-lib:fref x-%data%
354 (f2cl-lib:fref a-%data%
360 (f2cl-lib:int-sub
1))
362 (f2cl-lib:int-sub
1)))
364 (max (the f2cl-lib
:integer4
1)
365 (the f2cl-lib
:integer4
375 (f2cl-lib:fref a-%data%
376 ((f2cl-lib:int-add l i
)
380 (f2cl-lib:fref x-%data%
385 (setf (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
)
392 (f2cl-lib:int-sub n
1)
395 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
399 (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
))
400 (setf kx
(f2cl-lib:int-sub kx incx
))
402 (setf l
(f2cl-lib:int-sub kplus1 j
))
408 (f2cl-lib:fref a-%data%
414 (f2cl-lib:int-sub
1))
416 (f2cl-lib:int-sub
1)))
418 (max (the f2cl-lib
:integer4
1)
419 (the f2cl-lib
:integer4
428 (f2cl-lib:fref a-%data%
429 ((f2cl-lib:int-add l i
)
433 (f2cl-lib:fref x-%data%
437 (setf ix
(f2cl-lib:int-sub ix incx
))
444 (f2cl-lib:fref a-%data%
450 (f2cl-lib:int-sub
1))
452 (f2cl-lib:int-sub
1)))
454 (max (the f2cl-lib
:integer4
1)
455 (the f2cl-lib
:integer4
465 (f2cl-lib:fref a-%data%
466 ((f2cl-lib:int-add l i
)
470 (f2cl-lib:fref x-%data%
474 (setf ix
(f2cl-lib:int-sub ix incx
))
476 (setf (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
)
478 (setf jx
(f2cl-lib:int-sub jx incx
))
483 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
487 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
488 (setf l
(f2cl-lib:int-sub
1 j
))
494 (f2cl-lib:fref a-%data%
498 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
499 (f2cl-lib:int-add i
1))
501 (min (the f2cl-lib
:integer4 n
)
502 (the f2cl-lib
:integer4
503 (f2cl-lib:int-add j k
))))
509 (f2cl-lib:fref a-%data%
510 ((f2cl-lib:int-add l i
)
514 (f2cl-lib:fref x-%data%
524 (f2cl-lib:fref a-%data%
528 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
529 (f2cl-lib:int-add i
1))
531 (min (the f2cl-lib
:integer4 n
)
532 (the f2cl-lib
:integer4
533 (f2cl-lib:int-add j k
))))
540 (f2cl-lib:fref a-%data%
541 ((f2cl-lib:int-add l i
)
545 (f2cl-lib:fref x-%data%
550 (setf (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
)
555 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
559 (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
))
560 (setf kx
(f2cl-lib:int-add kx incx
))
562 (setf l
(f2cl-lib:int-sub
1 j
))
568 (f2cl-lib:fref a-%data%
572 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
573 (f2cl-lib:int-add i
1))
575 (min (the f2cl-lib
:integer4 n
)
576 (the f2cl-lib
:integer4
577 (f2cl-lib:int-add j k
))))
583 (f2cl-lib:fref a-%data%
584 ((f2cl-lib:int-add l i
)
588 (f2cl-lib:fref x-%data%
592 (setf ix
(f2cl-lib:int-add ix incx
))
599 (f2cl-lib:fref a-%data%
603 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
604 (f2cl-lib:int-add i
1))
606 (min (the f2cl-lib
:integer4 n
)
607 (the f2cl-lib
:integer4
608 (f2cl-lib:int-add j k
))))
615 (f2cl-lib:fref a-%data%
616 ((f2cl-lib:int-add l i
)
620 (f2cl-lib:fref x-%data%
624 (setf ix
(f2cl-lib:int-add ix incx
))
626 (setf (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
)
628 (setf jx
(f2cl-lib:int-add jx incx
))
632 (return (values nil nil nil nil nil nil nil nil nil
))))))
634 (in-package #-gcl
#:cl-user
#+gcl
"CL-USER")
635 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
636 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
637 (setf (gethash 'fortran-to-lisp
::ztbmv fortran-to-lisp
::*f2cl-function-info
*)
638 (fortran-to-lisp::make-f2cl-finfo
639 :arg-types
'((simple-string) (simple-string) (simple-string)
640 (fortran-to-lisp::integer4
) (fortran-to-lisp::integer4
)
641 (array fortran-to-lisp
::complex16
(*))
642 (fortran-to-lisp::integer4
)
643 (array fortran-to-lisp
::complex16
(*))
644 (fortran-to-lisp::integer4
))
645 :return-values
'(nil nil nil nil nil nil nil nil nil
)
646 :calls
'(fortran-to-lisp::xerbla fortran-to-lisp
::lsame
))))