NFFT Logo 3.2.3
fastsum.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2002, 2012 Jens Keiner, Stefan Kunis, Daniel Potts
3  *
4  * This program is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU General Public License as published by the Free Software
6  * Foundation; either version 2 of the License, or (at your option) any later
7  * version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12  * details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc., 51
16  * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  */
18 
19 /* $Id: fastsum.h 3896 2012-10-10 12:19:26Z tovo $ */
20 
38 #ifndef fastsum_h_inc
39 #define fastsum_h_inc
40 
41 #include "config.h"
42 
44 #ifdef HAVE_COMPLEX_H
45 #include <complex.h>
46 #endif
47 
48 #include "nfft3util.h"
50 #include "nfft3.h"
51 
52 #if !(defined(NF_LIN) || defined(NF_QUADR) || defined(NF_KUB))
53  #define NF_KUB
54 #endif
55 
56 #ifdef __cplusplus
57 extern "C"
58 {
59 #endif /* __cplusplus */
60 
61 typedef double _Complex (*kernel)(double , int , const double *);
62 
66 #define EXACT_NEARFIELD (1U<< 0)
67 
68 #define NEARFIELD_BOXES (1U<< 1)
69 
71 typedef struct fastsum_plan_
72 {
75  int d;
77  int N_total;
78  int M_total;
80  double _Complex *alpha;
81  double _Complex *f;
83  double *x;
84  double *y;
86  kernel k;
87  double *kernel_param;
89  unsigned flags;
94  double _Complex *pre_K;
97  int n;
98  fftw_complex *b;
100  int p;
101  double eps_I; /* fixed to p/n so far */
102  double eps_B; /* fixed to 1/16 so far */
103 
108  int Ad;
109  double _Complex *Add;
111  /* things for computing *b - are they used only once?? */
112  fftw_plan fft_plan;
113 
114  int box_count;
115  int box_count_per_dim;
116  int *box_offset;
117  double *box_x;
118  double _Complex *box_alpha;
119 
120  double MEASURE_TIME_t[8];
121 } fastsum_plan;
122 
139 void fastsum_init_guru(fastsum_plan *ths, int d, int N_total, int M_total, kernel k, double *param, unsigned flags, int nn, int m, int p, double eps_I, double eps_B);
140 
145 void fastsum_finalize(fastsum_plan *ths);
146 
151 void fastsum_exact(fastsum_plan *ths);
152 
158 
163 void fastsum_trafo(fastsum_plan *ths);
164 /* \} */
165 
166 double _Complex regkern(kernel k, double xx, int p, const double *param, double a, double b);
167 
169 double _Complex kubintkern(const double x, const double _Complex *Add,
170  const int Ad, const double a);
171 
172 #ifdef __cplusplus
173 } /* extern "C" */
174 #endif /* __cplusplus */
175 
176 #endif
177 /* fastsum.h */

Generated on Tue Apr 30 2013 by Doxygen 1.8.1