zla_wwaddw.c
Go to the documentation of this file.
00001 /* zla_wwaddw.f -- translated by f2c (version 20061008).
00002    You must link the resulting object file with libf2c:
00003         on Microsoft Windows system, link with libf2c.lib;
00004         on Linux or Unix systems, link with .../path/to/libf2c.a -lm
00005         or, if you install libf2c.a in a standard place, with -lf2c -lm
00006         -- in that order, at the end of the command line, as in
00007                 cc *.o -lf2c -lm
00008         Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
00009 
00010                 http://www.netlib.org/f2c/libf2c.zip
00011 */
00012 
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015 
00016 /* Subroutine */ int zla_wwaddw__(integer *n, doublecomplex *x, doublecomplex 
00017         *y, doublecomplex *w)
00018 {
00019     /* System generated locals */
00020     integer i__1, i__2, i__3, i__4, i__5;
00021     doublecomplex z__1, z__2, z__3;
00022 
00023     /* Local variables */
00024     integer i__;
00025     doublecomplex s;
00026 
00027 
00028 /*     -- LAPACK routine (version 3.2)                                 -- */
00029 /*     -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and -- */
00030 /*     -- Jason Riedy of Univ. of California Berkeley.                 -- */
00031 /*     -- November 2008                                                -- */
00032 
00033 /*     -- LAPACK is a software package provided by Univ. of Tennessee, -- */
00034 /*     -- Univ. of California Berkeley and NAG Ltd.                    -- */
00035 
00036 /*     .. */
00037 /*     .. Scalar Arguments .. */
00038 /*     .. */
00039 /*     .. Array Arguments .. */
00040 /*     .. */
00041 
00042 /*     Purpose */
00043 /*     ======= */
00044 
00045 /*     ZLA_WWADDW adds a vector W into a doubled-single vector (X, Y). */
00046 
00047 /*     This works for all extant IBM's hex and binary floating point */
00048 /*     arithmetics, but not for decimal. */
00049 
00050 /*     Arguments */
00051 /*     ========= */
00052 
00053 /*     N      (input) INTEGER */
00054 /*            The length of vectors X, Y, and W. */
00055 
00056 /*     X, Y   (input/output) COMPLEX*16 array, length N */
00057 /*            The doubled-single accumulation vector. */
00058 
00059 /*     W      (input) COMPLEX*16 array, length N */
00060 /*            The vector to be added. */
00061 /*     .. */
00062 /*     .. Local Scalars .. */
00063 /*     .. */
00064 /*     .. Executable Statements .. */
00065     /* Parameter adjustments */
00066     --w;
00067     --y;
00068     --x;
00069 
00070     /* Function Body */
00071     i__1 = *n;
00072     for (i__ = 1; i__ <= i__1; ++i__) {
00073         i__2 = i__;
00074         i__3 = i__;
00075         z__1.r = x[i__2].r + w[i__3].r, z__1.i = x[i__2].i + w[i__3].i;
00076         s.r = z__1.r, s.i = z__1.i;
00077         z__2.r = s.r + s.r, z__2.i = s.i + s.i;
00078         z__1.r = z__2.r - s.r, z__1.i = z__2.i - s.i;
00079         s.r = z__1.r, s.i = z__1.i;
00080         i__2 = i__;
00081         i__3 = i__;
00082         z__3.r = x[i__3].r - s.r, z__3.i = x[i__3].i - s.i;
00083         i__4 = i__;
00084         z__2.r = z__3.r + w[i__4].r, z__2.i = z__3.i + w[i__4].i;
00085         i__5 = i__;
00086         z__1.r = z__2.r + y[i__5].r, z__1.i = z__2.i + y[i__5].i;
00087         y[i__2].r = z__1.r, y[i__2].i = z__1.i;
00088         i__2 = i__;
00089         x[i__2].r = s.r, x[i__2].i = s.i;
00090 /* L10: */
00091     }
00092     return 0;
00093 } /* zla_wwaddw__ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:56:40