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* ((one (f2cl-lib:cmplx
1.0 0.0)) (zero (f2cl-lib:cmplx
0.0 0.0)))
21 (declare (type (f2cl-lib:complex16
) one
)
22 (type (f2cl-lib:complex16
) zero
)
24 (defun ztrsm (side uplo transa diag m n alpha a lda b ldb$
)
25 (declare (type (array f2cl-lib
:complex16
(*)) b a
)
26 (type (f2cl-lib:complex16
) alpha
)
27 (type (f2cl-lib:integer4
) ldb$ lda n m
)
28 (type (simple-string *) diag transa uplo side
))
29 (f2cl-lib:with-multi-array-data
30 ((side character side-%data% side-%offset%
)
31 (uplo character uplo-%data% uplo-%offset%
)
32 (transa character transa-%data% transa-%offset%
)
33 (diag character diag-%data% diag-%offset%
)
34 (a f2cl-lib
:complex16 a-%data% a-%offset%
)
35 (b f2cl-lib
:complex16 b-%data% b-%offset%
))
36 (prog ((temp #C
(0.0
0.0)) (i 0) (info 0) (j 0) (k 0) (nrowa 0)
37 (lside nil
) (noconj nil
) (nounit nil
) (upper nil
))
38 (declare (type (f2cl-lib:complex16
) temp
)
39 (type (f2cl-lib:integer4
) i info j k nrowa
)
40 (type f2cl-lib
:logical lside noconj nounit upper
))
41 (setf lside
(lsame side
"L"))
47 (setf noconj
(lsame transa
"T"))
48 (setf nounit
(lsame diag
"N"))
49 (setf upper
(lsame uplo
"U"))
52 ((and (not lside
) (not (lsame side
"R")))
54 ((and (not upper
) (not (lsame uplo
"L")))
56 ((and (not (lsame transa
"N"))
57 (not (lsame transa
"T"))
58 (not (lsame transa
"C")))
60 ((and (not (lsame diag
"U")) (not (lsame diag
"N")))
66 ((< lda
(max (the f2cl-lib
:integer4
1) (the f2cl-lib
:integer4 nrowa
)))
68 ((< ldb$
(max (the f2cl-lib
:integer4
1) (the f2cl-lib
:integer4 m
)))
72 (xerbla "ZTRSM " info
)
74 (if (= n
0) (go end_label
))
77 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
80 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
83 (setf (f2cl-lib:fref b-%data%
97 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
102 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
105 (setf (f2cl-lib:fref b-%data%
110 (f2cl-lib:fref b-%data%
116 (f2cl-lib:int-add k
(f2cl-lib:int-sub
1)))
120 ((/= (f2cl-lib:fref b
(k j
) ((1 ldb$
) (1 *))) zero
)
122 (setf (f2cl-lib:fref b-%data%
127 (f2cl-lib:fref b-%data%
131 (f2cl-lib:fref a-%data%
135 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
142 (setf (f2cl-lib:fref b-%data%
147 (f2cl-lib:fref b-%data%
152 (f2cl-lib:fref b-%data%
156 (f2cl-lib:fref a-%data%
164 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
169 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
172 (setf (f2cl-lib:fref b-%data%
177 (f2cl-lib:fref b-%data%
182 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
186 ((/= (f2cl-lib:fref b
(k j
) ((1 ldb$
) (1 *))) zero
)
188 (setf (f2cl-lib:fref b-%data%
193 (f2cl-lib:fref b-%data%
197 (f2cl-lib:fref a-%data%
201 (f2cl-lib:fdo
(i (f2cl-lib:int-add k
1)
202 (f2cl-lib:int-add i
1))
205 (setf (f2cl-lib:fref b-%data%
210 (f2cl-lib:fref b-%data%
215 (f2cl-lib:fref b-%data%
219 (f2cl-lib:fref a-%data%
229 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
232 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
237 (f2cl-lib:fref b-%data%
243 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
253 (f2cl-lib:fref a-%data%
257 (f2cl-lib:fref b-%data%
265 (f2cl-lib:fref a-%data%
270 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
281 (f2cl-lib:fref a-%data%
285 (f2cl-lib:fref b-%data%
294 (f2cl-lib:fref a-%data%
298 (setf (f2cl-lib:fref b-%data%
306 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
310 (f2cl-lib:int-add i
(f2cl-lib:int-sub
1)))
315 (f2cl-lib:fref b-%data%
321 (f2cl-lib:fdo
(k (f2cl-lib:int-add i
1)
322 (f2cl-lib:int-add k
1))
328 (f2cl-lib:fref a-%data%
332 (f2cl-lib:fref b-%data%
340 (f2cl-lib:fref a-%data%
345 (f2cl-lib:fdo
(k (f2cl-lib:int-add i
1)
346 (f2cl-lib:int-add k
1))
353 (f2cl-lib:fref a-%data%
357 (f2cl-lib:fref b-%data%
366 (f2cl-lib:fref a-%data%
370 (setf (f2cl-lib:fref b-%data%
382 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
387 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
390 (setf (f2cl-lib:fref b-%data%
395 (f2cl-lib:fref b-%data%
400 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
403 (f2cl-lib:int-sub
1)))
407 ((/= (f2cl-lib:fref a
(k j
) ((1 lda
) (1 *))) zero
)
408 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
411 (setf (f2cl-lib:fref b-%data%
416 (f2cl-lib:fref b-%data%
421 (f2cl-lib:fref a-%data%
425 (f2cl-lib:fref b-%data%
435 (f2cl-lib:fref a-%data%
439 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
442 (setf (f2cl-lib:fref b-%data%
447 (f2cl-lib:fref b-%data%
454 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
459 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
462 (setf (f2cl-lib:fref b-%data%
467 (f2cl-lib:fref b-%data%
472 (f2cl-lib:fdo
(k (f2cl-lib:int-add j
1)
473 (f2cl-lib:int-add k
1))
477 ((/= (f2cl-lib:fref a
(k j
) ((1 lda
) (1 *))) zero
)
478 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
481 (setf (f2cl-lib:fref b-%data%
486 (f2cl-lib:fref b-%data%
491 (f2cl-lib:fref a-%data%
495 (f2cl-lib:fref b-%data%
505 (f2cl-lib:fref a-%data%
509 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
512 (setf (f2cl-lib:fref b-%data%
517 (f2cl-lib:fref b-%data%
526 (f2cl-lib:fdo
(k n
(f2cl-lib:int-add k
(f2cl-lib:int-sub
1)))
535 (f2cl-lib:fref a-%data%
543 (f2cl-lib:fref a-%data%
547 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
550 (setf (f2cl-lib:fref b-%data%
555 (f2cl-lib:fref b-%data%
560 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
563 (f2cl-lib:int-sub
1)))
567 ((/= (f2cl-lib:fref a
(j k
) ((1 lda
) (1 *))) zero
)
571 (f2cl-lib:fref a-%data%
579 (f2cl-lib:fref a-%data%
583 'f2cl-lib
:complex16
))))
584 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
587 (setf (f2cl-lib:fref b-%data%
592 (f2cl-lib:fref b-%data%
597 (f2cl-lib:fref b-%data%
605 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
608 (setf (f2cl-lib:fref b-%data%
613 (f2cl-lib:fref b-%data%
620 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
629 (f2cl-lib:fref a-%data%
637 (f2cl-lib:fref a-%data%
641 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
644 (setf (f2cl-lib:fref b-%data%
649 (f2cl-lib:fref b-%data%
654 (f2cl-lib:fdo
(j (f2cl-lib:int-add k
1)
655 (f2cl-lib:int-add j
1))
659 ((/= (f2cl-lib:fref a
(j k
) ((1 lda
) (1 *))) zero
)
663 (f2cl-lib:fref a-%data%
671 (f2cl-lib:fref a-%data%
675 'f2cl-lib
:complex16
))))
676 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
679 (setf (f2cl-lib:fref b-%data%
684 (f2cl-lib:fref b-%data%
689 (f2cl-lib:fref b-%data%
697 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
700 (setf (f2cl-lib:fref b-%data%
705 (f2cl-lib:fref b-%data%
713 (return (values nil nil nil nil nil nil nil nil nil nil nil
))))))
715 (in-package #:cl-user
)
716 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
717 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
718 (setf (gethash 'fortran-to-lisp
::ztrsm fortran-to-lisp
::*f2cl-function-info
*)
719 (fortran-to-lisp::make-f2cl-finfo
720 :arg-types
'((simple-string) (simple-string) (simple-string)
721 (simple-string) (fortran-to-lisp::integer4
)
722 (fortran-to-lisp::integer4
)
723 (fortran-to-lisp::complex16
)
724 (array fortran-to-lisp
::complex16
(*))
725 (fortran-to-lisp::integer4
)
726 (array fortran-to-lisp
::complex16
(*))
727 (fortran-to-lisp::integer4
))
728 :return-values
'(nil nil nil nil nil nil nil nil nil nil nil
)
729 :calls
'(fortran-to-lisp::xerbla fortran-to-lisp
::lsame
))))