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 ztrmm (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 "ZTRMM " 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))
100 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
104 ((/= (f2cl-lib:fref b
(k j
) ((1 ldb$
) (1 *))) zero
)
107 (f2cl-lib:fref b-%data%
111 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
118 (setf (f2cl-lib:fref b-%data%
123 (f2cl-lib:fref b-%data%
128 (f2cl-lib:fref a-%data%
136 (f2cl-lib:fref a-%data%
140 (setf (f2cl-lib:fref b-%data%
148 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
152 (f2cl-lib:int-add k
(f2cl-lib:int-sub
1)))
156 ((/= (f2cl-lib:fref b
(k j
) ((1 ldb$
) (1 *))) zero
)
159 (f2cl-lib:fref b-%data%
163 (setf (f2cl-lib:fref b-%data%
169 (setf (f2cl-lib:fref b-%data%
174 (f2cl-lib:fref b-%data%
178 (f2cl-lib:fref a-%data%
182 (f2cl-lib:fdo
(i (f2cl-lib:int-add k
1)
183 (f2cl-lib:int-add i
1))
186 (setf (f2cl-lib:fref b-%data%
191 (f2cl-lib:fref b-%data%
196 (f2cl-lib:fref a-%data%
206 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
210 (f2cl-lib:int-add i
(f2cl-lib:int-sub
1)))
214 (f2cl-lib:fref b-%data%
223 (f2cl-lib:fref a-%data%
227 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
237 (f2cl-lib:fref a-%data%
241 (f2cl-lib:fref b-%data%
251 (f2cl-lib:fref a-%data%
255 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
266 (f2cl-lib:fref a-%data%
270 (f2cl-lib:fref b-%data%
275 (setf (f2cl-lib:fref b-%data%
283 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
286 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
290 (f2cl-lib:fref b-%data%
299 (f2cl-lib:fref a-%data%
303 (f2cl-lib:fdo
(k (f2cl-lib:int-add i
1)
304 (f2cl-lib:int-add k
1))
310 (f2cl-lib:fref a-%data%
314 (f2cl-lib:fref b-%data%
324 (f2cl-lib:fref a-%data%
328 (f2cl-lib:fdo
(k (f2cl-lib:int-add i
1)
329 (f2cl-lib:int-add k
1))
336 (f2cl-lib:fref a-%data%
340 (f2cl-lib:fref b-%data%
345 (setf (f2cl-lib:fref b-%data%
357 (f2cl-lib:fdo
(j n
(f2cl-lib:int-add j
(f2cl-lib:int-sub
1)))
364 (f2cl-lib:fref a-%data%
368 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
371 (setf (f2cl-lib:fref b-%data%
376 (f2cl-lib:fref b-%data%
381 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
384 (f2cl-lib:int-sub
1)))
388 ((/= (f2cl-lib:fref a
(k j
) ((1 lda
) (1 *))) zero
)
391 (f2cl-lib:fref a-%data%
395 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
398 (setf (f2cl-lib:fref b-%data%
403 (f2cl-lib:fref b-%data%
408 (f2cl-lib:fref b-%data%
416 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
423 (f2cl-lib:fref a-%data%
427 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
430 (setf (f2cl-lib:fref b-%data%
435 (f2cl-lib:fref b-%data%
440 (f2cl-lib:fdo
(k (f2cl-lib:int-add j
1)
441 (f2cl-lib:int-add k
1))
445 ((/= (f2cl-lib:fref a
(k j
) ((1 lda
) (1 *))) zero
)
448 (f2cl-lib:fref a-%data%
452 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
455 (setf (f2cl-lib:fref b-%data%
460 (f2cl-lib:fref b-%data%
465 (f2cl-lib:fref b-%data%
475 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
478 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
481 (f2cl-lib:int-sub
1)))
485 ((/= (f2cl-lib:fref a
(j k
) ((1 lda
) (1 *))) zero
)
490 (f2cl-lib:fref a-%data%
498 (f2cl-lib:fref a-%data%
502 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
505 (setf (f2cl-lib:fref b-%data%
510 (f2cl-lib:fref b-%data%
515 (f2cl-lib:fref b-%data%
528 (f2cl-lib:fref a-%data%
536 (f2cl-lib:fref a-%data%
542 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
545 (setf (f2cl-lib:fref b-%data%
550 (f2cl-lib:fref b-%data%
557 (f2cl-lib:fdo
(k n
(f2cl-lib:int-add k
(f2cl-lib:int-sub
1)))
560 (f2cl-lib:fdo
(j (f2cl-lib:int-add k
1)
561 (f2cl-lib:int-add j
1))
565 ((/= (f2cl-lib:fref a
(j k
) ((1 lda
) (1 *))) zero
)
570 (f2cl-lib:fref a-%data%
578 (f2cl-lib:fref a-%data%
582 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
585 (setf (f2cl-lib:fref b-%data%
590 (f2cl-lib:fref b-%data%
595 (f2cl-lib:fref b-%data%
608 (f2cl-lib:fref a-%data%
616 (f2cl-lib:fref a-%data%
622 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
625 (setf (f2cl-lib:fref b-%data%
630 (f2cl-lib:fref b-%data%
638 (return (values nil nil nil nil nil nil nil nil nil nil nil
))))))
640 (in-package #-gcl
#:cl-user
#+gcl
"CL-USER")
641 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
642 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
643 (setf (gethash 'fortran-to-lisp
::ztrmm fortran-to-lisp
::*f2cl-function-info
*)
644 (fortran-to-lisp::make-f2cl-finfo
645 :arg-types
'((simple-string) (simple-string) (simple-string)
646 (simple-string) (fortran-to-lisp::integer4
)
647 (fortran-to-lisp::integer4
)
648 (fortran-to-lisp::complex16
)
649 (array fortran-to-lisp
::complex16
(*))
650 (fortran-to-lisp::integer4
)
651 (array fortran-to-lisp
::complex16
(*))
652 (fortran-to-lisp::integer4
))
653 :return-values
'(nil nil nil nil nil nil nil nil nil nil nil
)
654 :calls
'(fortran-to-lisp::xerbla fortran-to-lisp
::lsame
))))