NFFT Logo 3.2.3
solver_adjoint.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: solver_adjoint.h 3775 2012-06-02 16:39:48Z keiner $ */
20 
24 #ifndef SOLVER_ADJOINT_H
25 #define SOLVER_ADJOINT_H
26 
28 #include "nfft3.h"
29 
30 /*
31  * Macro for mangling an adjoint transform.
32  * temporary added 01.2007 by tim becker
33  */
34  \
35 #define MACRO_SOLVER_ADJOINT_PLAN(MV, FLT, FLT_TYPE) \
36  \
37  \
38 typedef struct \
39 { \
40  MV ## _plan *mv; \
41  unsigned flags; \
42  \
43  double *w; \
44  double *w_hat; \
45  \
46  FLT_TYPE *y_hat; \
47  \
48  FLT_TYPE *f_iter; \
49  FLT_TYPE *r_hat_iter; \
50  FLT_TYPE *z_iter; \
52  FLT_TYPE *p_iter; \
53  FLT_TYPE *v_hat_iter; \
54  \
55  double alpha_iter; \
56  double beta_iter; \
57  \
58  double dot_r_hat_iter; \
59  double dot_r_hat_iter_old; \
60  double dot_z_iter; \
62  double dot_z_iter_old; \
63  double dot_p_iter; \
65  double dot_v_hat_iter; \
66 } i ## MV ## _adjoint_plan; \
67  \
68  \
69 void i ## MV ## _adjoint_init(adjoint ## MV ## _plan *ths, MV ## _plan *mv); \
70  \
71 void i ## MV ## _adjoint_init_advanced(adjoint ## MV ## _plan *ths, MV ## _plan,\
72 *mv, unsigned adjoint ## MV ## _flags); \
73 \
74 void i ## MV ## _adjoint_before_loop(adjoint ## MV ## _plan *ths); \
75 \
76 void i ## MV ## _adjoint_loop_one_step(adjoint ## MV ## _plan *ths); \
77 \
78 void i ## MV ## _adjoint_finalize(adjoint ## MV ## _plan *ths); \
79 
80 
81 MACRO_SOLVER_ADJOINT_PLAN(nfsft, complex, double _Complex)
82 MACRO_SOLVER_ADJOINT_PLAN(nfft, complex, double _Complex)
83 MACRO_SOLVER_ADJOINT_PLAN(nfct, double, double)
84 MACRO_SOLVER_ADJOINT_PLAN(nfst, double, double)
85 MACRO_SOLVER_ADJOINT_PLAN(nnfft, complex, double _Complex)
86 MACRO_SOLVER_ADJOINT_PLAN(mri_inh_2d1d, complex, double _Complex)
87 MACRO_SOLVER_ADJOINT_PLAN(mri_inh_3d, complex, double _Complex)
88 
89 #endif
90 /* solver_adjoint.h */

Generated on Tue Apr 30 2013 by Doxygen 1.8.1