NFFT 3.5.3alpha
solver_adjoint.h
Go to the documentation of this file.
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
22#ifndef SOLVER_ADJOINT_H
23#define SOLVER_ADJOINT_H
24
26#include "nfft3.h"
27
28/*
29 * Macro for mangling an adjoint transform.
30 * temporary added 01.2007 by tim becker
31 */
32
33#define MACRO_SOLVER_ADJOINT_PLAN(MV, FLT, FLT_TYPE) \
34 \
35 \
36typedef struct \
37{ \
38 MV ## _plan *mv; \
39 unsigned flags; \
40 \
41 double *w; \
42 double *w_hat; \
43 \
44 FLT_TYPE *y_hat; \
45 \
46 FLT_TYPE *f_iter; \
47 FLT_TYPE *r_hat_iter; \
48 FLT_TYPE *z_iter; \
50 FLT_TYPE *p_iter; \
51 FLT_TYPE *v_hat_iter; \
52 \
53 double alpha_iter; \
54 double beta_iter; \
55 \
56 double dot_r_hat_iter; \
57 double dot_r_hat_iter_old; \
58 double dot_z_iter; \
60 double dot_z_iter_old; \
61 double dot_p_iter; \
63 double dot_v_hat_iter; \
64} i ## MV ## _adjoint_plan; \
65 \
66 \
67void i ## MV ## _adjoint_init(adjoint ## MV ## _plan *ths, MV ## _plan *mv); \
68 \
69void i ## MV ## _adjoint_init_advanced(adjoint ## MV ## _plan *ths, \
70MV ## _plan, *mv, unsigned adjoint ## MV ## _flags); \
71 \
72void i ## MV ## _adjoint_before_loop(adjoint ## MV ## _plan *ths); \
73 \
74void i ## MV ## _adjoint_loop_one_step(adjoint ## MV ## _plan *ths); \
75 \
76void i ## MV ## _adjoint_finalize(adjoint ## MV ## _plan *ths); \
79MACRO_SOLVER_ADJOINT_PLAN(nfsft, complex, double _Complex)
80MACRO_SOLVER_ADJOINT_PLAN(nfft, complex, double _Complex)
81MACRO_SOLVER_ADJOINT_PLAN(nfct, double, double)
82MACRO_SOLVER_ADJOINT_PLAN(nfst, double, double)
83MACRO_SOLVER_ADJOINT_PLAN(nnfft, complex, double _Complex)
84MACRO_SOLVER_ADJOINT_PLAN(mri_inh_2d1d, complex, double _Complex)
85MACRO_SOLVER_ADJOINT_PLAN(mri_inh_3d, complex, double _Complex)
86
87#endif
88/* solver_adjoint.h */
Header file for the nfft3 library.
#define MACRO_SOLVER_ADJOINT_PLAN(MV, FLT, FLT_TYPE)
Include NFFT3 header.