![]() |
|
Defines | |
#define | TIC(a) |
Timing, method works since the inaccurate timer is updated mostly in the measured function. | |
#define | TOC(a) |
#define | TIC_FFTW(a) |
#define | TOC_FFTW(a) |
#define | NFFT_SWAP_complex(x, y) |
Swapping of two vectors. | |
#define | NFFT_SWAP_double(x, y) |
Swapping of two vectors. | |
#define | PI 3.141592653589793238462643383279502884197169399375105820974944592 |
Formerly known to be an irrational number. | |
#define | PI2 6.283185307179586476925286766559005768394338798750211641949889185 |
#define | PI4 12.56637061435917295385057353311801153678867759750042328389977837 |
#define | NFFT_MAX(a, b) ((a)>(b)? (a) : (b)) |
Maximum of its two arguments. | |
#define | NFFT_MIN(a, b) ((a)<(b)? (a) : (b)) |
Mimimum of its two arguments. | |
Functions | |
double | nfft_second (void) |
Actual used CPU time in seconds; calls getrusage, limited accuracy. | |
int | nfft_total_used_memory (void) |
Actual used memory in bytes; calls mallinfo if define HAVE_MALLOC_H. | |
int | nfft_ld (int m) |
Integer logarithm of 2. | |
int | nfft_int_2_pow (int a) |
Integer power of 2. | |
int | nfft_next_power_of_2 (int N) |
Computes ![]() ![]() | |
void | nfft_next_power_of_2_exp (int N, int *N2, int *t) |
Computes ? | |
double | nfft_sinc (double x) |
Computes the sinus cardinalis ![]() | |
double | nfft_bspline_old (int k, double x, double *A) |
To test the new one. | |
double | nfft_bspline (int k, double x, double *scratch) |
Computes the B-spline ![]() | |
double | nfft_i0 (double x) |
Modified Bessel function of order zero; adapted from Stephen Moshier's Cephes Math Library Release 2.8. | |
int | nfft_prod_int (int *vec, int d) |
Computes integer ![]() | |
int | nfct_prod_int (int *vec, int d) |
Computes integer ![]() | |
int | nfst_prod_minus_a_int (int *vec, int a, int d) |
Computes integer ![]() | |
int | nfft_plain_loop (int *idx, int *N, int d) |
Computes ![]() | |
double | nfft_prod_real (double *vec, int d) |
Computes double ![]() | |
double | nfft_dot_complex (fftw_complex *x, int n) |
Computes the inner/dot product ![]() | |
double | nfft_dot_double (double *x, int n) |
Computes the inner/dot product ![]() | |
double | nfft_dot_w_complex (fftw_complex *x, double *w, int n) |
Computes the weighted inner/dot product ![]() | |
double | nfft_dot_w_double (double *x, double *w, int n) |
Computes the weighted inner/dot product ![]() | |
double | nfft_dot_w_w2_complex (fftw_complex *x, double *w, double *w2, int n) |
Computes the weighted inner/dot product ![]() | |
double | nfft_dot_w2_complex (fftw_complex *x, double *w2, int n) |
Computes the weighted inner/dot product ![]() | |
void | nfft_cp_complex (fftw_complex *x, fftw_complex *y, int n) |
Copies ![]() | |
void | nfft_cp_double (double *x, double *y, int n) |
Copies ![]() | |
void | nfft_cp_a_complex (fftw_complex *x, double a, fftw_complex *y, int n) |
Copies ![]() | |
void | nfft_cp_w_complex (fftw_complex *x, double *w, fftw_complex *y, int n) |
Copies ![]() | |
void | nfft_cp_w_double (double *x, double *w, double *y, int n) |
Copies ![]() | |
void | nfft_upd_axpy_complex (fftw_complex *x, double a, fftw_complex *y, int n) |
Updates ![]() | |
void | nfft_upd_axpy_double (double *x, double a, double *y, int n) |
Updates ![]() | |
void | nfft_upd_xpay_complex (fftw_complex *x, double a, fftw_complex *y, int n) |
Updates ![]() | |
void | nfft_upd_xpay_double (double *x, double a, double *y, int n) |
Updates ![]() | |
void | nfft_upd_axpby_complex (fftw_complex *x, double a, fftw_complex *y, double b, int n) |
Updates ![]() | |
void | nfft_upd_axpby_double (double *x, double a, double *y, double b, int n) |
Updates ![]() | |
void | nfft_upd_xpawy_complex (fftw_complex *x, double a, double *w, fftw_complex *y, int n) |
Updates ![]() | |
void | nfft_upd_xpawy_double (double *x, double a, double *w, double *y, int n) |
Updates ![]() | |
void | nfft_upd_axpwy_complex (fftw_complex *x, double a, double *w, fftw_complex *y, int n) |
Updates ![]() | |
void | nfft_upd_axpwy_double (double *x, double a, double *w, double *y, int n) |
Updates ![]() | |
void | nfft_fftshift_complex (fftw_complex *x, int d, int *N) |
Swaps each half over N[d]/2. | |
double | nfft_error_l_infty_complex (fftw_complex *x, fftw_complex *y, int n) |
Computes ![]() | |
double | nfft_error_l_infty_double (double *x, double *y, int n) |
Computes ![]() | |
double | nfft_error_l_infty_1_complex (fftw_complex *x, fftw_complex *y, int n, fftw_complex *z, int m) |
Computes ![]() | |
double | nfft_error_l_infty_1_double (double *x, double *y, int n, double *z, int m) |
Computes ![]() | |
double | nfft_error_l_2_complex (fftw_complex *x, fftw_complex *y, int n) |
Computes ![]() | |
double | nfft_error_l_2_double (double *x, double *y, int n) |
Computes ![]() | |
void | nfft_vpr_int (int *x, int n, char *text) |
Prints a vector of integer numbers. | |
void | nfft_vpr_double (double *x, int n, const char *text) |
Prints a vector of doubles numbers. | |
void | nfft_vpr_complex (fftw_complex *x, int n, const char *text) |
Prints a vector of complex numbers. | |
void | nfft_vrand_unit_complex (fftw_complex *x, int n) |
Inits a vector of random complex numbers in ![]() | |
void | nfft_vrand_shifted_unit_double (double *x, int n) |
Inits a vector of random double numbers in ![]() | |
void | nfft_voronoi_weights_1d (double *w, double *x, int M) |
Computes non periodic voronoi weights, assumes ordered nodes ![]() | |
void | nfft_voronoi_weights_S2 (double *w, double *xi, int M) |
Computes voronoi weights for nodes on the sphere S^2. | |
double | nfft_modified_fejer (int N, int kk) |
Computes the damping factor for the modified Fejer kernel, ie ![]() | |
double | nfft_modified_jackson2 (int N, int kk) |
Computes the damping factor for the modified Jackson kernel. | |
double | nfft_modified_jackson4 (int N, int kk) |
Computes the damping factor for the modified generalised Jackson kernel. | |
double | nfft_modified_sobolev (double mu, int kk) |
Computes the damping factor for the modified Sobolev kernel. | |
double | nfft_modified_multiquadric (double mu, double c, int kk) |
Computes the damping factor for the modified multiquadric kernel. | |
int | nfft_smbi (const double x, const double alpha, const int nb, const int ize, double *b) |
Calculates the modified bessel function ![]() ![]() ![]() ![]() ![]() | |
double | nfft_lambda (const double z, const double eps) |
Computes the function ![]() ![]() | |
double | nfft_lambda2 (const double mu, const double nu) |
This module implements frequently used utility functions. In particular, this includes simple measurement of resources, evaluation of window functions, vector routines for basic linear algebra tasks, and computation of weights for the inverse transforms.
#define TIC | ( | a | ) |
Timing, method works since the inaccurate timer is updated mostly in the measured function.
For small times not every call of the measured function will also produce a 'unit' time step. Measuring the fftw might cause a wrong output vector due to the repeated ffts.
Definition at line 72 of file nfft3util.h.
Referenced by nfct_adjoint(), nfct_trafo(), nfft_adjoint(), nfft_trafo(), nfst_adjoint(), and nfst_trafo().
#define NFFT_SWAP_complex | ( | x, | |||
y | ) |
Value:
{fftw_complex* NFFT_SWAP_temp__; \ NFFT_SWAP_temp__=(x); (x)=(y); (y)=NFFT_SWAP_temp__;}
Definition at line 87 of file nfft3util.h.
Referenced by fgt_test_andersson(), fgt_test_error(), fgt_test_error_p(), fgt_test_simple(), glacier_cv(), main(), solver_loop_one_step_cgnr_complex(), solver_loop_one_step_landweber_complex(), solver_loop_one_step_steepest_descent_complex(), and taylor_time_accuracy().
#define NFFT_SWAP_double | ( | x, | |||
y | ) |
Value:
{double* NFFT_SWAP_temp__; NFFT_SWAP_temp__=(x); \
(x)=(y); (y)=NFFT_SWAP_temp__;}
Definition at line 92 of file nfft3util.h.
Referenced by solver_loop_one_step_cgnr_double(), solver_loop_one_step_landweber_double(), and solver_loop_one_step_steepest_descent_double().
double nfft_second | ( | void | ) |
Actual used CPU time in seconds; calls getrusage, limited accuracy.
Actual used CPU time in seconds; calls getrusage, limited accuracy.
functions for vectors, window functions, ... (c) if not stated otherwise: Daniel Potts, Stefan Kunis Actual used CPU time in seconds. Calls getrusage, limited accuracy
Definition at line 43 of file util.c.
Referenced by comparison_fft(), fgt_test_measure_time(), inverse_linogram_fft(), inverse_mpolar_fft(), linogram_dft(), linogram_fft(), main(), mpolar_dft(), mpolar_fft(), reconstruct(), and taylor_time_accuracy().
double nfft_i0 | ( | double | x | ) |
Modified Bessel function of order zero; adapted from Stephen Moshier's Cephes Math Library Release 2.8.
Modified Bessel function of order zero; adapted from Stephen Moshier's Cephes Math Library Release 2.8.
Cephes Math Library Release 2.8: June, 2000 Copyright 1984, 1987, 2000 by Stephen L. Moshier
void nfft_voronoi_weights_S2 | ( | double * | w, | |
double * | xi, | |||
int | M | |||
) |
Computes voronoi weights for nodes on the sphere S^2.
Definition at line 1447 of file util.c.
References nfft_free(), nfft_malloc(), and PI.
Referenced by main().
int nfft_smbi | ( | const R | x, | |
const R | alpha, | |||
const int | nb, | |||
const int | ize, | |||
R * | b | |||
) |
Calculates the modified bessel function , possibly scaled by
, for real non-negative
with
, and
.
x
non-negative real number in alpha
non-negative real number with nb
number of functions to be calculated ize
switch between no scaling (ize
= 1) and exponential scaling (ize
= 2) b
real output vector to contain nb
, then all values in b
have been calculated to full accuracy. If not, errors are indicated using the following scheme:ncalc
is set to References: [1] F. W. J. Olver and D. J. Sookne, A note on backward recurrence algorithms", Math. Comput. (26), 1972, pp 125 -- 132. [2] D. J. Sookne, "Bessel functions of real argument and int order", NBS Jour. of Res. B. (77B), 1973, pp. 125 -- 132.
Modified by W. J. Cody, Applied Mathematics Division, Argonne National Laboratory, Argonne, IL, 60439, USA
Modified by Jens Keiner, Institute of Mathematics, University of Lübeck, 23560 Lübeck, Germany
Definition at line 1816 of file util.c.
Referenced by main().
double nfft_lambda | ( | const double | z, | |
const double | eps | |||
) |