fpt.h
/*
* Copyright (c) 2002, 2017 Jens Keiner, Stefan Kunis, Daniel Potts
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _FPT_H_
#define _FPT_H_
#include <stdbool.h>
void fpt_precompute_1(fpt_set set, const int m, int k_start);
void fpt_precompute_2(fpt_set set, const int m, double *alpha, double *beta, double *gam, int k_start, const double threshold);
typedef struct fpt_step_
{
bool stable;
int Ns;
int ts;
double *a;
// double *a11,*a12,*a21,*a22; /**< The matrix components */
double g;
} fpt_step;
typedef struct fpt_data_
{
fpt_step **steps;
int k_start;
double *alphaN;
double *betaN;
double *gammaN;
double alpha_0;
double beta_0;
double gamma_m1;
/* Data for direct transform. */
double *_alpha;
double *_beta;
double *_gamma;
bool precomputed;
} fpt_data;
typedef struct fpt_set_s_
{
unsigned int flags;
int M;
int N;
int t;
fpt_data *dpt;
double **xcvecs;
double *xc;
double _Complex *temp;
double _Complex *work;
double _Complex *result;
double _Complex *vec3;
double _Complex *vec4;
double _Complex *z;
fftw_plan *plans_dct3;
fftw_plan *plans_dct2;
fftw_r2r_kind *kinds;
fftw_r2r_kind *kindsr;
/* Data for slow transforms. */
double *xc_slow;
} fpt_set_s;
#endif /*_FPT_H_*/
fpt_set
struct fpt_set_s_ * fpt_set
A set of precomputed data for a set of DPT transforms of equal maximum length.
Definition nfft3.h:633
fpt_data_
Holds data for a single cascade summation.
Definition fpt.h:46
fpt_data_::_alpha
double * _alpha
< TODO Add comment here.
Definition fpt.h:56
fpt_data_::_gamma
double * _gamma
TODO Add comment here.
Definition fpt.h:58
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_data_::beta_0
double beta_0
TODO Add comment here.
Definition fpt.h:53
fpt_data_::alphaN
double * alphaN
TODO Add comment here.
Definition fpt.h:49
fpt_data_::betaN
double * betaN
TODO Add comment here.
Definition fpt.h:50
fpt_data_::gamma_m1
double gamma_m1
TODO Add comment here.
Definition fpt.h:54
fpt_data_::alpha_0
double alpha_0
TODO Add comment here.
Definition fpt.h:52
fpt_data_::_beta
double * _beta
TODO Add comment here.
Definition fpt.h:57
fpt_data_::k_start
int k_start
TODO Add comment here.
Definition fpt.h:48
fpt_set_s_
Holds data for a set of cascade summations.
Definition fpt.h:66
fpt_set_s_::t
int t
The exponent of N.
Definition fpt.h:71
fpt_set_s_::xcvecs
double ** xcvecs
Array of pointers to arrays containing the Chebyshev nodes.
Definition fpt.h:73
fpt_set_s_::M
int M
The number of DPT transforms.
Definition fpt.h:68
fpt_set_s_::flags
unsigned int flags
The flags.
Definition fpt.h:67
fpt_set_s_::kinds
fftw_r2r_kind * kinds
Transform kinds for fftw library.
Definition fpt.h:87
fpt_set_s_::xc
double * xc
Array for Chebychev-nodes.
Definition fpt.h:76
fpt_set_s_::plans_dct2
fftw_plan * plans_dct2
Transform plans for the fftw library.
Definition fpt.h:85
fpt_set_s_::dpt
fpt_data * dpt
The DPT transform data.
Definition fpt.h:72
fpt_set_s_::N
int N
The transform length.
Definition fpt.h:69
fpt_set_s_::kindsr
fftw_r2r_kind * kindsr
Transform kinds for fftw library.
Definition fpt.h:89
fpt_set_s_::plans_dct3
fftw_plan * plans_dct3
Transform plans for the fftw library.
Definition fpt.h:83
fpt_step_
Holds data for a single multiplication step in the cascade summation.
Definition fpt.h:31
fpt_step_::a
double * a
The matrix components.
Definition fpt.h:37
fpt_step_::stable
bool stable
Indicates if the values contained represent a fast or a slow stabilized step.
Definition fpt.h:32
fpt_step_::Ns
int Ns
TODO Add comment here.
Definition fpt.h:35
fpt_step_::ts
int ts
TODO Add comment here.
Definition fpt.h:36