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 dtbsv (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 "DTBSV " 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 n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
80 ((/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
81 (setf l
(f2cl-lib:int-sub kplus1 j
))
83 (setf (f2cl-lib:fref x-%data%
88 (f2cl-lib:fref x-%data%
92 (f2cl-lib:fref a-%data%
97 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
100 (f2cl-lib:int-sub
1))
102 (f2cl-lib:int-sub
1)))
104 (max (the f2cl-lib
:integer4
1)
105 (the f2cl-lib
:integer4
111 (setf (f2cl-lib:fref x-%data%
116 (f2cl-lib:fref x-%data%
121 (f2cl-lib:fref a-%data%
122 ((f2cl-lib:int-add l i
)
132 (f2cl-lib:int-sub n
1)
135 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
138 (setf kx
(f2cl-lib:int-sub kx incx
))
140 ((/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
142 (setf l
(f2cl-lib:int-sub kplus1 j
))
144 (setf (f2cl-lib:fref x-%data%
149 (f2cl-lib:fref x-%data%
153 (f2cl-lib:fref a-%data%
158 (f2cl-lib:fref x-%data%
164 (f2cl-lib:int-sub
1))
166 (f2cl-lib:int-sub
1)))
168 (max (the f2cl-lib
:integer4
1)
169 (the f2cl-lib
:integer4
175 (setf (f2cl-lib:fref x-%data%
180 (f2cl-lib:fref x-%data%
185 (f2cl-lib:fref a-%data%
186 ((f2cl-lib:int-add l i
)
190 (setf ix
(f2cl-lib:int-sub ix incx
))
192 (setf jx
(f2cl-lib:int-sub jx incx
))
197 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
201 ((/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
202 (setf l
(f2cl-lib:int-sub
1 j
))
204 (setf (f2cl-lib:fref x-%data%
209 (f2cl-lib:fref x-%data%
213 (f2cl-lib:fref a-%data%
218 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
219 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
220 (f2cl-lib:int-add i
1))
222 (min (the f2cl-lib
:integer4 n
)
223 (the f2cl-lib
:integer4
224 (f2cl-lib:int-add j k
))))
227 (setf (f2cl-lib:fref x-%data%
232 (f2cl-lib:fref x-%data%
237 (f2cl-lib:fref a-%data%
238 ((f2cl-lib:int-add l i
)
246 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
249 (setf kx
(f2cl-lib:int-add kx incx
))
251 ((/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
253 (setf l
(f2cl-lib:int-sub
1 j
))
255 (setf (f2cl-lib:fref x-%data%
260 (f2cl-lib:fref x-%data%
264 (f2cl-lib:fref a-%data%
269 (f2cl-lib:fref x-%data%
273 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
274 (f2cl-lib:int-add i
1))
276 (min (the f2cl-lib
:integer4 n
)
277 (the f2cl-lib
:integer4
278 (f2cl-lib:int-add j k
))))
281 (setf (f2cl-lib:fref x-%data%
286 (f2cl-lib:fref x-%data%
291 (f2cl-lib:fref a-%data%
292 ((f2cl-lib:int-add l i
)
296 (setf ix
(f2cl-lib:int-add ix incx
))
298 (setf jx
(f2cl-lib:int-add jx incx
))
303 (setf kplus1
(f2cl-lib:int-add k
1))
306 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
310 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
311 (setf l
(f2cl-lib:int-sub kplus1 j
))
313 (max (the f2cl-lib
:integer4
1)
314 (the f2cl-lib
:integer4
318 (f2cl-lib:int-add i
1))
321 (f2cl-lib:int-sub
1)))
327 (f2cl-lib:fref a-%data%
328 ((f2cl-lib:int-add l i
) j
)
331 (f2cl-lib:fref x-%data%
339 (f2cl-lib:fref a-%data%
343 (setf (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
)
348 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
352 (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
))
354 (setf l
(f2cl-lib:int-sub kplus1 j
))
356 (max (the f2cl-lib
:integer4
1)
357 (the f2cl-lib
:integer4
361 (f2cl-lib:int-add i
1))
364 (f2cl-lib:int-sub
1)))
370 (f2cl-lib:fref a-%data%
371 ((f2cl-lib:int-add l i
) j
)
374 (f2cl-lib:fref x-%data%
378 (setf ix
(f2cl-lib:int-add ix incx
))
383 (f2cl-lib:fref a-%data%
387 (setf (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
)
389 (setf jx
(f2cl-lib:int-add jx incx
))
390 (if (> j k
) (setf kx
(f2cl-lib:int-add kx incx
)))
395 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
399 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
400 (setf l
(f2cl-lib:int-sub
1 j
))
402 (min (the f2cl-lib
:integer4 n
)
403 (the f2cl-lib
:integer4
404 (f2cl-lib:int-add j k
)))
405 (f2cl-lib:int-add i
(f2cl-lib:int-sub
1)))
406 ((> i
(f2cl-lib:int-add j
1)) nil
)
411 (f2cl-lib:fref a-%data%
412 ((f2cl-lib:int-add l i
) j
)
415 (f2cl-lib:fref x-%data%
423 (f2cl-lib:fref a-%data%
427 (setf (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
)
434 (f2cl-lib:int-sub n
1)
437 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
441 (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
))
443 (setf l
(f2cl-lib:int-sub
1 j
))
445 (min (the f2cl-lib
:integer4 n
)
446 (the f2cl-lib
:integer4
447 (f2cl-lib:int-add j k
)))
448 (f2cl-lib:int-add i
(f2cl-lib:int-sub
1)))
449 ((> i
(f2cl-lib:int-add j
1)) nil
)
454 (f2cl-lib:fref a-%data%
455 ((f2cl-lib:int-add l i
) j
)
458 (f2cl-lib:fref x-%data%
462 (setf ix
(f2cl-lib:int-sub ix incx
))
467 (f2cl-lib:fref a-%data%
471 (setf (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
)
473 (setf jx
(f2cl-lib:int-sub jx incx
))
474 (if (>= (f2cl-lib:int-sub n j
) k
)
475 (setf kx
(f2cl-lib:int-sub kx incx
)))
479 (return (values nil nil nil nil nil nil nil nil nil
))))))
481 (in-package #-gcl
#:cl-user
#+gcl
"CL-USER")
482 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
483 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
484 (setf (gethash 'fortran-to-lisp
::dtbsv fortran-to-lisp
::*f2cl-function-info
*)
485 (fortran-to-lisp::make-f2cl-finfo
486 :arg-types
'((simple-string) (simple-string) (simple-string)
487 (fortran-to-lisp::integer4
) (fortran-to-lisp::integer4
)
488 (array double-float
(*)) (fortran-to-lisp::integer4
)
489 (array double-float
(*)) (fortran-to-lisp::integer4
))
490 :return-values
'(nil nil nil nil nil nil nil nil nil
)
491 :calls
'(fortran-to-lisp::xerbla fortran-to-lisp
::lsame
))))