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* ((zero (f2cl-lib:cmplx
0.0 0.0)))
21 (declare (type (f2cl-lib:complex16
) zero
) (ignorable zero
))
22 (defun zher2 (uplo n alpha x incx y incy a lda
)
23 (declare (type (array f2cl-lib
:complex16
(*)) a y x
)
24 (type (f2cl-lib:complex16
) alpha
)
25 (type (f2cl-lib:integer4
) lda incy incx n
)
26 (type (simple-string *) uplo
))
27 (f2cl-lib:with-multi-array-data
28 ((uplo character uplo-%data% uplo-%offset%
)
29 (x f2cl-lib
:complex16 x-%data% x-%offset%
)
30 (y f2cl-lib
:complex16 y-%data% y-%offset%
)
31 (a f2cl-lib
:complex16 a-%data% a-%offset%
))
32 (prog ((i 0) (info 0) (ix 0) (iy 0) (j 0) (jx 0) (jy 0) (kx 0) (ky 0)
33 (temp1 #C
(0.0
0.0)) (temp2 #C
(0.0
0.0)))
34 (declare (type (f2cl-lib:integer4
) i info ix iy j jx jy kx ky
)
35 (type (f2cl-lib:complex16
) temp1 temp2
))
38 ((and (not (lsame uplo
"U")) (not (lsame uplo
"L")))
46 ((< lda
(max (the f2cl-lib
:integer4
1) (the f2cl-lib
:integer4 n
)))
50 (xerbla "ZHER2 " info
)
52 (if (or (= n
0) (= alpha zero
)) (go end_label
))
54 ((or (/= incx
1) (/= incy
1))
62 (f2cl-lib:int-sub n
1)
71 (f2cl-lib:int-sub n
1)
78 ((and (= incx
1) (= incy
1))
79 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
83 ((or (/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
84 (/= (f2cl-lib:fref y
(j) ((1 *))) zero
))
88 (f2cl-lib:fref y-%data%
96 (f2cl-lib:fref x-%data%
100 'f2cl-lib
:complex16
))
101 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
104 (f2cl-lib:int-sub
1)))
107 (setf (f2cl-lib:fref a-%data%
112 (f2cl-lib:fref a-%data%
117 (f2cl-lib:fref x-%data%
123 (f2cl-lib:fref y-%data%
129 (setf (f2cl-lib:fref a-%data%
136 (f2cl-lib:fref a-%data%
143 (f2cl-lib:fref x-%data%
149 (f2cl-lib:fref y-%data%
154 'f2cl-lib
:complex16
)))
156 (setf (f2cl-lib:fref a-%data%
162 (f2cl-lib:fref a-%data%
166 'f2cl-lib
:complex16
))))
169 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
173 ((or (/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
174 (/= (f2cl-lib:fref y
(jy) ((1 *))) zero
))
178 (f2cl-lib:fref y-%data%
186 (f2cl-lib:fref x-%data%
190 'f2cl-lib
:complex16
))
193 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
196 (f2cl-lib:int-sub
1)))
199 (setf (f2cl-lib:fref a-%data%
204 (f2cl-lib:fref a-%data%
209 (f2cl-lib:fref x-%data%
215 (f2cl-lib:fref y-%data%
220 (setf ix
(f2cl-lib:int-add ix incx
))
221 (setf iy
(f2cl-lib:int-add iy incy
))
223 (setf (f2cl-lib:fref a-%data%
230 (f2cl-lib:fref a-%data%
237 (f2cl-lib:fref x-%data%
243 (f2cl-lib:fref y-%data%
248 'f2cl-lib
:complex16
)))
250 (setf (f2cl-lib:fref a-%data%
256 (f2cl-lib:fref a-%data%
260 'f2cl-lib
:complex16
))))
261 (setf jx
(f2cl-lib:int-add jx incx
))
262 (setf jy
(f2cl-lib:int-add jy incy
))
266 ((and (= incx
1) (= incy
1))
267 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
271 ((or (/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
272 (/= (f2cl-lib:fref y
(j) ((1 *))) zero
))
276 (f2cl-lib:fref y-%data%
284 (f2cl-lib:fref x-%data%
288 'f2cl-lib
:complex16
))
289 (setf (f2cl-lib:fref a-%data%
296 (f2cl-lib:fref a-%data%
303 (f2cl-lib:fref x-%data%
309 (f2cl-lib:fref y-%data%
314 'f2cl-lib
:complex16
))
315 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
316 (f2cl-lib:int-add i
1))
319 (setf (f2cl-lib:fref a-%data%
324 (f2cl-lib:fref a-%data%
329 (f2cl-lib:fref x-%data%
335 (f2cl-lib:fref y-%data%
342 (setf (f2cl-lib:fref a-%data%
348 (f2cl-lib:fref a-%data%
352 'f2cl-lib
:complex16
))))
355 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
359 ((or (/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
360 (/= (f2cl-lib:fref y
(jy) ((1 *))) zero
))
364 (f2cl-lib:fref y-%data%
372 (f2cl-lib:fref x-%data%
376 'f2cl-lib
:complex16
))
377 (setf (f2cl-lib:fref a-%data%
384 (f2cl-lib:fref a-%data%
391 (f2cl-lib:fref x-%data%
397 (f2cl-lib:fref y-%data%
402 'f2cl-lib
:complex16
))
405 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
406 (f2cl-lib:int-add i
1))
409 (setf ix
(f2cl-lib:int-add ix incx
))
410 (setf iy
(f2cl-lib:int-add iy incy
))
411 (setf (f2cl-lib:fref a-%data%
416 (f2cl-lib:fref a-%data%
421 (f2cl-lib:fref x-%data%
427 (f2cl-lib:fref y-%data%
434 (setf (f2cl-lib:fref a-%data%
440 (f2cl-lib:fref a-%data%
444 'f2cl-lib
:complex16
))))
445 (setf jx
(f2cl-lib:int-add jx incx
))
446 (setf jy
(f2cl-lib:int-add jy incy
))
450 (return (values nil nil nil nil nil nil nil nil nil
))))))
452 (in-package #-gcl
#:cl-user
#+gcl
"CL-USER")
453 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
454 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
455 (setf (gethash 'fortran-to-lisp
::zher2 fortran-to-lisp
::*f2cl-function-info
*)
456 (fortran-to-lisp::make-f2cl-finfo
457 :arg-types
'((simple-string) (fortran-to-lisp::integer4
)
458 (fortran-to-lisp::complex16
)
459 (array fortran-to-lisp
::complex16
(*))
460 (fortran-to-lisp::integer4
)
461 (array fortran-to-lisp
::complex16
(*))
462 (fortran-to-lisp::integer4
)
463 (array fortran-to-lisp
::complex16
(*))
464 (fortran-to-lisp::integer4
))
465 :return-values
'(nil nil nil nil nil nil nil nil nil
)
466 :calls
'(fortran-to-lisp::xerbla fortran-to-lisp
::lsame
))))