--- KLU/Include/klu_version.h.orig 2013-10-24 12:06:25.000000000 -0400 +++ KLU/Include/klu_version.h 2013-10-24 12:08:49.000000000 -0400 @@ -327,8 +327,8 @@ typedef Double_Complex Unit ; #define Entry Double_Complex -#define Real component [0] -#define Imag component [1] +#define RealPart component [0] +#define ImagPart component [1] /* for flop counts */ #define MULTSUB_FLOPS 8. /* c -= a*b */ @@ -342,12 +342,12 @@ /* -------------------------------------------------------------------------- */ /* real part of c */ -#define REAL(c) ((c).Real) +#define REAL(c) ((c).RealPart) /* -------------------------------------------------------------------------- */ /* imag part of c */ -#define IMAG(c) ((c).Imag) +#define IMAG(c) ((c).ImagPart) /* -------------------------------------------------------------------------- */ @@ -360,8 +360,8 @@ { \ if (split) \ { \ - (c).Real = (s1)[p] ; \ - (c).Imag = (s2)[p] ; \ + (c).RealPart = (s1)[p] ; \ + (c).ImagPart = (s2)[p] ; \ } \ else \ { \ @@ -372,15 +372,15 @@ /* -------------------------------------------------------------------------- */ #define CONJ(a, x) \ { \ - a.Real = x.Real ; \ - a.Imag = -x.Imag ; \ + a.RealPart = x.RealPart ; \ + a.ImagPart = -x.ImagPart ; \ } /* c = 0 */ #define CLEAR(c) \ { \ - (c).Real = 0. ; \ - (c).Imag = 0. ; \ + (c).RealPart = 0. ; \ + (c).ImagPart = 0. ; \ } /* -------------------------------------------------------------------------- */ @@ -388,8 +388,8 @@ /* *p++ = 0 */ #define CLEAR_AND_INCREMENT(p) \ { \ - p->Real = 0. ; \ - p->Imag = 0. ; \ + p->RealPart = 0. ; \ + p->ImagPart = 0. ; \ p++ ; \ } @@ -397,34 +397,34 @@ /* True if a == 0 */ #define IS_ZERO(a) \ - (SCALAR_IS_ZERO ((a).Real) && SCALAR_IS_ZERO ((a).Imag)) + (SCALAR_IS_ZERO ((a).RealPart) && SCALAR_IS_ZERO ((a).ImagPart)) /* -------------------------------------------------------------------------- */ /* True if a is NaN */ #define IS_NAN(a) \ - (SCALAR_IS_NAN ((a).Real) || SCALAR_IS_NAN ((a).Imag)) + (SCALAR_IS_NAN ((a).RealPart) || SCALAR_IS_NAN ((a).ImagPart)) /* -------------------------------------------------------------------------- */ /* True if a != 0 */ #define IS_NONZERO(a) \ - (SCALAR_IS_NONZERO ((a).Real) || SCALAR_IS_NONZERO ((a).Imag)) + (SCALAR_IS_NONZERO ((a).RealPart) || SCALAR_IS_NONZERO ((a).ImagPart)) /* -------------------------------------------------------------------------- */ /* a = c/s */ #define SCALE_DIV_ASSIGN(a,c,s) \ { \ - a.Real = c.Real / s ; \ - a.Imag = c.Imag / s ; \ + a.RealPart = c.RealPart / s ; \ + a.ImagPart = c.ImagPart / s ; \ } /* c /= s */ #define SCALE_DIV(c,s) \ { \ - (c).Real /= (s) ; \ - (c).Imag /= (s) ; \ + (c).RealPart /= (s) ; \ + (c).ImagPart /= (s) ; \ } /* -------------------------------------------------------------------------- */ @@ -432,8 +432,8 @@ /* c *= s */ #define SCALE(c,s) \ { \ - (c).Real *= (s) ; \ - (c).Imag *= (s) ; \ + (c).RealPart *= (s) ; \ + (c).ImagPart *= (s) ; \ } /* -------------------------------------------------------------------------- */ @@ -441,8 +441,8 @@ /* c += a */ #define ASSEMBLE(c,a) \ { \ - (c).Real += (a).Real ; \ - (c).Imag += (a).Imag ; \ + (c).RealPart += (a).RealPart ; \ + (c).ImagPart += (a).ImagPart ; \ } /* -------------------------------------------------------------------------- */ @@ -450,8 +450,8 @@ /* c += *p++ */ #define ASSEMBLE_AND_INCREMENT(c,p) \ { \ - (c).Real += p->Real ; \ - (c).Imag += p->Imag ; \ + (c).RealPart += p->RealPart ; \ + (c).ImagPart += p->ImagPart ; \ p++ ; \ } @@ -460,8 +460,8 @@ /* c -= a */ #define DECREMENT(c,a) \ { \ - (c).Real -= (a).Real ; \ - (c).Imag -= (a).Imag ; \ + (c).RealPart -= (a).RealPart ; \ + (c).ImagPart -= (a).ImagPart ; \ } /* -------------------------------------------------------------------------- */ @@ -470,8 +470,8 @@ #define MULT(c,a,b) \ { \ ASSERT (&(c) != &(a) && &(c) != &(b)) ; \ - (c).Real = (a).Real * (b).Real - (a).Imag * (b).Imag ; \ - (c).Imag = (a).Imag * (b).Real + (a).Real * (b).Imag ; \ + (c).RealPart = (a).RealPart * (b).RealPart - (a).ImagPart * (b).ImagPart ; \ + (c).ImagPart = (a).ImagPart * (b).RealPart + (a).RealPart * (b).ImagPart ; \ } /* -------------------------------------------------------------------------- */ @@ -480,8 +480,8 @@ #define MULT_CONJ(c,a,b) \ { \ ASSERT (&(c) != &(a) && &(c) != &(b)) ; \ - (c).Real = (a).Real * (b).Real + (a).Imag * (b).Imag ; \ - (c).Imag = (a).Imag * (b).Real - (a).Real * (b).Imag ; \ + (c).RealPart = (a).RealPart * (b).RealPart + (a).ImagPart * (b).ImagPart ; \ + (c).ImagPart = (a).ImagPart * (b).RealPart - (a).RealPart * (b).ImagPart ; \ } /* -------------------------------------------------------------------------- */ @@ -490,8 +490,8 @@ #define MULT_SUB(c,a,b) \ { \ ASSERT (&(c) != &(a) && &(c) != &(b)) ; \ - (c).Real -= (a).Real * (b).Real - (a).Imag * (b).Imag ; \ - (c).Imag -= (a).Imag * (b).Real + (a).Real * (b).Imag ; \ + (c).RealPart -= (a).RealPart * (b).RealPart - (a).ImagPart * (b).ImagPart ; \ + (c).ImagPart -= (a).ImagPart * (b).RealPart + (a).RealPart * (b).ImagPart ; \ } /* -------------------------------------------------------------------------- */ @@ -500,8 +500,8 @@ #define MULT_SUB_CONJ(c,a,b) \ { \ ASSERT (&(c) != &(a) && &(c) != &(b)) ; \ - (c).Real -= (a).Real * (b).Real + (a).Imag * (b).Imag ; \ - (c).Imag -= (a).Imag * (b).Real - (a).Real * (b).Imag ; \ + (c).RealPart -= (a).RealPart * (b).RealPart + (a).ImagPart * (b).ImagPart ; \ + (c).ImagPart -= (a).ImagPart * (b).RealPart - (a).RealPart * (b).ImagPart ; \ } /* -------------------------------------------------------------------------- */ @@ -510,8 +510,8 @@ #ifdef MATHWORKS #define DIV(c,a,b) \ { \ - (void) utDivideComplex ((a).Real, (a).Imag, (b).Real, (b).Imag, \ - &((c).Real), &((c).Imag)) ; \ + (void) utDivideComplex ((a).RealPart, (a).ImagPart, (b).RealPart, (b).ImagPart, \ + &((c).RealPart), &((c).ImagPart)) ; \ } #else /* This uses ACM Algo 116, by R. L. Smith, 1962. */ @@ -520,23 +520,23 @@ #define DIV(c,a,b) \ { \ double r, den, ar, ai, br, bi ; \ - br = (b).Real ; \ - bi = (b).Imag ; \ - ar = (a).Real ; \ - ai = (a).Imag ; \ + br = (b).RealPart ; \ + bi = (b).ImagPart ; \ + ar = (a).RealPart ; \ + ai = (a).ImagPart ; \ if (SCALAR_ABS (br) >= SCALAR_ABS (bi)) \ { \ r = bi / br ; \ den = br + r * bi ; \ - (c).Real = (ar + ai * r) / den ; \ - (c).Imag = (ai - ar * r) / den ; \ + (c).RealPart = (ar + ai * r) / den ; \ + (c).ImagPart = (ai - ar * r) / den ; \ } \ else \ { \ r = br / bi ; \ den = r * br + bi ; \ - (c).Real = (ar * r + ai) / den ; \ - (c).Imag = (ai * r - ar) / den ; \ + (c).RealPart = (ar * r + ai) / den ; \ + (c).ImagPart = (ai * r - ar) / den ; \ } \ } #endif @@ -550,21 +550,21 @@ #define RECIPROCAL(c) \ { \ double r, den, cr, ci ; \ - cr = (c).Real ; \ - ci = (c).Imag ; \ + cr = (c).RealPart ; \ + ci = (c).ImagPart ; \ if (SCALAR_ABS (cr) >= SCALAR_ABS (ci)) \ { \ r = ci / cr ; \ den = cr + r * ci ; \ - (c).Real = 1.0 / den ; \ - (c).Imag = - r / den ; \ + (c).RealPart = 1.0 / den ; \ + (c).ImagPart = - r / den ; \ } \ else \ { \ r = cr / ci ; \ den = r * cr + ci ; \ - (c).Real = r / den ; \ - (c).Imag = - 1.0 / den ; \ + (c).RealPart = r / den ; \ + (c).ImagPart = - 1.0 / den ; \ } \ } @@ -575,8 +575,8 @@ #ifdef MATHWORKS #define DIV_CONJ(c,a,b) \ { \ - (void) utDivideComplex ((a).Real, (a).Imag, (b).Real, (-(b).Imag), \ - &((c).Real), &((c).Imag)) ; \ + (void) utDivideComplex ((a).RealPart, (a).ImagPart, (b).RealPart, (-(b).ImagPart), \ + &((c).RealPart), &((c).ImagPart)) ; \ } #else /* This uses ACM Algo 116, by R. L. Smith, 1962. */ @@ -585,23 +585,23 @@ #define DIV_CONJ(c,a,b) \ { \ double r, den, ar, ai, br, bi ; \ - br = (b).Real ; \ - bi = (b).Imag ; \ - ar = (a).Real ; \ - ai = (a).Imag ; \ + br = (b).RealPart ; \ + bi = (b).ImagPart ; \ + ar = (a).RealPart ; \ + ai = (a).ImagPart ; \ if (SCALAR_ABS (br) >= SCALAR_ABS (bi)) \ { \ r = (-bi) / br ; \ den = br - r * bi ; \ - (c).Real = (ar + ai * r) / den ; \ - (c).Imag = (ai - ar * r) / den ; \ + (c).RealPart = (ar + ai * r) / den ; \ + (c).ImagPart = (ai - ar * r) / den ; \ } \ else \ { \ r = br / (-bi) ; \ den = r * br - bi; \ - (c).Real = (ar * r + ai) / den ; \ - (c).Imag = (ai * r - ar) / den ; \ + (c).RealPart = (ar * r + ai) / den ; \ + (c).ImagPart = (ai * r - ar) / den ; \ } \ } #endif @@ -611,7 +611,7 @@ /* approximate absolute value, s = |r|+|i| */ #define APPROX_ABS(s,a) \ { \ - (s) = SCALAR_ABS ((a).Real) + SCALAR_ABS ((a).Imag) ; \ + (s) = SCALAR_ABS ((a).RealPart) + SCALAR_ABS ((a).ImagPart) ; \ } /* -------------------------------------------------------------------------- */ @@ -620,15 +620,15 @@ #ifdef MATHWORKS #define ABS(s,a) \ { \ - (s) = utFdlibm_hypot ((a).Real, (a).Imag) ; \ + (s) = utFdlibm_hypot ((a).RealPart, (a).ImagPart) ; \ } #else /* Ignore NaN case for the double relops ar>=ai and ar+ai==ar. */ #define ABS(s,a) \ { \ double r, ar, ai ; \ - ar = SCALAR_ABS ((a).Real) ; \ - ai = SCALAR_ABS ((a).Imag) ; \ + ar = SCALAR_ABS ((a).RealPart) ; \ + ai = SCALAR_ABS ((a).ImagPart) ; \ if (ar >= ai) \ { \ if (ar + ai == ar) \ @@ -664,25 +664,25 @@ #else #define PRINT_ENTRY(a) \ { \ - if (SCALAR_IS_NONZERO ((a).Real)) \ + if (SCALAR_IS_NONZERO ((a).RealPart)) \ { \ - PRINTF ((" (%g", (a).Real)) ; \ + PRINTF ((" (%g", (a).RealPart)) ; \ } \ else \ { \ PRINTF ((" (0")) ; \ } \ - if (SCALAR_IS_LTZERO ((a).Imag)) \ + if (SCALAR_IS_LTZERO ((a).ImagPart)) \ { \ - PRINTF ((" - %gi)", -(a).Imag)) ; \ + PRINTF ((" - %gi)", -(a).ImagPart)) ; \ } \ - else if (SCALAR_IS_ZERO ((a).Imag)) \ + else if (SCALAR_IS_ZERO ((a).ImagPart)) \ { \ PRINTF ((" + 0i)")) ; \ } \ else \ { \ - PRINTF ((" + %gi)", (a).Imag)) ; \ + PRINTF ((" + %gi)", (a).ImagPart)) ; \ } \ } #endif