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 1.0) (zero 0.0))
21 (declare (type (double-float 1.0 1.0) one
)
22 (type (double-float 0.0 0.0) zero
)
24 (defun dsyrk (uplo trans n k alpha a lda beta c ldc
)
25 (declare (type (array double-float
(*)) c a
)
26 (type (double-float) beta alpha
)
27 (type (f2cl-lib:integer4
) ldc lda k n
)
28 (type (simple-string *) trans uplo
))
29 (f2cl-lib:with-multi-array-data
30 ((uplo character uplo-%data% uplo-%offset%
)
31 (trans character trans-%data% trans-%offset%
)
32 (a double-float a-%data% a-%offset%
)
33 (c double-float c-%data% c-%offset%
))
34 (prog ((temp 0.0) (i 0) (info 0) (j 0) (l 0) (nrowa 0) (upper nil
))
35 (declare (type (double-float) temp
)
36 (type (f2cl-lib:integer4
) i info j l nrowa
)
37 (type f2cl-lib
:logical upper
))
43 (setf upper
(lsame uplo
"U"))
46 ((and (not upper
) (not (lsame uplo
"L")))
48 ((and (not (lsame trans
"N"))
49 (not (lsame trans
"T"))
50 (not (lsame trans
"C")))
56 ((< lda
(max (the f2cl-lib
:integer4
1) (the f2cl-lib
:integer4 nrowa
)))
58 ((< ldc
(max (the f2cl-lib
:integer4
1) (the f2cl-lib
:integer4 n
)))
62 (xerbla "DSYRK " info
)
64 (if (or (= n
0) (and (or (= alpha zero
) (= k
0)) (= beta one
)))
72 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
75 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
78 (setf (f2cl-lib:fref c-%data%
86 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
89 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
92 (setf (f2cl-lib:fref c-%data%
97 (f2cl-lib:fref c-%data%
106 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
109 (f2cl-lib:fdo
(i j
(f2cl-lib:int-add i
1))
112 (setf (f2cl-lib:fref c-%data%
120 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
123 (f2cl-lib:fdo
(i j
(f2cl-lib:int-add i
1))
126 (setf (f2cl-lib:fref c-%data%
131 (f2cl-lib:fref c-%data%
142 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
147 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
150 (setf (f2cl-lib:fref c-%data%
157 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
160 (setf (f2cl-lib:fref c-%data%
165 (f2cl-lib:fref c-%data%
170 (f2cl-lib:fdo
(l 1 (f2cl-lib:int-add l
1))
174 ((/= (f2cl-lib:fref a
(j l
) ((1 lda
) (1 *))) zero
)
177 (f2cl-lib:fref a-%data%
181 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
184 (setf (f2cl-lib:fref c-%data%
189 (f2cl-lib:fref c-%data%
194 (f2cl-lib:fref a-%data%
202 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
207 (f2cl-lib:fdo
(i j
(f2cl-lib:int-add i
1))
210 (setf (f2cl-lib:fref c-%data%
217 (f2cl-lib:fdo
(i j
(f2cl-lib:int-add i
1))
220 (setf (f2cl-lib:fref c-%data%
225 (f2cl-lib:fref c-%data%
230 (f2cl-lib:fdo
(l 1 (f2cl-lib:int-add l
1))
234 ((/= (f2cl-lib:fref a
(j l
) ((1 lda
) (1 *))) zero
)
237 (f2cl-lib:fref a-%data%
241 (f2cl-lib:fdo
(i j
(f2cl-lib:int-add i
1))
244 (setf (f2cl-lib:fref c-%data%
249 (f2cl-lib:fref c-%data%
254 (f2cl-lib:fref a-%data%
264 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
267 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
271 (f2cl-lib:fdo
(l 1 (f2cl-lib:int-add l
1))
277 (f2cl-lib:fref a-%data%
281 (f2cl-lib:fref a-%data%
288 (setf (f2cl-lib:fref c-%data%
294 (setf (f2cl-lib:fref c-%data%
300 (f2cl-lib:fref c-%data%
307 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
310 (f2cl-lib:fdo
(i j
(f2cl-lib:int-add i
1))
314 (f2cl-lib:fdo
(l 1 (f2cl-lib:int-add l
1))
320 (f2cl-lib:fref a-%data%
324 (f2cl-lib:fref a-%data%
331 (setf (f2cl-lib:fref c-%data%
337 (setf (f2cl-lib:fref c-%data%
343 (f2cl-lib:fref c-%data%
351 (return (values nil nil nil nil nil nil nil nil nil nil
))))))
353 (in-package #-gcl
#:cl-user
#+gcl
"CL-USER")
354 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
355 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
356 (setf (gethash 'fortran-to-lisp
::dsyrk fortran-to-lisp
::*f2cl-function-info
*)
357 (fortran-to-lisp::make-f2cl-finfo
358 :arg-types
'((simple-string) (simple-string)
359 (fortran-to-lisp::integer4
) (fortran-to-lisp::integer4
)
360 (double-float) (array double-float
(*))
361 (fortran-to-lisp::integer4
) (double-float)
362 (array double-float
(*)) (fortran-to-lisp::integer4
))
363 :return-values
'(nil nil nil nil nil nil nil nil nil nil
)
364 :calls
'(fortran-to-lisp::xerbla fortran-to-lisp
::lsame
))))