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 zhpr2 (uplo n alpha x incx y incy ap
)
23 (declare (type (array f2cl-lib
:complex16
(*)) ap y x
)
24 (type (f2cl-lib:complex16
) alpha
)
25 (type (f2cl-lib:integer4
) 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 (ap f2cl-lib
:complex16 ap-%data% ap-%offset%
))
32 (prog ((i 0) (info 0) (ix 0) (iy 0) (j 0) (jx 0) (jy 0) (k 0) (kk 0)
33 (kx 0) (ky 0) (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 k kk kx ky
)
35 (type (f2cl-lib:complex16
) temp1 temp2
))
38 ((and (not (lsame uplo
"U")) (not (lsame uplo
"L")))
48 (xerbla "ZHPR2 " info
)
50 (if (or (= n
0) (= alpha zero
)) (go end_label
))
52 ((or (/= incx
1) (/= incy
1))
60 (f2cl-lib:int-sub n
1)
69 (f2cl-lib:int-sub n
1)
77 ((and (= incx
1) (= incy
1))
78 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
82 ((or (/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
83 (/= (f2cl-lib:fref y
(j) ((1 *))) zero
))
87 (f2cl-lib:fref y-%data%
95 (f2cl-lib:fref x-%data%
101 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
104 (f2cl-lib:int-sub
1)))
107 (setf (f2cl-lib:fref ap-%data%
112 (f2cl-lib:fref ap-%data%
117 (f2cl-lib:fref x-%data%
123 (f2cl-lib:fref y-%data%
128 (setf k
(f2cl-lib:int-add k
1))
130 (setf (f2cl-lib:fref ap-%data%
132 (f2cl-lib:int-add kk j
)
139 (f2cl-lib:fref ap-%data%
141 (f2cl-lib:int-add kk j
)
148 (f2cl-lib:fref x-%data%
154 (f2cl-lib:fref y-%data%
159 'f2cl-lib
:complex16
)))
161 (setf (f2cl-lib:fref ap-%data%
163 (f2cl-lib:int-add kk j
)
169 (f2cl-lib:fref ap-%data%
171 (f2cl-lib:int-add kk j
)
175 'f2cl-lib
:complex16
))))
176 (setf kk
(f2cl-lib:int-add kk j
))
179 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
183 ((or (/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
184 (/= (f2cl-lib:fref y
(jy) ((1 *))) zero
))
188 (f2cl-lib:fref y-%data%
196 (f2cl-lib:fref x-%data%
200 'f2cl-lib
:complex16
))
203 (f2cl-lib:fdo
(k kk
(f2cl-lib:int-add k
1))
207 (f2cl-lib:int-sub
2)))
210 (setf (f2cl-lib:fref ap-%data%
215 (f2cl-lib:fref ap-%data%
220 (f2cl-lib:fref x-%data%
226 (f2cl-lib:fref y-%data%
231 (setf ix
(f2cl-lib:int-add ix incx
))
232 (setf iy
(f2cl-lib:int-add iy incy
))
234 (setf (f2cl-lib:fref ap-%data%
236 (f2cl-lib:int-add kk j
)
243 (f2cl-lib:fref ap-%data%
245 (f2cl-lib:int-add kk j
)
252 (f2cl-lib:fref x-%data%
258 (f2cl-lib:fref y-%data%
263 'f2cl-lib
:complex16
)))
265 (setf (f2cl-lib:fref ap-%data%
267 (f2cl-lib:int-add kk j
)
273 (f2cl-lib:fref ap-%data%
275 (f2cl-lib:int-add kk j
)
279 'f2cl-lib
:complex16
))))
280 (setf jx
(f2cl-lib:int-add jx incx
))
281 (setf jy
(f2cl-lib:int-add jy incy
))
282 (setf kk
(f2cl-lib:int-add kk j
))
286 ((and (= incx
1) (= incy
1))
287 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
291 ((or (/= (f2cl-lib:fref x
(j) ((1 *))) zero
)
292 (/= (f2cl-lib:fref y
(j) ((1 *))) zero
))
296 (f2cl-lib:fref y-%data%
304 (f2cl-lib:fref x-%data%
308 'f2cl-lib
:complex16
))
309 (setf (f2cl-lib:fref ap-%data%
(kk) ((1 *)) ap-%offset%
)
313 (f2cl-lib:fref ap-%data%
320 (f2cl-lib:fref x-%data%
326 (f2cl-lib:fref y-%data%
331 'f2cl-lib
:complex16
))
332 (setf k
(f2cl-lib:int-add kk
1))
333 (f2cl-lib:fdo
(i (f2cl-lib:int-add j
1)
334 (f2cl-lib:int-add i
1))
337 (setf (f2cl-lib:fref ap-%data%
342 (f2cl-lib:fref ap-%data%
347 (f2cl-lib:fref x-%data%
353 (f2cl-lib:fref y-%data%
358 (setf k
(f2cl-lib:int-add k
1))
361 (setf (f2cl-lib:fref ap-%data%
(kk) ((1 *)) ap-%offset%
)
364 (f2cl-lib:fref ap-%data%
368 'f2cl-lib
:complex16
))))
371 (f2cl-lib:int-sub
(f2cl-lib:int-add kk n
) j
)
375 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
379 ((or (/= (f2cl-lib:fref x
(jx) ((1 *))) zero
)
380 (/= (f2cl-lib:fref y
(jy) ((1 *))) zero
))
384 (f2cl-lib:fref y-%data%
392 (f2cl-lib:fref x-%data%
396 'f2cl-lib
:complex16
))
397 (setf (f2cl-lib:fref ap-%data%
(kk) ((1 *)) ap-%offset%
)
401 (f2cl-lib:fref ap-%data%
408 (f2cl-lib:fref x-%data%
414 (f2cl-lib:fref y-%data%
419 'f2cl-lib
:complex16
))
422 (f2cl-lib:fdo
(k (f2cl-lib:int-add kk
1)
423 (f2cl-lib:int-add k
1))
427 (f2cl-lib:int-sub j
)))
430 (setf ix
(f2cl-lib:int-add ix incx
))
431 (setf iy
(f2cl-lib:int-add iy incy
))
432 (setf (f2cl-lib:fref ap-%data%
437 (f2cl-lib:fref ap-%data%
442 (f2cl-lib:fref x-%data%
448 (f2cl-lib:fref y-%data%
455 (setf (f2cl-lib:fref ap-%data%
(kk) ((1 *)) ap-%offset%
)
458 (f2cl-lib:fref ap-%data%
462 'f2cl-lib
:complex16
))))
463 (setf jx
(f2cl-lib:int-add jx incx
))
464 (setf jy
(f2cl-lib:int-add jy incy
))
467 (f2cl-lib:int-sub
(f2cl-lib:int-add kk n
) j
)
472 (return (values nil nil nil nil nil nil nil nil
))))))
474 (in-package #-gcl
#:cl-user
#+gcl
"CL-USER")
475 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
476 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
477 (setf (gethash 'fortran-to-lisp
::zhpr2 fortran-to-lisp
::*f2cl-function-info
*)
478 (fortran-to-lisp::make-f2cl-finfo
479 :arg-types
'((simple-string) (fortran-to-lisp::integer4
)
480 (fortran-to-lisp::complex16
)
481 (array fortran-to-lisp
::complex16
(*))
482 (fortran-to-lisp::integer4
)
483 (array fortran-to-lisp
::complex16
(*))
484 (fortran-to-lisp::integer4
)
485 (array fortran-to-lisp
::complex16
(*)))
486 :return-values
'(nil nil nil nil nil nil nil nil
)
487 :calls
'(fortran-to-lisp::xerbla fortran-to-lisp
::lsame
))))