![]() |
NFFT
3.3.2
|
00001 /* 00002 * Copyright (c) 2002, 2016 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 00022 #ifndef SOLVER_ADJOINT_H 00023 #define SOLVER_ADJOINT_H 00024 00026 #include "nfft3.h" 00027 00028 /* 00029 * Macro for mangling an adjoint transform. 00030 * temporary added 01.2007 by tim becker 00031 */ 00032 \ 00033 #define MACRO_SOLVER_ADJOINT_PLAN(MV, FLT, FLT_TYPE) \ 00034 \ 00035 \ 00036 typedef struct \ 00037 { \ 00038 MV ## _plan *mv; \ 00039 unsigned flags; \ 00040 \ 00041 double *w; \ 00042 double *w_hat; \ 00043 \ 00044 FLT_TYPE *y_hat; \ 00045 \ 00046 FLT_TYPE *f_iter; \ 00047 FLT_TYPE *r_hat_iter; \ 00048 FLT_TYPE *z_iter; \ 00050 FLT_TYPE *p_iter; \ 00051 FLT_TYPE *v_hat_iter; \ 00052 \ 00053 double alpha_iter; \ 00054 double beta_iter; \ 00055 \ 00056 double dot_r_hat_iter; \ 00057 double dot_r_hat_iter_old; \ 00058 double dot_z_iter; \ 00060 double dot_z_iter_old; \ 00061 double dot_p_iter; \ 00063 double dot_v_hat_iter; \ 00064 } i ## MV ## _adjoint_plan; \ 00065 \ 00066 \ 00067 void i ## MV ## _adjoint_init(adjoint ## MV ## _plan *ths, MV ## _plan *mv); \ 00068 \ 00069 void i ## MV ## _adjoint_init_advanced(adjoint ## MV ## _plan *ths, MV ## _plan,\ 00070 *mv, unsigned adjoint ## MV ## _flags); \ 00071 \ 00072 void i ## MV ## _adjoint_before_loop(adjoint ## MV ## _plan *ths); \ 00073 \ 00074 void i ## MV ## _adjoint_loop_one_step(adjoint ## MV ## _plan *ths); \ 00075 \ 00076 void i ## MV ## _adjoint_finalize(adjoint ## MV ## _plan *ths); \ 00077 00078 00079 MACRO_SOLVER_ADJOINT_PLAN(nfsft, complex, double _Complex) 00080 MACRO_SOLVER_ADJOINT_PLAN(nfft, complex, double _Complex) 00081 MACRO_SOLVER_ADJOINT_PLAN(nfct, double, double) 00082 MACRO_SOLVER_ADJOINT_PLAN(nfst, double, double) 00083 MACRO_SOLVER_ADJOINT_PLAN(nnfft, complex, double _Complex) 00084 MACRO_SOLVER_ADJOINT_PLAN(mri_inh_2d1d, complex, double _Complex) 00085 MACRO_SOLVER_ADJOINT_PLAN(mri_inh_3d, complex, double _Complex) 00086 00087 #endif 00088 /* solver_adjoint.h */