MIDAPACK - MIcrowave Data Analysis PACKage  1.1b
Parallel software tools for high performance CMB DA analysis
toeplitz_params.c
Go to the documentation of this file.
1 
72 #include "toeplitz.h"
73 
74 
75 // r1.1 - Frederic Dauvergne (APC)
76 // This is some routines to set the flag strategy parameters
77 
78 // todo:
79 //- add some routines to estimate the best choice strategy when automatic
80 // parameters are choosen.
81 
82 //=========================================================================
83 
85 
88 int flag_stgy_init_auto(Flag *flag_stgy) {
89  static const Flag z = {0};
90  *flag_stgy = z;
91 
92  flag_stgy->flag_fftw = FLAG_FFTW;
93  // flag_stgy->flag_verbose=FLAG_VERBOSE;
94 
95  return 0;
96 }
97 
98 
99 //=========================================================================
100 
102 
105 int flag_stgy_init_zeros(Flag *flag_stgy) {
106  static const Flag z = {0};
107  *flag_stgy = z;
108 
109  return 0;
110 }
111 
112 
113 //=========================================================================
114 
116 
119 int flag_stgy_init_defined(Flag *flag_stgy) {
120 
121  flag_stgy->flag_bs =
122  FLAG_BS; // 0:auto 1:fixed 2:zero 3:3lambda 4:4lambda 5:formula2
123  flag_stgy->flag_nfft =
124  FLAG_NFFT; // 0:auto 1:fixed 2:numthreads 3:fftwthreads
125  flag_stgy->flag_fftw = FLAG_FFTW;
126  flag_stgy->flag_no_rshp = FLAG_NO_RSHP; // 0:auto 1:yes 1:no
127  flag_stgy->flag_nofft = FLAG_NOFFT; // 0:auto 1:yes 1:no
128  flag_stgy->flag_blockingcomm =
129  FLAG_BLOCKINGCOMM; // 0:auto 1:noblocking 2:blocking
130  // 3:blocking_nooptim
131  flag_stgy->fixed_nfft = FIXED_NFFT; // fixed init value for nfft
132  flag_stgy->fixed_bs = FIXED_BS; // fixed init value for blockside
133  flag_stgy->flag_verbose = FLAG_VERBOSE;
134  flag_stgy->flag_skip_build_gappy_blocks = FLAG_SKIP_BUILD_GAPPY_BLOCKS;
135  flag_stgy->flag_param_distmin_fixed = FLAG_PARAM_DISTMIN_FIXED;
136  flag_stgy->flag_precompute_lvl = FLAG_PRECOMPUTE_LVL;
137  return 0;
138 }
139 
140 
141 //=========================================================================
142 
144 
147 int print_flag_stgy_init(Flag flag_stgy) {
148 
149  FILE *file;
150  file = stdout;
151 
152  fprintf(file, "flag_bs=%d\n", flag_stgy.flag_bs);
153  fprintf(file, "flag_nfft=%d\n", flag_stgy.flag_nfft);
154  fprintf(file, "flag_fftw=%d\n", flag_stgy.flag_fftw);
155  fprintf(file, "flag_no_rshp=%d\n", flag_stgy.flag_no_rshp);
156  fprintf(file, "flag_nofft=%d\n", flag_stgy.flag_nofft);
157  fprintf(file, "flag_blockingcomm=%d\n", flag_stgy.flag_blockingcomm);
158  fprintf(file, "fixed_nfft=%d\n", flag_stgy.fixed_nfft);
159  fprintf(file, "fixed_bs=%d\n", flag_stgy.fixed_bs);
160  fprintf(file, "flag_verbose=%d\n", flag_stgy.flag_verbose);
161  fprintf(file, "flag_skip_build_gappy_blocks=%d\n",
162  flag_stgy.flag_skip_build_gappy_blocks);
163  fprintf(file, "flag_param_distmin_fixed=%d\n",
164  flag_stgy.flag_param_distmin_fixed);
165  fprintf(file, "flag_precompute_lvl=%d\n", flag_stgy.flag_precompute_lvl);
166 
167  return 0;
168 }
int flag_stgy_init_auto(Flag *flag_stgy)
Set the flag to automatic paramaters.
int print_flag_stgy_init(Flag flag_stgy)
Print the flag parameters values.
int flag_stgy_init_zeros(Flag *flag_stgy)
Set the flag parameters to zeros. This is almost the same as automatic.
int flag_stgy_init_defined(Flag *flag_stgy)
Set the parameters flag to the defined ones.