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 dtrsv (uplo trans diag n a lda x incx
)
23 (declare (type (array double-float
(*)) 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 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) (kx 0) (temp 0.0))
33 (declare (type f2cl-lib
:logical nounit
)
34 (type (f2cl-lib:integer4
) i info ix j jx kx
)
35 (type (double-float) temp
))
38 ((and (not (lsame uplo
"U")) (not (lsame uplo
"L")))
40 ((and (not (lsame trans
"N"))
41 (not (lsame trans
"T"))
42 (not (lsame trans
"C")))
44 ((and (not (lsame diag
"U")) (not (lsame diag
"N")))
48 ((< lda
(max (the f2cl-lib
:integer4
1) (the f2cl-lib
:integer4 n
)))
54 (xerbla "DTRSV " info
)
56 (if (= n
0) (go end_label
))
57 (setf nounit
(lsame diag
"N"))
62 (f2cl-lib:int-mul
(f2cl-lib:int-sub n
1)
72 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
76 ((/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
78 (setf (f2cl-lib:fref x-%data%
83 (f2cl-lib:fref x-%data%
87 (f2cl-lib:fref a-%data%
92 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
97 (f2cl-lib:int-sub
1)))
100 (setf (f2cl-lib:fref x-%data%
105 (f2cl-lib:fref x-%data%
110 (f2cl-lib:fref a-%data%
120 (f2cl-lib:int-sub n
1)
122 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
126 ((/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
128 (setf (f2cl-lib:fref x-%data%
133 (f2cl-lib:fref x-%data%
137 (f2cl-lib:fref a-%data%
142 (f2cl-lib:fref x-%data%
149 (f2cl-lib:int-sub
1))
151 (f2cl-lib:int-sub
1)))
154 (setf ix
(f2cl-lib:int-sub ix incx
))
155 (setf (f2cl-lib:fref x-%data%
160 (f2cl-lib:fref x-%data%
165 (f2cl-lib:fref a-%data%
170 (setf jx
(f2cl-lib:int-sub jx incx
))
175 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
179 ((/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
181 (setf (f2cl-lib:fref x-%data%
186 (f2cl-lib:fref x-%data%
190 (f2cl-lib:fref a-%data%
195 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
196 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
197 (f2cl-lib:int-add i
1))
200 (setf (f2cl-lib:fref x-%data%
205 (f2cl-lib:fref x-%data%
210 (f2cl-lib:fref a-%data%
218 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
222 ((/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
224 (setf (f2cl-lib:fref x-%data%
229 (f2cl-lib:fref x-%data%
233 (f2cl-lib:fref a-%data%
238 (f2cl-lib:fref x-%data%
243 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
244 (f2cl-lib:int-add i
1))
247 (setf ix
(f2cl-lib:int-add ix incx
))
248 (setf (f2cl-lib:fref x-%data%
253 (f2cl-lib:fref x-%data%
258 (f2cl-lib:fref a-%data%
263 (setf jx
(f2cl-lib:int-add jx incx
))
270 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
274 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
275 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
278 (f2cl-lib:int-sub
1)))
284 (f2cl-lib:fref a-%data%
288 (f2cl-lib:fref x-%data%
296 (f2cl-lib:fref a-%data%
300 (setf (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
)
305 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
309 (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
))
311 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
314 (f2cl-lib:int-sub
1)))
320 (f2cl-lib:fref a-%data%
324 (f2cl-lib:fref x-%data%
328 (setf ix
(f2cl-lib:int-add ix incx
))
333 (f2cl-lib:fref a-%data%
337 (setf (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
)
339 (setf jx
(f2cl-lib:int-add jx incx
))
344 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
348 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
350 (f2cl-lib:int-add i
(f2cl-lib:int-sub
1)))
351 ((> i
(f2cl-lib:int-add j
1)) nil
)
356 (f2cl-lib:fref a-%data%
360 (f2cl-lib:fref x-%data%
368 (f2cl-lib:fref a-%data%
372 (setf (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
)
379 (f2cl-lib:int-sub n
1)
382 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
386 (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
))
389 (f2cl-lib:int-add i
(f2cl-lib:int-sub
1)))
390 ((> i
(f2cl-lib:int-add j
1)) nil
)
395 (f2cl-lib:fref a-%data%
399 (f2cl-lib:fref x-%data%
403 (setf ix
(f2cl-lib:int-sub ix incx
))
408 (f2cl-lib:fref a-%data%
412 (setf (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
)
414 (setf jx
(f2cl-lib:int-sub jx incx
))
418 (return (values nil nil nil nil nil nil nil nil
))))))
420 (in-package #-gcl
#:cl-user
#+gcl
"CL-USER")
421 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
422 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
423 (setf (gethash 'fortran-to-lisp
::dtrsv fortran-to-lisp
::*f2cl-function-info
*)
424 (fortran-to-lisp::make-f2cl-finfo
425 :arg-types
'((simple-string) (simple-string) (simple-string)
426 (fortran-to-lisp::integer4
) (array double-float
(*))
427 (fortran-to-lisp::integer4
) (array double-float
(*))
428 (fortran-to-lisp::integer4
))
429 :return-values
'(nil nil nil nil nil nil nil nil
)
430 :calls
'(fortran-to-lisp::xerbla fortran-to-lisp
::lsame
))))