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 ztbsv (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 "ZTBSV " 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 n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
81 ((/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
82 (setf l
(f2cl-lib:int-sub kplus1 j
))
84 (setf (f2cl-lib:fref x-%data%
89 (f2cl-lib:fref x-%data%
93 (f2cl-lib:fref a-%data%
98 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
101 (f2cl-lib:int-sub
1))
103 (f2cl-lib:int-sub
1)))
105 (max (the f2cl-lib
:integer4
1)
106 (the f2cl-lib
:integer4
112 (setf (f2cl-lib:fref x-%data%
117 (f2cl-lib:fref x-%data%
122 (f2cl-lib:fref a-%data%
123 ((f2cl-lib:int-add l i
)
133 (f2cl-lib:int-sub n
1)
136 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
139 (setf kx
(f2cl-lib:int-sub kx incx
))
141 ((/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
143 (setf l
(f2cl-lib:int-sub kplus1 j
))
145 (setf (f2cl-lib:fref x-%data%
150 (f2cl-lib:fref x-%data%
154 (f2cl-lib:fref a-%data%
159 (f2cl-lib:fref x-%data%
165 (f2cl-lib:int-sub
1))
167 (f2cl-lib:int-sub
1)))
169 (max (the f2cl-lib
:integer4
1)
170 (the f2cl-lib
:integer4
176 (setf (f2cl-lib:fref x-%data%
181 (f2cl-lib:fref x-%data%
186 (f2cl-lib:fref a-%data%
187 ((f2cl-lib:int-add l i
)
191 (setf ix
(f2cl-lib:int-sub ix incx
))
193 (setf jx
(f2cl-lib:int-sub jx incx
))
198 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
202 ((/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
203 (setf l
(f2cl-lib:int-sub
1 j
))
205 (setf (f2cl-lib:fref x-%data%
210 (f2cl-lib:fref x-%data%
214 (f2cl-lib:fref a-%data%
219 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
220 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
221 (f2cl-lib:int-add i
1))
223 (min (the f2cl-lib
:integer4 n
)
224 (the f2cl-lib
:integer4
225 (f2cl-lib:int-add j k
))))
228 (setf (f2cl-lib:fref x-%data%
233 (f2cl-lib:fref x-%data%
238 (f2cl-lib:fref a-%data%
239 ((f2cl-lib:int-add l i
)
247 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
250 (setf kx
(f2cl-lib:int-add kx incx
))
252 ((/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
254 (setf l
(f2cl-lib:int-sub
1 j
))
256 (setf (f2cl-lib:fref x-%data%
261 (f2cl-lib:fref x-%data%
265 (f2cl-lib:fref a-%data%
270 (f2cl-lib:fref x-%data%
274 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
275 (f2cl-lib:int-add i
1))
277 (min (the f2cl-lib
:integer4 n
)
278 (the f2cl-lib
:integer4
279 (f2cl-lib:int-add j k
))))
282 (setf (f2cl-lib:fref x-%data%
287 (f2cl-lib:fref x-%data%
292 (f2cl-lib:fref a-%data%
293 ((f2cl-lib:int-add l i
)
297 (setf ix
(f2cl-lib:int-add ix incx
))
299 (setf jx
(f2cl-lib:int-add jx incx
))
304 (setf kplus1
(f2cl-lib:int-add k
1))
307 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
311 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
312 (setf l
(f2cl-lib:int-sub kplus1 j
))
316 (max (the f2cl-lib
:integer4
1)
317 (the f2cl-lib
:integer4
321 (f2cl-lib:int-add i
1))
331 (f2cl-lib:fref a-%data%
332 ((f2cl-lib:int-add l i
)
336 (f2cl-lib:fref x-%data%
344 (f2cl-lib:fref a-%data%
350 (max (the f2cl-lib
:integer4
1)
351 (the f2cl-lib
:integer4
355 (f2cl-lib:int-add i
1))
366 (f2cl-lib:fref a-%data%
367 ((f2cl-lib:int-add l i
)
371 (f2cl-lib:fref x-%data%
380 (f2cl-lib:fref a-%data%
384 (setf (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
)
389 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
393 (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
))
395 (setf l
(f2cl-lib:int-sub kplus1 j
))
399 (max (the f2cl-lib
:integer4
1)
400 (the f2cl-lib
:integer4
404 (f2cl-lib:int-add i
1))
414 (f2cl-lib:fref a-%data%
415 ((f2cl-lib:int-add l i
)
419 (f2cl-lib:fref x-%data%
423 (setf ix
(f2cl-lib:int-add ix incx
))
428 (f2cl-lib:fref a-%data%
434 (max (the f2cl-lib
:integer4
1)
435 (the f2cl-lib
:integer4
439 (f2cl-lib:int-add i
1))
450 (f2cl-lib:fref a-%data%
451 ((f2cl-lib:int-add l i
)
455 (f2cl-lib:fref x-%data%
459 (setf ix
(f2cl-lib:int-add ix incx
))
465 (f2cl-lib:fref a-%data%
469 (setf (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
)
471 (setf jx
(f2cl-lib:int-add jx incx
))
472 (if (> j k
) (setf kx
(f2cl-lib:int-add kx incx
)))
477 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
481 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
482 (setf l
(f2cl-lib:int-sub
1 j
))
486 (min (the f2cl-lib
:integer4 n
)
487 (the f2cl-lib
:integer4
488 (f2cl-lib:int-add j k
)))
490 (f2cl-lib:int-sub
1)))
491 ((> i
(f2cl-lib:int-add j
1)) nil
)
496 (f2cl-lib:fref a-%data%
497 ((f2cl-lib:int-add l i
)
501 (f2cl-lib:fref x-%data%
509 (f2cl-lib:fref a-%data%
515 (min (the f2cl-lib
:integer4 n
)
516 (the f2cl-lib
:integer4
517 (f2cl-lib:int-add j k
)))
519 (f2cl-lib:int-sub
1)))
520 ((> i
(f2cl-lib:int-add j
1)) nil
)
526 (f2cl-lib:fref a-%data%
527 ((f2cl-lib:int-add l i
)
531 (f2cl-lib:fref x-%data%
540 (f2cl-lib:fref a-%data%
544 (setf (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
)
551 (f2cl-lib:int-sub n
1)
554 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
558 (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
))
560 (setf l
(f2cl-lib:int-sub
1 j
))
564 (min (the f2cl-lib
:integer4 n
)
565 (the f2cl-lib
:integer4
566 (f2cl-lib:int-add j k
)))
568 (f2cl-lib:int-sub
1)))
569 ((> i
(f2cl-lib:int-add j
1)) nil
)
574 (f2cl-lib:fref a-%data%
575 ((f2cl-lib:int-add l i
)
579 (f2cl-lib:fref x-%data%
583 (setf ix
(f2cl-lib:int-sub ix incx
))
588 (f2cl-lib:fref a-%data%
594 (min (the f2cl-lib
:integer4 n
)
595 (the f2cl-lib
:integer4
596 (f2cl-lib:int-add j k
)))
598 (f2cl-lib:int-sub
1)))
599 ((> i
(f2cl-lib:int-add j
1)) nil
)
605 (f2cl-lib:fref a-%data%
606 ((f2cl-lib:int-add l i
)
610 (f2cl-lib:fref x-%data%
614 (setf ix
(f2cl-lib:int-sub ix incx
))
620 (f2cl-lib:fref a-%data%
624 (setf (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
)
626 (setf jx
(f2cl-lib:int-sub jx incx
))
627 (if (>= (f2cl-lib:int-sub n j
) k
)
628 (setf kx
(f2cl-lib:int-sub kx 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
::ztbsv 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
))))