From 515ef8a4aa32620b6fcf9ff42a1c293159799dee Mon Sep 17 00:00:00 2001 From: Martin Reinecke Date: Fri, 8 Feb 2013 18:30:25 +0100 Subject: [PATCH] use best of several tries for small SHTs --- libsharp/sharp_testsuite.c | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/libsharp/sharp_testsuite.c b/libsharp/sharp_testsuite.c index 5c573b4..fb3441c 100644 --- a/libsharp/sharp_testsuite.c +++ b/libsharp/sharp_testsuite.c @@ -57,10 +57,8 @@ static double drand (double min, double max, int *state) return min + (max-min)*(*state)/(0x7fffffff+1.0); } -static void random_alm (dcmplx *alm, sharp_alm_info *helper, int spin) +static void random_alm (dcmplx *alm, sharp_alm_info *helper, int spin, int cnt) { - static int cnt=0; - ++cnt; #pragma omp parallel { int mi; @@ -459,11 +457,10 @@ static void do_sht (sharp_geom_info *ginfo, sharp_alm_info *ainfo, for (int i=0; i2.) + { + if (mytask==0) printf("Best of %d runs\n",nrpt); + break; + } + DEALLOC(err_abs); + DEALLOC(err_rel); + } if (mytask==0) printf("wall time for alm2map: %fs\n",t_a2m); if (mytask==0) printf("Performance: %fGFLOPs/s\n",1e-9*op_a2m/t_a2m);