NFFT Logo 3.1.2 API Reference

nfft3.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2002, 2009 Jens Keiner, Stefan Kunis, Daniel Potts
00003  *
00004  * This program is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU General Public License as published by the Free Software
00006  * Foundation; either version 2 of the License, or (at your option) any later
00007  * version.
00008  *
00009  * This program is distributed in the hope that it will be useful, but WITHOUT
00010  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00011  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
00012  * details.
00013  *
00014  * You should have received a copy of the GNU General Public License along with
00015  * this program; if not, write to the Free Software Foundation, Inc., 51
00016  * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  */
00018 
00019 /* $Id: nfft3.h 3319 2009-09-08 15:08:05Z kunis $ */
00020 
00024 #ifndef __NFFT3_H__
00025 #define __NFFT3_H__
00026 
00028 #include <fftw3.h>
00029 
00030 /* config header */
00031 #include "nfft3conf.h"
00032 
00033 /* Malloc and free functions */
00034 extern void *nfft_malloc(size_t n);
00035 extern void nfft_free(void *p);
00036 extern void nfft_die(const char *s);
00037 
00038 /* Malloc and free hooks */
00039 typedef void *(*nfft_malloc_type_function) (size_t n);
00040 typedef void  (*nfft_free_type_function) (void *p);
00041 typedef void  (*nfft_die_type_function) (const char *errString);
00042 extern nfft_malloc_type_function nfft_malloc_hook;
00043 extern nfft_free_type_function nfft_free_hook;
00044 extern nfft_die_type_function nfft_die_hook;
00045 
00047 #define MACRO_MV_PLAN(float_type)                                             \
00048   int N_total;                          \
00050   int M_total;                          \
00051                                                                               \
00052   float_type *f_hat;                    \
00054   float_type *f;                        \
00056   void (*mv_trafo)(void*);              \
00057   void (*mv_adjoint)(void*);            \
00058 
00059 typedef struct
00060 {
00061   MACRO_MV_PLAN(fftw_complex)
00062 } mv_plan_complex;
00063 
00064 typedef struct
00065 {
00066   MACRO_MV_PLAN(double)
00067 } mv_plan_double;
00068 
00069 /*###########################################################################*/
00070 /*###########################################################################*/
00071 /*###########################################################################*/
00072 
00120 /* Planner flags, i.e. constant symbols for precomputation and memory usage */
00121 
00132 #define PRE_PHI_HUT      (1U<< 0)
00133 
00145 #define FG_PSI           (1U<< 1)
00146 
00162 #define PRE_LIN_PSI      (1U<< 2)
00163 
00175 #define PRE_FG_PSI       (1U<< 3)
00176 
00187 #define PRE_PSI          (1U<< 4)
00188 
00200 #define PRE_FULL_PSI     (1U<< 5)
00201 
00211 #define MALLOC_X         (1U<< 6)
00212 
00223 #define MALLOC_F_HAT     (1U<< 7)
00224 
00234 #define MALLOC_F         (1U<< 8)
00235 
00245 #define FFT_OUT_OF_PLACE (1U<< 9)
00246 
00256 #define FFTW_INIT        (1U<< 10)
00257 
00271 #define PRE_ONE_PSI (PRE_LIN_PSI| PRE_FG_PSI| PRE_PSI| PRE_FULL_PSI)
00272 
00274 typedef struct
00275 {
00276   /* api */
00277   MACRO_MV_PLAN(fftw_complex)
00278 
00279   int d;                                
00280   int *N;                               
00281   double *sigma;                        
00282   int *n;                               
00285   int n_total;                          
00286   int m;                                
00292   double *b;                            
00294   int K;                                
00298   unsigned nfft_flags;                  
00305   unsigned fftw_flags;                  
00309   double *x;                            
00312   double MEASURE_TIME_t[3];             
00315   /* internal*/
00316   fftw_plan  my_fftw_plan1;             
00317   fftw_plan  my_fftw_plan2;             
00319   double **c_phi_inv;                   
00322   double *psi;                          
00325   int *psi_index_g;                     
00327   int *psi_index_f;                     
00330   fftw_complex *g;                    
00333   fftw_complex *g_hat;                
00336   fftw_complex *g1;                   
00337   fftw_complex *g2;                   
00339   double *spline_coeffs;                
00342 } nfft_plan;
00343 
00344 
00352 void ndft_trafo(nfft_plan *ths);
00353 
00361 void ndft_adjoint(nfft_plan *ths);
00362 
00370 void nfft_trafo(nfft_plan *ths);
00371 void nfft_trafo_1d(nfft_plan *ths);
00372 void nfft_trafo_2d(nfft_plan *ths);
00373 void nfft_trafo_3d(nfft_plan *ths);
00374 
00382 void nfft_adjoint(nfft_plan *ths);
00383 void nfft_adjoint_1d(nfft_plan *ths);
00384 void nfft_adjoint_2d(nfft_plan *ths);
00385 void nfft_adjoint_3d(nfft_plan *ths);
00386 
00396 void nfft_init_1d(nfft_plan *ths, int N1, int M);
00397 
00408 void nfft_init_2d(nfft_plan *ths, int N1, int N2, int M);
00409 
00421 void nfft_init_3d(nfft_plan *ths, int N1, int N2, int N3, int M);
00422 
00433 void nfft_init(nfft_plan *ths, int d, int *N, int M);
00434 
00448 void nfft_init_advanced(nfft_plan *ths, int d, int *N, int M,
00449                         unsigned nfft_flags_on, unsigned nfft_flags_off);
00450 
00465 void nfft_init_guru(nfft_plan *ths, int d, int *N, int M, int *n,
00466                     int m, unsigned nfft_flags, unsigned fftw_flags);
00467 
00468 
00481 void nfft_precompute_one_psi(nfft_plan *ths);
00482 
00487 void nfft_precompute_full_psi(nfft_plan *ths);
00488 
00493 void nfft_precompute_psi(nfft_plan *ths);
00494 
00499 void nfft_precompute_lin_psi(nfft_plan *ths);
00500 
00508 void nfft_check(nfft_plan *ths);
00509 
00517 void nfft_finalize(nfft_plan *ths);
00518 
00522 /*###########################################################################*/
00523 /*###########################################################################*/
00524 /*###########################################################################*/
00525 
00532 #ifdef HAVE_NFCT
00533 
00535 typedef struct
00536 {
00537   /* api */
00538   MACRO_MV_PLAN(double)
00539 
00540   int d;                                
00541   int *N;                               
00542   int *n;                               
00543   double *sigma;                        
00544   int m;                                
00546   double nfct_full_psi_eps;
00547   double *b;                            
00549   unsigned nfct_flags;                  
00550   unsigned fftw_flags;                  
00552   double *x;                            
00554   double MEASURE_TIME_t[3];             
00557   fftw_plan  my_fftw_r2r_plan;          
00558   fftw_r2r_kind *r2r_kind;              
00560   double **c_phi_inv;                   
00561   double *psi;                          
00562   int size_psi;                         
00563   int *psi_index_g;                     
00564   int *psi_index_f;                     
00566   double *g;
00567   double *g_hat;
00568   double *g1;                           
00569   double *g2;                           
00571   double *spline_coeffs;                
00573 } nfct_plan;
00574 
00575 
00585 void nfct_init_1d( nfct_plan *ths_plan, int N0, int M_total);
00586 
00597 void nfct_init_2d( nfct_plan *ths_plan, int N0, int N1, int M_total);
00598 
00610 void nfct_init_3d( nfct_plan *ths_plan, int N0, int N1, int N2, int M_total);
00611 
00622 void nfct_init( nfct_plan *ths_plan, int d, int *N, int M_total);
00623 
00638 void nfct_init_guru( nfct_plan *ths_plan, int d, int *N, int M_total, int *n,
00639                          int m, unsigned nfct_flags, unsigned fftw_flags);
00640 
00650 void nfct_precompute_psi( nfct_plan *ths_plan);
00651 
00652 
00661 void nfct_trafo( nfct_plan *ths_plan);
00662 
00671 void ndct_trafo( nfct_plan *ths_plan);
00672 
00681 void nfct_adjoint( nfct_plan *ths_plan);
00682 
00691 void ndct_adjoint( nfct_plan *ths_plan);
00692 
00700 void nfct_finalize( nfct_plan *ths_plan);
00701 
00711 double nfct_phi_hut( nfct_plan *ths_plan, int k, int d);
00712 
00722 double nfct_phi ( nfct_plan *ths_plan, double x, int d);
00723 
00731 int nfct_fftw_2N( int n);
00732 
00740 int nfct_fftw_2N_rev(int n);
00741 
00742 #endif
00743 
00744 /*###########################################################################*/
00745 
00746 #ifdef HAVE_NFST
00747 
00749 typedef struct
00750 {
00751   /* api */
00752   MACRO_MV_PLAN(double)
00753 
00754   int d;                                
00755   int *N;                               
00756   int *n;                               
00757   double *sigma;                        
00758   int m;                                
00760   double nfst_full_psi_eps;
00761   double *b;                            
00763   unsigned nfst_flags;                  
00764   unsigned fftw_flags;                  
00766   double *x;                            
00768   double MEASURE_TIME_t[3];             
00771   fftw_plan  my_fftw_r2r_plan;         
00772   fftw_r2r_kind *r2r_kind;              
00774   double **c_phi_inv;                   
00775   double *psi;                          
00776   int size_psi;                         
00777   int *psi_index_g;                     
00778   int *psi_index_f;                     
00781   double *g;
00782   double *g_hat;
00783   double *g1;                           
00784   double *g2;                           
00786   double *spline_coeffs;                
00788 } nfst_plan;
00789 
00790 
00800 void nfst_init_1d( nfst_plan *ths_plan, int N0, int M_total);
00801 
00812 void nfst_init_2d( nfst_plan *ths_plan, int N0, int N1, int M_total);
00813 
00825 void nfst_init_3d( nfst_plan *ths_plan, int N0, int N1, int N2, int M_total);
00826 
00837 void nfst_init( nfst_plan *ths_plan, int d, int *N, int M_total);
00838 
00851 void nfst_init_m( nfst_plan *ths_plan, int d, int *N, int M_total, int m);
00852 
00867 void nfst_init_guru( nfst_plan *ths_plan, int d, int *N, int M_total, int *n,
00868                      int m, unsigned nfst_flags, unsigned fftw_flags);
00869 
00879 void nfst_precompute_psi( nfst_plan *ths_plan);
00880 
00889 void nfst_trafo( nfst_plan *ths_plan);
00890 
00899 void ndst_trafo( nfst_plan *ths_plan);
00900 
00901 
00902 
00911 void nfst_adjoint( nfst_plan *ths_plan);
00912 
00921 void ndst_adjoint( nfst_plan *ths_plan);
00922 
00930 void nfst_finalize( nfst_plan *ths_plan);
00931 
00938 void nfst_full_psi( nfst_plan *ths_plan, double eps);
00939 
00949 double nfst_phi_hut( nfst_plan *ths_plan, int k, int d);
00950 
00960 double nfst_phi ( nfst_plan *ths_plan, double x, int d);
00961 
00969 int nfst_fftw_2N( int n);
00970 
00978 int nfst_fftw_2N_rev( int n);
00979 
00980 #endif
00981 
00985 /*###########################################################################*/
00986 /*###########################################################################*/
00987 /*###########################################################################*/
00988 
00995 #ifdef HAVE_NNFFT
00996 
01005 #define MALLOC_V         (1U<< 11)
01006 
01008 typedef struct
01009 {
01010   /* api */
01011   MACRO_MV_PLAN(fftw_complex)
01012 
01013   int d;                                
01014   double *sigma;                        
01015   double *a;                            
01016   int *N;                               
01017   int *N1;                              
01018   int *aN1;                             
01019   int m;                                
01020   double *b;                            
01021   int K;                                
01023   int aN1_total;                        
01025   nfft_plan *direct_plan;               
01026   unsigned nnfft_flags;                 
01027   int *n;                               
01029   double *x;                            
01030   double *v;                            
01032   double *c_phi_inv;                    
01033   double *psi;                          
01034   int size_psi;                         
01035   int *psi_index_g;                     
01036   int *psi_index_f;                     
01037   fftw_complex *F;
01038 
01039   double *spline_coeffs;                
01041 } nnfft_plan;
01042 
01043 
01055 void nnfft_init(nnfft_plan *ths_plan, int d, int N_total, int M_total, int *N);
01056 
01071 void nnfft_init_guru(nnfft_plan *ths_plan, int d, int N_total, int M_total,
01072                      int *N, int *N1, int m, unsigned nnfft_flags);
01073 
01085 void nndft_trafo(nnfft_plan *ths_plan);
01086 
01098 void nndft_adjoint(nnfft_plan *ths_plan);
01099 
01111 void nnfft_trafo(nnfft_plan *ths_plan);
01112 
01124 void nnfft_adjoint(nnfft_plan *ths_plan);
01125 
01137 void nnfft_precompute_lin_psi(nnfft_plan *ths_plan);
01138 
01151 void nnfft_precompute_psi(nnfft_plan *ths_plan);
01152 
01166 void nnfft_precompute_full_psi(nnfft_plan *ths_plan);
01167 
01180 void nnfft_precompute_phi_hut(nnfft_plan *ths_plan);
01181 
01189 void nnfft_finalize(nnfft_plan *ths_plan);
01190 
01191 #endif
01192 
01196 /*###########################################################################*/
01197 /*###########################################################################*/
01198 /*###########################################################################*/
01199 
01206 #ifdef HAVE_NSFFT
01207 
01216 #define NSDFT            (1U<< 12)
01217 
01219 typedef struct
01220 {
01221   MACRO_MV_PLAN(fftw_complex)
01222 
01223   int d;                                
01224   int J;                                
01228   int sigma;                            
01230   unsigned flags;                       
01232   int *index_sparse_to_full;            
01235   int r_act_nfft_plan;                  
01236   nfft_plan *act_nfft_plan;             
01237   nfft_plan *center_nfft_plan;          
01239   fftw_plan* set_fftw_plan1;            
01240   fftw_plan* set_fftw_plan2;            
01242   nfft_plan *set_nfft_plan_1d;          
01243   nfft_plan *set_nfft_plan_2d;          
01245   double *x_transposed;                 
01246   double *x_102,*x_201,*x_120,*x_021;   
01248 } nsfft_plan;
01249 
01260 void nsdft_trafo(nsfft_plan *ths);
01261 
01272 void nsdft_adjoint(nsfft_plan *ths);
01273 
01285 void nsfft_trafo(nsfft_plan *ths);
01286 
01298 void nsfft_adjoint(nsfft_plan *ths);
01299 
01307 void nsfft_cp(nsfft_plan *ths, nfft_plan *ths_nfft);
01308 
01316 void nsfft_init_random_nodes_coeffs(nsfft_plan *ths);
01317 
01330 void nsfft_init(nsfft_plan *ths, int d, int J, int M, int m, unsigned flags);
01331 
01339 void nsfft_finalize(nsfft_plan *ths);
01340 
01341 #endif
01342 
01346 /*###########################################################################*/
01347 /*###########################################################################*/
01348 /*###########################################################################*/
01349 
01354 #ifdef HAVE_MRI
01355 
01359 typedef struct
01360 {
01361   /* api */
01362   MACRO_MV_PLAN(fftw_complex)
01363 
01364   nfft_plan plan;
01365 
01366   int N3;
01367   double sigma3;
01368   double *t;
01369   double *w;
01370 } mri_inh_2d1d_plan;
01371 
01375 typedef struct
01376 {
01377   /* api */
01378   MACRO_MV_PLAN(fftw_complex)
01379 
01380   nfft_plan plan;
01381 
01382   int N3;
01383   double sigma3;
01384   double *t;
01385   double *w;
01386 } mri_inh_3d_plan;
01387 
01388 
01401 void mri_inh_2d1d_trafo(mri_inh_2d1d_plan *ths);
01402 
01415 void mri_inh_2d1d_adjoint(mri_inh_2d1d_plan *ths);
01416 
01430 void mri_inh_2d1d_init_guru(mri_inh_2d1d_plan *ths, int *N, int M, int *n,
01431                     int m, double sigma, unsigned nfft_flags, unsigned fftw_flags);
01432 
01440 void mri_inh_2d1d_finalize(mri_inh_2d1d_plan *ths);
01441 
01454 void mri_inh_3d_trafo(mri_inh_3d_plan *ths);
01455 
01468 void mri_inh_3d_adjoint(mri_inh_3d_plan *ths);
01469 
01470 void mri_inh_3d_init_guru(mri_inh_3d_plan *ths, int *N, int M, int *n,
01471                     int m, double sigma, unsigned nfft_flags, unsigned fftw_flags);
01472 
01480 void mri_inh_3d_finalize(mri_inh_3d_plan *ths);
01481 
01482 #endif
01483 
01487 /*###########################################################################*/
01488 /*###########################################################################*/
01489 /*###########################################################################*/
01490 
01742 #ifdef HAVE_NFSFT
01743 
01744 /* Planner flags */
01745 
01765 #define NFSFT_NORMALIZED    (1U << 0)
01766 
01777 #define NFSFT_USE_NDFT      (1U << 1)
01778 
01790 #define NFSFT_USE_DPT       (1U << 2)
01791 
01805 #define NFSFT_MALLOC_X      (1U << 3)
01806 
01820 #define NFSFT_MALLOC_F_HAT  (1U << 5)
01821 
01835 #define NFSFT_MALLOC_F      (1U << 6)
01836 
01847 #define NFSFT_PRESERVE_F_HAT (1U << 7)
01848 
01860 #define NFSFT_PRESERVE_X     (1U << 8)
01861 
01872 #define NFSFT_PRESERVE_F     (1U << 9)
01873 
01883 #define NFSFT_DESTROY_F_HAT    (1U << 10)
01884 
01895 #define NFSFT_DESTROY_X      (1U << 11)
01896 
01906 #define NFSFT_DESTROY_F      (1U << 12)
01907 
01908 /* Precomputation flags */
01909 
01919 #define NFSFT_NO_DIRECT_ALGORITHM    (1U << 13)
01920 
01930 #define NFSFT_NO_FAST_ALGORITHM      (1U << 14)
01931 
01939 #define NFSFT_ZERO_F_HAT             (1U << 16)
01940 
01941 /* */
01942 
01951 #define NFSFT_INDEX(k,n,plan)        ((2*(plan)->N+2)*((plan)->N-n+1)+(plan)->N+k+1)
01952 
01957 #define NFSFT_F_HAT_SIZE(N)          ((2*N+2)*(2*N+2))
01958 
01960 typedef struct
01961 {
01963   MACRO_MV_PLAN(fftw_complex)
01964 
01965   /* Public members */
01966   int N;                              
01967   double *x;                          
01974   /* Private members */
01975   /*int NPT;*/                        
01977   int t;                              
01979   unsigned int flags;                 
01980   nfft_plan plan_nfft;                
01981   fftw_complex *f_hat_intern;              
01983 } nfsft_plan;
01984 
01994 void nfsft_init(nfsft_plan *plan, int N, int M);
01995 
02006 void nfsft_init_advanced(nfsft_plan* plan, int N, int M, unsigned int
02007                          nfsft_flags);
02008 
02020 void nfsft_init_guru(nfsft_plan *plan, int N, int M, unsigned int nfsft_flags,
02021     unsigned int nfft_flags, int nfft_cutoff);
02022 
02036 void nfsft_precompute(int N, double kappa, unsigned int nfsft_flags,
02037   unsigned int fpt_flags);
02038 
02044 void nfsft_forget(void);
02045 
02057 void ndsft_trafo(nfsft_plan* plan);
02058 
02071 void ndsft_adjoint(nfsft_plan* plan);
02072 
02084 void nfsft_trafo(nfsft_plan* plan);
02085 
02098 void nfsft_adjoint(nfsft_plan* plan);
02099 
02107 void nfsft_finalize(nfsft_plan* plan);
02108 
02109 void nfsft_precompute_x(nfsft_plan *plan);
02110 
02111 #endif
02112 
02116 /*###########################################################################*/
02117 /*###########################################################################*/
02118 /*###########################################################################*/
02119 
02128 #ifdef HAVE_FPT
02129 
02130 /* Flags for fpt_init() */
02131 #define FPT_NO_FAST_ALGORITHM (1U << 2) 
02132 #define FPT_NO_DIRECT_ALGORITHM (1U << 3) 
02133 #define FPT_NO_STABILIZATION  (1U << 0) 
02136 #define FPT_PERSISTENT_DATA   (1U << 4) 
02138 /* Flags for fpt_trafo(), dpt_transposed(), fpt_trafo(), fpt_transposed() */
02139 #define FPT_FUNCTION_VALUES   (1U << 5) 
02142 #define FPT_AL_SYMMETRY       (1U << 6) 
02144 /* Data structures */
02145 typedef struct fpt_set_s_ *fpt_set;     
02162 fpt_set fpt_init(const int M, const int t, const unsigned int flags);
02163 
02184 void fpt_precompute(fpt_set set, const int m, double *alpha, double *beta,
02185   double *gam, int k_start, const double threshold);
02186 
02197 void dpt_trafo(fpt_set set, const int m, const fftw_complex *x, fftw_complex *y,
02198   const int k_end, const unsigned int flags);
02199 
02210 void fpt_trafo(fpt_set set, const int m, const fftw_complex *x, fftw_complex *y,
02211   const int k_end, const unsigned int flags);
02212 
02223 void dpt_transposed(fpt_set set, const int m, fftw_complex *x,
02224   fftw_complex *y, const int k_end, const unsigned int flags);
02225 
02236 void fpt_transposed(fpt_set set, const int m, fftw_complex *x,
02237   fftw_complex *y, const int k_end, const unsigned int flags);
02238 
02239 void fpt_finalize(fpt_set set);
02240 
02241 #endif
02242 
02246 /*###########################################################################*/
02247 /*###########################################################################*/
02248 /*###########################################################################*/
02249 
02260 #ifdef HAVE_NFSOFT
02261 
02262 /* Planner flags */
02282 #define NFSOFT_NORMALIZED    (1U << 0)
02283 
02294 #define NFSOFT_USE_NDFT      (1U << 1)
02295 
02306 #define NFSOFT_USE_DPT       (1U << 2)
02307 
02321 #define NFSOFT_MALLOC_X      (1U << 3)
02322 
02330 #define NFSOFT_REPRESENT      (1U << 4)
02331 
02332 
02346 #define NFSOFT_MALLOC_F_HAT  (1U << 5)
02347 
02361 #define NFSOFT_MALLOC_F      (1U << 6)
02362 
02373 #define NFSOFT_PRESERVE_F_HAT (1U << 7)
02374 
02386 #define NFSOFT_PRESERVE_X     (1U << 8)
02387 
02398 #define NFSOFT_PRESERVE_F     (1U << 9)
02399 
02409 #define NFSOFT_DESTROY_F_HAT    (1U << 10)
02410 
02421 #define NFSOFT_DESTROY_X      (1U << 11)
02422 
02432 #define NFSOFT_DESTROY_F      (1U << 12)
02433 
02442 #define NFSOFT_NO_STABILIZATION      (1U << 13)
02443 
02453 #define NFSOFT_CHOOSE_DPT            (1U << 14)
02454 
02465 #define NFSOFT_SOFT                  (1U << 15)
02466 
02467 
02475 #define NFSOFT_ZERO_F_HAT             (1U << 16)
02476 
02477 
02478 /* Helper macros*/
02484 #define NFSOFT_INDEX(m,n,l,B)        (((l)+((B)+1))+(2*(B)+2)*(((n)+((B)+1))+(2*(B)+2)*((m)+((B)+1))))
02485 #define NFSOFT_INDEX_TWO(m,n,l,B) ((B+1)*(B+1)+(B+1)*(B+1)*(m+B)-((m-1)*m*(2*m-1)+(B+1)*(B+2)*(2*B+3))/6)+(posN(n,m,B))+(l-MAX(ABS(m),ABS(n)))
02486 int posN(int n,int m, int B);
02487 
02492 #define NFSOFT_F_HAT_SIZE(B)          (((B)+1)*(4*((B)+1)*((B)+1)-1)/3)
02493 
02495 typedef struct nfsoft_plan_
02496 {
02498   MACRO_MV_PLAN(fftw_complex)
02499 
02500   double *x;                           
02502   fftw_complex *wig_coeffs;          
02504   fftw_complex *cheby;           
02506   fftw_complex *aux;             
02510   int t;                               
02512   unsigned int flags;                  
02513   nfft_plan nfft_plan;                
02514   fftw_plan fftw_plan;                
02515   fpt_set fpt_set;                    
02517   int fpt_kappa;       
02519 } nfsoft_plan;
02520 
02521 
02530 void nfsoft_precompute(nfsoft_plan *plan);
02531 
02542 fpt_set SO3_single_fpt_init(int l, int k, int m, unsigned int flags, int kappa);
02543 void SO3_fpt(fftw_complex *coeffs, fpt_set set, int l, int k, int m, unsigned int nfsoft_flags);
02544 void SO3_fpt_transposed(fftw_complex *coeffs,fpt_set set,int l, int k, int m,unsigned int nfsoft_flags);
02545 
02546 
02556 void nfsoft_init(nfsoft_plan *plan, int N, int M);
02567 void nfsoft_init_advanced(nfsoft_plan *plan, int N, int M,unsigned int nfsoft_flags);
02581 void nfsoft_init_guru(nfsoft_plan *plan, int N, int M,unsigned int nfsoft_flags,unsigned int nfft_flags,int nfft_cutoff,int fpt_kappa);
02582 
02594 void nfsoft_trafo(nfsoft_plan *plan_nfsoft);
02607 void nfsoft_adjoint(nfsoft_plan *plan_nfsoft);
02615 void nfsoft_finalize(nfsoft_plan *plan);
02616 
02617 
02618 #endif
02619 
02624 /*###########################################################################*/
02625 /*###########################################################################*/
02626 /*###########################################################################*/
02627 
02632 /* Planner flags, i.e. constant symbols for methods */
02633 
02640 #define LANDWEBER             (1U<< 0)
02641 
02648 #define STEEPEST_DESCENT      (1U<< 1)
02649 
02657 #define CGNR                  (1U<< 2)
02658 
02666 #define CGNE                  (1U<< 3)
02667 
02674 #define NORMS_FOR_LANDWEBER   (1U<< 4)
02675 
02682 #define PRECOMPUTE_WEIGHT     (1U<< 5)
02683 
02690 #define PRECOMPUTE_DAMP       (1U<< 6)
02691 
02692 
02693 typedef struct
02694 {
02695   mv_plan_complex *mv;                  
02696   unsigned flags;                       
02698   double *w;                            
02699   double *w_hat;                        
02701   fftw_complex *y;                      
02703   fftw_complex *f_hat_iter;             
02705   fftw_complex *r_iter;                 
02706   fftw_complex *z_hat_iter;             
02708   fftw_complex *p_hat_iter;             
02709   fftw_complex *v_iter;                 
02711   double alpha_iter;                    
02712   double beta_iter;                     
02714   double dot_r_iter;                    
02715   double dot_r_iter_old;                
02716   double dot_z_hat_iter;                
02718   double dot_z_hat_iter_old;            
02719   double dot_p_hat_iter;                
02721   double dot_v_iter;                    
02722 } solver_plan_complex;
02723 
02724 void solver_init_advanced_complex(solver_plan_complex* ths, mv_plan_complex *mv, unsigned flags);
02725 void solver_init_complex(solver_plan_complex* ths, mv_plan_complex *mv);
02726 void solver_before_loop_complex(solver_plan_complex* ths);
02727 void solver_loop_one_step_complex(solver_plan_complex *ths);
02728 void solver_finalize_complex(solver_plan_complex *ths);
02729 
02730 typedef struct
02731 {
02732   mv_plan_double *mv;                   
02733   unsigned flags;                       
02735   double *w;                            
02736   double *w_hat;                        
02738   double *y;                            
02740   double *f_hat_iter;                   
02742   double *r_iter;                       
02743   double *z_hat_iter;                   
02745   double *p_hat_iter;                   
02746   double *v_iter;                       
02748   double alpha_iter;                    
02749   double beta_iter;                     
02751   double dot_r_iter;                    
02752   double dot_r_iter_old;                
02753   double dot_z_hat_iter;                
02755   double dot_z_hat_iter_old;            
02756   double dot_p_hat_iter;                
02758   double dot_v_iter;                    
02759 } solver_plan_double;
02760 
02761 void solver_init_advanced_double(solver_plan_double* ths, mv_plan_double *mv, unsigned flags);
02762 void solver_init_double(solver_plan_double* ths, mv_plan_double *mv);
02763 void solver_before_loop_double(solver_plan_double* ths);
02764 void solver_loop_one_step_double(solver_plan_double *ths);
02765 void solver_finalize_double(solver_plan_double *ths);
02766 
02770 #endif
02771 /* nfft3.h */

Generated on 16 Sep 2009 by Doxygen 1.5.3