diff options
Diffstat (limited to 'src/ReductionNorm4.c')
-rw-r--r-- | src/ReductionNorm4.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ReductionNorm4.c b/src/ReductionNorm4.c index 21eae29..2bf4a51 100644 --- a/src/ReductionNorm4.c +++ b/src/ReductionNorm4.c @@ -228,6 +228,7 @@ static int ReductionNorm4 (const cGH *GH, /* macros to complete the ITERATE_ARRAY macro */ #define INITIAL_REDUCTION_VALUE(array) 0 +#define POWER2(x) ((x) * (x)) #define POWER4(x) ((x) * (x) * (x) * (x)) @@ -312,8 +313,8 @@ static int ReductionNorm4 (const cGH *GH, case CCTK_VARIABLE_COMPLEX: #undef REDUCTION_OPERATION -#define REDUCTION_OPERATION(norm4, scalar) norm4 += POWER4 ((scalar).Re) + \ - POWER4 ((scalar).Im) +#define REDUCTION_OPERATION(norm4, scalar) \ + norm4 += POWER2 (POWER2 ((scalar).Re) + POWER2 ((scalar).Im)) ITERATE_ARRAY (CCTK_COMPLEX, num_dims, inarrays[i], from, to, iterator, points_per_dim, CCTK_REAL, outvals, num_outvals, total_outvals); |