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 ztrsv (uplo trans diag n a lda x incx
)
23 (declare (type (array f2cl-lib
:complex16
(*)) x a
)
24 (type (f2cl-lib:integer4
) incx lda 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 (kx 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 kx
)
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")))
49 ((< lda
(max (the f2cl-lib
:integer4
1) (the f2cl-lib
:integer4 n
)))
55 (xerbla "ZTRSV " info
)
57 (if (= n
0) (go end_label
))
58 (setf noconj
(lsame trans
"T"))
59 (setf nounit
(lsame diag
"N"))
64 (f2cl-lib:int-mul
(f2cl-lib:int-sub n
1)
74 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
78 ((/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
80 (setf (f2cl-lib:fref x-%data%
85 (f2cl-lib:fref x-%data%
89 (f2cl-lib:fref a-%data%
94 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
99 (f2cl-lib:int-sub
1)))
102 (setf (f2cl-lib:fref x-%data%
107 (f2cl-lib:fref x-%data%
112 (f2cl-lib:fref a-%data%
122 (f2cl-lib:int-sub n
1)
124 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
128 ((/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
130 (setf (f2cl-lib:fref x-%data%
135 (f2cl-lib:fref x-%data%
139 (f2cl-lib:fref a-%data%
144 (f2cl-lib:fref x-%data%
151 (f2cl-lib:int-sub
1))
153 (f2cl-lib:int-sub
1)))
156 (setf ix
(f2cl-lib:int-sub ix incx
))
157 (setf (f2cl-lib:fref x-%data%
162 (f2cl-lib:fref x-%data%
167 (f2cl-lib:fref a-%data%
172 (setf jx
(f2cl-lib:int-sub jx incx
))
177 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
181 ((/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
183 (setf (f2cl-lib:fref x-%data%
188 (f2cl-lib:fref x-%data%
192 (f2cl-lib:fref a-%data%
197 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
198 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
199 (f2cl-lib:int-add i
1))
202 (setf (f2cl-lib:fref x-%data%
207 (f2cl-lib:fref x-%data%
212 (f2cl-lib:fref a-%data%
220 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
224 ((/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
226 (setf (f2cl-lib:fref x-%data%
231 (f2cl-lib:fref x-%data%
235 (f2cl-lib:fref a-%data%
240 (f2cl-lib:fref x-%data%
245 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
246 (f2cl-lib:int-add i
1))
249 (setf ix
(f2cl-lib:int-add ix incx
))
250 (setf (f2cl-lib:fref x-%data%
255 (f2cl-lib:fref x-%data%
260 (f2cl-lib:fref a-%data%
265 (setf jx
(f2cl-lib:int-add jx incx
))
272 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
276 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
279 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
289 (f2cl-lib:fref a-%data%
293 (f2cl-lib:fref x-%data%
301 (f2cl-lib:fref a-%data%
306 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
317 (f2cl-lib:fref a-%data%
321 (f2cl-lib:fref x-%data%
330 (f2cl-lib:fref a-%data%
334 (setf (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
)
339 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
344 (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
))
347 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
357 (f2cl-lib:fref a-%data%
361 (f2cl-lib:fref x-%data%
365 (setf ix
(f2cl-lib:int-add ix incx
))
370 (f2cl-lib:fref a-%data%
375 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
386 (f2cl-lib:fref a-%data%
390 (f2cl-lib:fref x-%data%
394 (setf ix
(f2cl-lib:int-add ix incx
))
400 (f2cl-lib:fref a-%data%
404 (setf (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
)
406 (setf jx
(f2cl-lib:int-add jx incx
))
411 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
415 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
420 (f2cl-lib:int-sub
1)))
421 ((> i
(f2cl-lib:int-add j
1)) nil
)
426 (f2cl-lib:fref a-%data%
430 (f2cl-lib:fref x-%data%
438 (f2cl-lib:fref a-%data%
445 (f2cl-lib:int-sub
1)))
446 ((> i
(f2cl-lib:int-add j
1)) nil
)
452 (f2cl-lib:fref a-%data%
456 (f2cl-lib:fref x-%data%
465 (f2cl-lib:fref a-%data%
469 (setf (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
)
476 (f2cl-lib:int-sub n
1)
479 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
484 (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
))
489 (f2cl-lib:int-sub
1)))
490 ((> i
(f2cl-lib:int-add j
1)) nil
)
495 (f2cl-lib:fref a-%data%
499 (f2cl-lib:fref x-%data%
503 (setf ix
(f2cl-lib:int-sub ix incx
))
508 (f2cl-lib:fref a-%data%
515 (f2cl-lib:int-sub
1)))
516 ((> i
(f2cl-lib:int-add j
1)) nil
)
522 (f2cl-lib:fref a-%data%
526 (f2cl-lib:fref x-%data%
530 (setf ix
(f2cl-lib:int-sub ix incx
))
536 (f2cl-lib:fref a-%data%
540 (setf (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
)
542 (setf jx
(f2cl-lib:int-sub jx incx
))
546 (return (values nil nil nil nil nil nil nil nil
))))))
548 (in-package #-gcl
#:cl-user
#+gcl
"CL-USER")
549 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
550 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
551 (setf (gethash 'fortran-to-lisp
::ztrsv fortran-to-lisp
::*f2cl-function-info
*)
552 (fortran-to-lisp::make-f2cl-finfo
553 :arg-types
'((simple-string) (simple-string) (simple-string)
554 (fortran-to-lisp::integer4
)
555 (array fortran-to-lisp
::complex16
(*))
556 (fortran-to-lisp::integer4
)
557 (array fortran-to-lisp
::complex16
(*))
558 (fortran-to-lisp::integer4
))
559 :return-values
'(nil nil nil nil nil nil nil nil
)
560 :calls
'(fortran-to-lisp::xerbla fortran-to-lisp
::lsame
))))