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 dtpsv (uplo trans diag n ap x incx
)
23 (declare (type (array double-float
(*)) x ap
)
24 (type (f2cl-lib:integer4
) incx 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 (ap double-float ap-%data% ap-%offset%
)
31 (x double-float x-%data% x-%offset%
))
32 (prog ((nounit nil
) (i 0) (info 0) (ix 0) (j 0) (jx 0) (k 0) (kk 0)
34 (declare (type f2cl-lib
:logical nounit
)
35 (type (f2cl-lib:integer4
) i info ix j jx k kk kx
)
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")))
53 (xerbla "DTPSV " info
)
55 (if (= n
0) (go end_label
))
56 (setf nounit
(lsame diag
"N"))
61 (f2cl-lib:int-mul
(f2cl-lib:int-sub n
1)
69 (setf kk
(the f2cl-lib
:integer4
(truncate (* n
(+ n
1)) 2)))
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 ap-%data%
92 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
93 (setf k
(f2cl-lib:int-sub kk
1))
98 (f2cl-lib:int-sub
1)))
101 (setf (f2cl-lib:fref x-%data%
106 (f2cl-lib:fref x-%data%
111 (f2cl-lib:fref ap-%data%
115 (setf k
(f2cl-lib:int-sub k
1))
117 (setf kk
(f2cl-lib:int-sub kk j
))
123 (f2cl-lib:int-sub n
1)
125 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
129 ((/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
131 (setf (f2cl-lib:fref x-%data%
136 (f2cl-lib:fref x-%data%
140 (f2cl-lib:fref ap-%data%
145 (f2cl-lib:fref x-%data%
152 (f2cl-lib:int-sub
1))
154 (f2cl-lib:int-sub
1)))
162 (setf ix
(f2cl-lib:int-sub ix incx
))
163 (setf (f2cl-lib:fref x-%data%
168 (f2cl-lib:fref x-%data%
173 (f2cl-lib:fref ap-%data%
178 (setf jx
(f2cl-lib:int-sub jx incx
))
179 (setf kk
(f2cl-lib:int-sub kk j
))
185 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
189 ((/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
191 (setf (f2cl-lib:fref x-%data%
196 (f2cl-lib:fref x-%data%
200 (f2cl-lib:fref ap-%data%
205 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
206 (setf k
(f2cl-lib:int-add kk
1))
207 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
208 (f2cl-lib:int-add i
1))
211 (setf (f2cl-lib:fref x-%data%
216 (f2cl-lib:fref x-%data%
221 (f2cl-lib:fref ap-%data%
225 (setf k
(f2cl-lib:int-add k
1))
230 (f2cl-lib:int-sub n j
)
235 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
239 ((/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
241 (setf (f2cl-lib:fref x-%data%
246 (f2cl-lib:fref x-%data%
250 (f2cl-lib:fref ap-%data%
255 (f2cl-lib:fref x-%data%
260 (f2cl-lib:fdo
(k (f2cl-lib:int-add kk
1)
261 (f2cl-lib:int-add k
1))
269 (setf ix
(f2cl-lib:int-add ix incx
))
270 (setf (f2cl-lib:fref x-%data%
275 (f2cl-lib:fref x-%data%
280 (f2cl-lib:fref ap-%data%
285 (setf jx
(f2cl-lib:int-add jx incx
))
289 (f2cl-lib:int-sub n j
)
298 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
302 (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
))
304 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
307 (f2cl-lib:int-sub
1)))
313 (f2cl-lib:fref ap-%data%
317 (f2cl-lib:fref x-%data%
321 (setf k
(f2cl-lib:int-add k
1))
326 (f2cl-lib:fref ap-%data%
328 (f2cl-lib:int-add kk j
)
332 (setf (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
)
334 (setf kk
(f2cl-lib:int-add kk j
))
338 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
342 (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
))
344 (f2cl-lib:fdo
(k kk
(f2cl-lib:int-add k
1))
348 (f2cl-lib:int-sub
2)))
354 (f2cl-lib:fref ap-%data%
358 (f2cl-lib:fref x-%data%
362 (setf ix
(f2cl-lib:int-add ix incx
))
367 (f2cl-lib:fref ap-%data%
369 (f2cl-lib:int-add kk j
)
373 (setf (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
)
375 (setf jx
(f2cl-lib:int-add jx incx
))
376 (setf kk
(f2cl-lib:int-add kk j
))
379 (setf kk
(the f2cl-lib
:integer4
(truncate (* n
(+ n
1)) 2)))
382 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
386 (f2cl-lib:fref x-%data%
(j) ((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 ap-%data%
399 (f2cl-lib:fref x-%data%
403 (setf k
(f2cl-lib:int-sub k
1))
408 (f2cl-lib:fref ap-%data%
410 (f2cl-lib:int-sub kk n
)
414 (setf (f2cl-lib:fref x-%data%
(j) ((1 *)) x-%offset%
)
419 (f2cl-lib:int-sub n j
)
426 (f2cl-lib:int-sub n
1)
429 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
433 (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
))
436 (f2cl-lib:int-add k
(f2cl-lib:int-sub
1)))
450 (f2cl-lib:fref ap-%data%
454 (f2cl-lib:fref x-%data%
458 (setf ix
(f2cl-lib:int-sub ix incx
))
463 (f2cl-lib:fref ap-%data%
465 (f2cl-lib:int-sub kk n
)
469 (setf (f2cl-lib:fref x-%data%
(jx) ((1 *)) x-%offset%
)
471 (setf jx
(f2cl-lib:int-sub jx incx
))
475 (f2cl-lib:int-sub n j
)
480 (return (values nil nil nil nil nil nil nil
))))))
482 (in-package #-gcl
#:cl-user
#+gcl
"CL-USER")
483 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
484 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
485 (setf (gethash 'fortran-to-lisp
::dtpsv fortran-to-lisp
::*f2cl-function-info
*)
486 (fortran-to-lisp::make-f2cl-finfo
487 :arg-types
'((simple-string) (simple-string) (simple-string)
488 (fortran-to-lisp::integer4
) (array double-float
(*))
489 (array double-float
(*)) (fortran-to-lisp::integer4
))
490 :return-values
'(nil nil nil nil nil nil nil
)
491 :calls
'(fortran-to-lisp::xerbla fortran-to-lisp
::lsame
))))