34 static void simple_test_nfft_1d(
void)
51 nfft_precompute_one_psi(&p);
59 nfft_trafo_direct(&p);
61 t = nfft_elapsed_seconds(t1,t0);
63 printf(
" took %e seconds.\n",t);
70 nfft_adjoint_direct(&p);
81 static void simple_test_nfft_2d(
void)
96 nfft_init_guru(&p, 2, N, M, n, 7,
97 PRE_PHI_HUT| PRE_FULL_PSI| MALLOC_F_HAT| MALLOC_X| MALLOC_F |
98 FFTW_INIT| FFT_OUT_OF_PLACE,
99 FFTW_ESTIMATE| FFTW_DESTROY_INPUT);
106 nfft_precompute_one_psi(&p);
112 t = nfft_elapsed_seconds(t1,t0);
114 "given Fourier coefficients, vector f_hat (first few entries)");
115 printf(
" ... initialisation took %e seconds.\n",t);
119 nfft_trafo_direct(&p);
121 t = nfft_elapsed_seconds(t1,t0);
123 printf(
" took %e seconds.\n",t);
129 t = nfft_elapsed_seconds(t1,t0);
131 printf(
" took %e seconds.\n",t);
135 nfft_adjoint_direct(&p);
137 t = nfft_elapsed_seconds(t1,t0);
139 printf(
" took %e seconds.\n",t);
145 t = nfft_elapsed_seconds(t1,t0);
147 printf(
" took %e seconds.\n",t);
155 printf(
"1) computing a one dimensional ndft, nfft and an adjoint nfft\n\n");
156 simple_test_nfft_1d();
160 printf(
"2) computing a two dimensional ndft, nfft and an adjoint nfft\n\n");
161 simple_test_nfft_2d();
void nfft_vrand_unit_complex(fftw_complex *x, int n)
Inits a vector of random complex numbers in .
fftw_complex * f_hat
Vector of Fourier coefficients, size is N_total * sizeof( fftw_complex )
fftw_complex * f
Vector of samples, size is M_total * sizeof( fftw_complex )
void nfft_trafo(nfft_plan *ths)
user routines
int M_total
Total number of samples.
Header file for utility functions used by the nfft3 library.
void nfft_vpr_complex(fftw_complex *x, int n, const char *text)
Prints a vector of complex numbers.
void nfft_vrand_shifted_unit_double(double *x, int n)
Inits a vector of random double numbers in .
unsigned nfft_flags
Flags for precomputation, (de)allocation, and FFTW usage, default setting is PRE_PHI_HUT | PRE_PSI | ...
double * x
Nodes in time/spatial domain, size is doubles.
int N_total
Total number of Fourier coefficients.