| NFFT 3.5.0

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

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 {
47 fpt_step **steps;
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;
72 fpt_data *dpt;
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_*/
fpt_step_
Holds data for a single multiplication step in the cascade summation.
Definition: fpt.h:30
fpt_step_::stable
bool stable
Indicates if the values contained represent a fast or a slow stabilized step.
Definition: fpt.h:32
fpt_step_::a
double * a
The matrix components.
Definition: fpt.h:37
fpt_set_s_::M
int M
The number of DPT transforms.
Definition: fpt.h:68
fpt_set_s_::plans_dct2
fftw_plan * plans_dct2
Transform plans for the fftw library.
Definition: fpt.h:85
fpt_data_::_alpha
double * _alpha
< TODO Add comment here.
Definition: fpt.h:56
fpt_set_s_::plans_dct3
fftw_plan * plans_dct3
Transform plans for the fftw library.
Definition: fpt.h:83
fpt_data_::alpha_0
double alpha_0
TODO Add comment here.
Definition: fpt.h:52
fpt_set_s_::t
int t
The exponent of N.
Definition: fpt.h:71
fpt_set_s_
Holds data for a set of cascade summations.
Definition: fpt.h:65
fpt_data_::gammaN
double * gammaN
TODO Add comment here.
Definition: fpt.h:51
fpt_data_::steps
fpt_step ** steps
The cascade summation steps.
Definition: fpt.h:47
fpt_set_s_::N
int N
The transform length.
Definition: fpt.h:69
fpt_data_
Holds data for a single cascade summation.
Definition: fpt.h:45
fpt_step_::Ns
int Ns
TODO Add comment here.
Definition: fpt.h:35
fpt_data_::_beta
double * _beta
TODO Add comment here.
Definition: fpt.h:57
fpt_data_::beta_0
double beta_0
TODO Add comment here.
Definition: fpt.h:53
fpt_set_s_::kinds
fftw_r2r_kind * kinds
Transform kinds for fftw library.
Definition: fpt.h:87
fpt_data_::_gamma
double * _gamma
TODO Add comment here.
Definition: fpt.h:58
fpt_set_s_::flags
unsigned int flags
The flags.
Definition: fpt.h:67
fpt_data_::gamma_m1
double gamma_m1
TODO Add comment here.
Definition: fpt.h:54
fpt_set_s_::xcvecs
double ** xcvecs
Array of pointers to arrays containing the Chebyshev nodes.
Definition: fpt.h:73
fpt_data_::k_start
int k_start
TODO Add comment here.
Definition: fpt.h:48
fpt_data_::alphaN
double * alphaN
TODO Add comment here.
Definition: fpt.h:49
fpt_set_s_::kindsr
fftw_r2r_kind * kindsr
Transform kinds for fftw library.
Definition: fpt.h:89
fpt_step_::ts
int ts
TODO Add comment here.
Definition: fpt.h:36
fpt_data_::betaN
double * betaN
TODO Add comment here.
Definition: fpt.h:50
fpt_set_s_::dpt
fpt_data * dpt
The DPT transform data.
Definition: fpt.h:72
fpt_set_s_::xc
double * xc
Array for Chebychev-nodes.
Definition: fpt.h:76