NFFT  3.5.0
fpt.h
1 /*
2  * Copyright (c) 2002, 2017 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 #ifndef _FPT_H_
20 #define _FPT_H_
21 
22 #include <stdbool.h>
23 
24 void fpt_precompute_1(fpt_set set, const int m, int k_start);
25 void fpt_precompute_2(fpt_set set, const int m, double *alpha, double *beta, double *gam, int k_start, const double threshold);
26 
30 typedef struct fpt_step_
31 {
32  bool stable;
35  int Ns;
36  int ts;
37  double *a;
38 // double *a11,*a12,*a21,*a22; /**< The matrix components */
39  double g;
40 } fpt_step;
41 
45 typedef struct fpt_data_
46 {
48  int k_start;
49  double *alphaN;
50  double *betaN;
51  double *gammaN;
52  double alpha_0;
53  double beta_0;
54  double gamma_m1;
55  /* Data for direct transform. */
56  double *_alpha;
57  double *_beta;
58  double *_gamma;
59  bool precomputed;
60 } fpt_data;
61 
65 typedef struct fpt_set_s_
66 {
67  unsigned int flags;
68  int M;
69  int N;
71  int t;
73  double **xcvecs;
76  double *xc;
77  double _Complex *temp;
78  double _Complex *work;
79  double _Complex *result;
80  double _Complex *vec3;
81  double _Complex *vec4;
82  double _Complex *z;
83  fftw_plan *plans_dct3;
85  fftw_plan *plans_dct2;
87  fftw_r2r_kind *kinds;
89  fftw_r2r_kind *kindsr;
92  /* Data for slow transforms. */
93  double *xc_slow;
94 } fpt_set_s;
95 
96 #endif /*_FPT_H_*/
Holds data for a single multiplication step in the cascade summation.
Definition: fpt.h:30
bool stable
Indicates if the values contained represent a fast or a slow stabilized step.
Definition: fpt.h:32
double * a
The matrix components.
Definition: fpt.h:37
int M
The number of DPT transforms.
Definition: fpt.h:68
fftw_plan * plans_dct2
Transform plans for the fftw library.
Definition: fpt.h:85
double * _alpha
< TODO Add comment here.
Definition: fpt.h:56
fftw_plan * plans_dct3
Transform plans for the fftw library.
Definition: fpt.h:83
double alpha_0
TODO Add comment here.
Definition: fpt.h:52
int t
The exponent of N.
Definition: fpt.h:71
Holds data for a set of cascade summations.
Definition: fpt.h:65
double * gammaN
TODO Add comment here.
Definition: fpt.h:51
fpt_step ** steps
The cascade summation steps.
Definition: fpt.h:47
int N
The transform length.
Definition: fpt.h:69
Holds data for a single cascade summation.
Definition: fpt.h:45
int Ns
TODO Add comment here.
Definition: fpt.h:35
double * _beta
TODO Add comment here.
Definition: fpt.h:57
double beta_0
TODO Add comment here.
Definition: fpt.h:53
fftw_r2r_kind * kinds
Transform kinds for fftw library.
Definition: fpt.h:87
double * _gamma
TODO Add comment here.
Definition: fpt.h:58
unsigned int flags
The flags.
Definition: fpt.h:67
double gamma_m1
TODO Add comment here.
Definition: fpt.h:54
double ** xcvecs
Array of pointers to arrays containing the Chebyshev nodes.
Definition: fpt.h:73
int k_start
TODO Add comment here.
Definition: fpt.h:48
double * alphaN
TODO Add comment here.
Definition: fpt.h:49
fftw_r2r_kind * kindsr
Transform kinds for fftw library.
Definition: fpt.h:89
int ts
TODO Add comment here.
Definition: fpt.h:36
double * betaN
TODO Add comment here.
Definition: fpt.h:50
fpt_data * dpt
The DPT transform data.
Definition: fpt.h:72
double * xc
Array for Chebychev-nodes.
Definition: fpt.h:76