aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryye00 <yye00@7daa882c-dc44-4453-834e-278d26b18e6a>2007-10-13 21:58:54 +0000
committeryye00 <yye00@7daa882c-dc44-4453-834e-278d26b18e6a>2007-10-13 21:58:54 +0000
commit66d21077ed2e3427d824691e0f36f650759d2039 (patch)
tree7d0aa8e0be71dc71e229289414f3d4c6d213267f
parenta6877ae3a34dd99c8ae749ceda73cafa984e27d6 (diff)
mismatch in casting caused by bad use of CCTK_Cmplx8/16/32/Abs.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/LocalReduce/trunk@75 7daa882c-dc44-4453-834e-278d26b18e6a
-rw-r--r--src/Norm1Functions.c4
-rw-r--r--src/NormInfFunctions.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Norm1Functions.c b/src/Norm1Functions.c
index 5e4713f..8f2082d 100644
--- a/src/Norm1Functions.c
+++ b/src/Norm1Functions.c
@@ -3306,7 +3306,7 @@ int LocalReduce_Norm1_COMPLEX16(int i, int weight_on, const void * const weight,
#ifdef CCTK_REAL_PRECISION_4
#undef REDUCTION_PREOP_CAST
#define REDUCTION_PREOP_CAST(inval, typed_vdata,sum_indices, out_type) \
- inval = (CCTK_REAL4) (CCTK_Cmplx8Abs(typed_vdata[sum_indices]));
+ inval = (CCTK_REAL4) (CCTK_Cmplx16Abs(typed_vdata[sum_indices]));
#elif CCTK_REAL_PRECISION_8
#undef REDUCTION_PREOP_CAST
#define REDUCTION_PREOP_CAST(inval, typed_vdata,sum_indices, out_type) \
@@ -3314,7 +3314,7 @@ int LocalReduce_Norm1_COMPLEX16(int i, int weight_on, const void * const weight,
#elif CCTK_REAL_PRECISION_16
#undef REDUCTION_PREOP_CAST
#define REDUCTION_PREOP_CAST(inval, typed_vdata,sum_indices, out_type) \
- inval = (CCTK_REAL16) (CCTK_Cmplx32Abs(typed_vdata[sum_indices]));
+ inval = (CCTK_REAL16) (CCTK_Cmplx16Abs(typed_vdata[sum_indices]));
#endif
#define REDUCTION_OPERATION(Norm1, scalar) Norm1 = Norm1 + scalar;
diff --git a/src/NormInfFunctions.c b/src/NormInfFunctions.c
index dee219d..0c61247 100644
--- a/src/NormInfFunctions.c
+++ b/src/NormInfFunctions.c
@@ -3716,7 +3716,7 @@ int LocalReduce_NormInf_COMPLEX16(int i, int weight_on, const void * const weigh
#ifdef CCTK_REAL_PRECISION_4
#undef REDUCTION_PREOP_CAST
#define REDUCTION_PREOP_CAST(inval, typed_vdata,sum_indices, out_type) \
- inval = (CCTK_REAL4) (CCTK_Cmplx8Abs(typed_vdata[sum_indices]));
+ inval = (CCTK_REAL4) (CCTK_Cmplx16Abs(typed_vdata[sum_indices]));
#elif CCTK_REAL_PRECISION_8
#undef REDUCTION_PREOP_CAST
#define REDUCTION_PREOP_CAST(inval, typed_vdata,sum_indices, out_type) \
@@ -3724,7 +3724,7 @@ int LocalReduce_NormInf_COMPLEX16(int i, int weight_on, const void * const weigh
#elif CCTK_REAL_PRECISION_16
#undef REDUCTION_PREOP_CAST
#define REDUCTION_PREOP_CAST(inval, typed_vdata,sum_indices, out_type) \
- inval = (CCTK_REAL16) (CCTK_Cmplx32Abs(typed_vdata[sum_indices]));
+ inval = (CCTK_REAL16) (CCTK_Cmplx16Abs(typed_vdata[sum_indices]));
#endif
#define REDUCTION_OPERATION(NormInf, scalar) NormInf = MAX(NormInf , ABS(scalar));